Generated
+38
-1
@@ -13,7 +13,7 @@ using _2021_backend.Data;
|
||||
namespace _2021_backend.Migrations
|
||||
{
|
||||
[DbContext(typeof(BackendContext))]
|
||||
[Migration("20220222090619_initial")]
|
||||
[Migration("20220223070103_initial")]
|
||||
partial class initial
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
@@ -51,6 +51,34 @@ namespace _2021_backend.Migrations
|
||||
b.ToTable("Comments");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("_2021_backend.Models.FileDesc", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("OwnerId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Path")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Size")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<DateTime>("UploadTime")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("FileDesc");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("_2021_backend.Models.Session", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -140,6 +168,12 @@ namespace _2021_backend.Migrations
|
||||
b.Property<int>("InterviewTime")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("LastCaptcha")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTime>("LastCaptchaTime")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<DateTime>("LastSubmission")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
@@ -176,6 +210,9 @@ namespace _2021_backend.Migrations
|
||||
b.Property<List<int>>("Timelist")
|
||||
.HasColumnType("integer[]");
|
||||
|
||||
b.Property<List<int>>("Uploads")
|
||||
.HasColumnType("integer[]");
|
||||
|
||||
b.Property<int>("Yard")
|
||||
.HasColumnType("integer");
|
||||
|
||||
@@ -27,6 +27,23 @@ namespace _2021_backend.Migrations
|
||||
table.PrimaryKey("PK_Comments", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "FileDesc",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
OwnerId = table.Column<int>(type: "integer", nullable: false),
|
||||
Name = table.Column<string>(type: "text", nullable: true),
|
||||
Size = table.Column<int>(type: "integer", nullable: false),
|
||||
Path = table.Column<string>(type: "text", nullable: true),
|
||||
UploadTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_FileDesc", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Sessions",
|
||||
columns: table => new
|
||||
@@ -81,13 +98,16 @@ namespace _2021_backend.Migrations
|
||||
Exp = table.Column<int>(type: "integer", nullable: false),
|
||||
InterviewTime = table.Column<int>(type: "integer", nullable: false),
|
||||
Submissions = table.Column<List<int>>(type: "integer[]", nullable: true),
|
||||
Uploads = table.Column<List<int>>(type: "integer[]", nullable: true),
|
||||
Messages = table.Column<List<int>>(type: "integer[]", nullable: true),
|
||||
Timelist = table.Column<List<int>>(type: "integer[]", nullable: true),
|
||||
Comments = table.Column<List<int>>(type: "integer[]", nullable: true),
|
||||
Score = table.Column<int>(type: "integer", nullable: false),
|
||||
Status = table.Column<int>(type: "integer", nullable: false),
|
||||
LastSubmission = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
RegisterTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
|
||||
RegisterTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
LastCaptcha = table.Column<string>(type: "text", nullable: true),
|
||||
LastCaptchaTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
@@ -141,6 +161,9 @@ namespace _2021_backend.Migrations
|
||||
migrationBuilder.DropTable(
|
||||
name: "Comments");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "FileDesc");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Sessions");
|
||||
|
||||
@@ -46,7 +46,35 @@ namespace _2021_backend.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Comments", (string)null);
|
||||
b.ToTable("Comments");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("_2021_backend.Models.FileDesc", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("OwnerId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Path")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Size")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<DateTime>("UploadTime")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("FileDesc");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("_2021_backend.Models.Session", b =>
|
||||
@@ -81,7 +109,7 @@ namespace _2021_backend.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Sessions", (string)null);
|
||||
b.ToTable("Sessions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("_2021_backend.Models.SMS", b =>
|
||||
@@ -112,7 +140,7 @@ namespace _2021_backend.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("SMS", (string)null);
|
||||
b.ToTable("SMS");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("_2021_backend.Models.Student", b =>
|
||||
@@ -138,6 +166,12 @@ namespace _2021_backend.Migrations
|
||||
b.Property<int>("InterviewTime")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("LastCaptcha")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTime>("LastCaptchaTime")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<DateTime>("LastSubmission")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
@@ -174,12 +208,15 @@ namespace _2021_backend.Migrations
|
||||
b.Property<List<int>>("Timelist")
|
||||
.HasColumnType("integer[]");
|
||||
|
||||
b.Property<List<int>>("Uploads")
|
||||
.HasColumnType("integer[]");
|
||||
|
||||
b.Property<int>("Yard")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Students", (string)null);
|
||||
b.ToTable("Students");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("_2021_backend.Models.Submission", b =>
|
||||
@@ -231,7 +268,7 @@ namespace _2021_backend.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Submissions", (string)null);
|
||||
b.ToTable("Submissions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("_2021_backend.Models.User", b =>
|
||||
@@ -256,7 +293,7 @@ namespace _2021_backend.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Users", (string)null);
|
||||
b.ToTable("Users");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user