Changeset aee2b88 for iknow-api/Migrations/20251216191800_InitialCreate.cs
- Timestamp:
- 12/16/25 23:05:19 (9 months ago)
- Branches:
- master
- Children:
- bb02e3a
- Parents:
- 61fd94e
- File:
-
- 1 moved
-
iknow-api/Migrations/20251216191800_InitialCreate.cs (moved) (moved from iknow-api/Migrations/20251211135004_inital.cs ) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
iknow-api/Migrations/20251216191800_InitialCreate.cs
r61fd94e raee2b88 10 10 { 11 11 /// <inheritdoc /> 12 public partial class inital: Migration12 public partial class InitialCreate : Migration 13 13 { 14 14 /// <inheritdoc /> … … 19 19 columns: table => new 20 20 { 21 id = table.Column<int>(type: "integer", nullable: false)22 .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), 23 year = table.Column<int>(type: "integer", nullable: false),21 Id = table.Column<int>(type: "integer", nullable: false) 22 .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), 23 Year = table.Column<int>(type: "integer", nullable: false), 24 24 Type = table.Column<int>(type: "integer", nullable: false) 25 25 }, 26 26 constraints: table => 27 27 { 28 table.PrimaryKey("PK_ActiveSemesters", x => x. id);28 table.PrimaryKey("PK_ActiveSemesters", x => x.Id); 29 29 }); 30 30 … … 181 181 MajorId = table.Column<int>(type: "integer", nullable: false), 182 182 StudentComment = table.Column<string>(type: "text", nullable: true), 183 No de = table.Column<string>(type: "text", nullable: true),183 Note = table.Column<string>(type: "text", nullable: true), 184 184 CratedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false), 185 185 LastChange = table.Column<DateTime>(type: "timestamp with time zone", nullable: false), 186 Veryfied = table.Column<DateTime>(type: "timestamp with time zone", nullable: false) 186 Verified = table.Column<DateTime>(type: "timestamp with time zone", nullable: false), 187 SemesterId = table.Column<int>(type: "integer", nullable: false) 187 188 }, 188 189 constraints: table => … … 193 194 column: x => x.Id, 194 195 principalTable: "ActiveSemesters", 195 principalColumn: " id",196 principalColumn: "Id", 196 197 onDelete: ReferentialAction.Restrict); 197 198 table.ForeignKey( … … 215 216 Id = table.Column<int>(type: "integer", nullable: false) 216 217 .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), 217 enrollmentYear = table.Column<int>(type: "integer", nullable: false),218 quota = table.Column<int>(type: "integer", nullable: false),218 EnrollmentYear = table.Column<int>(type: "integer", nullable: false), 219 Quota = table.Column<int>(type: "integer", nullable: false), 219 220 MajorId = table.Column<int>(type: "integer", nullable: false), 220 221 UserId = table.Column<int>(type: "integer", nullable: false), … … 256 257 name: "FK_HighSchool_User_UserId", 257 258 column: x => x.UserId, 259 principalTable: "User", 260 principalColumn: "Id", 261 onDelete: ReferentialAction.Cascade); 262 }); 263 264 migrationBuilder.CreateTable( 265 name: "ProfessorSubjects", 266 columns: table => new 267 { 268 ProfessorId = table.Column<int>(type: "integer", nullable: false), 269 SemesterId = table.Column<int>(type: "integer", nullable: false), 270 SubjectId = table.Column<int>(type: "integer", nullable: false) 271 }, 272 constraints: table => 273 { 274 table.PrimaryKey("PK_ProfessorSubjects", x => new { x.ProfessorId, x.SemesterId, x.SubjectId }); 275 table.ForeignKey( 276 name: "FK_ProfessorSubjects_ActiveSemesters_SemesterId", 277 column: x => x.SemesterId, 278 principalTable: "ActiveSemesters", 279 principalColumn: "Id", 280 onDelete: ReferentialAction.Cascade); 281 table.ForeignKey( 282 name: "FK_ProfessorSubjects_Subjects_SubjectId", 283 column: x => x.SubjectId, 284 principalTable: "Subjects", 285 principalColumn: "Id", 286 onDelete: ReferentialAction.Cascade); 287 table.ForeignKey( 288 name: "FK_ProfessorSubjects_User_ProfessorId", 289 column: x => x.ProfessorId, 258 290 principalTable: "User", 259 291 principalColumn: "Id", … … 466 498 467 499 migrationBuilder.CreateIndex( 500 name: "IX_ProfessorSubjects_SemesterId", 501 table: "ProfessorSubjects", 502 column: "SemesterId"); 503 504 migrationBuilder.CreateIndex( 505 name: "IX_ProfessorSubjects_SubjectId", 506 table: "ProfessorSubjects", 507 column: "SubjectId"); 508 509 migrationBuilder.CreateIndex( 468 510 name: "IX_RefreshToken_UserId", 469 511 table: "RefreshToken", … … 521 563 522 564 migrationBuilder.DropTable( 565 name: "ProfessorSubjects"); 566 567 migrationBuilder.DropTable( 523 568 name: "RefreshToken"); 524 569
Note:
See TracChangeset
for help on using the changeset viewer.
