Changeset f844b7e for iknow-api/Migrations
- Timestamp:
- 10/29/25 15:41:48 (11 months ago)
- Branches:
- master
- Children:
- 586825e
- Parents:
- 1d32d5c
- Location:
- iknow-api/Migrations
- Files:
-
- 4 deleted
- 1 edited
- 2 moved
-
20251027140655_InitialCreate.Designer.cs (deleted)
-
20251027191028_dbRelations.cs (deleted)
-
20251028091953_new.Designer.cs (deleted)
-
20251028091953_new.cs (deleted)
-
20251029131316_InitialCreate.Designer.cs (moved) (moved from iknow-api/Migrations/20251027191028_dbRelations.Designer.cs ) (3 diffs)
-
20251029131316_InitialCreate.cs (moved) (moved from iknow-api/Migrations/20251027140655_InitialCreate.cs ) (2 diffs)
-
AppDbContextModelSnapshot.cs (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
iknow-api/Migrations/20251029131316_InitialCreate.Designer.cs
r1d32d5c rf844b7e 13 13 { 14 14 [DbContext(typeof(AppDbContext))] 15 [Migration("2025102 7191028_dbRelations")]16 partial class dbRelations15 [Migration("20251029131316_InitialCreate")] 16 partial class InitialCreate 17 17 { 18 18 /// <inheritdoc /> … … 110 110 }); 111 111 112 modelBuilder.Entity("iknow_api.Models.RefreshToken", b => 113 { 114 b.Property<int>("Id") 115 .ValueGeneratedOnAdd() 116 .HasColumnType("integer"); 117 118 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); 119 120 b.Property<DateTime>("ExpiresAt") 121 .HasColumnType("timestamp with time zone"); 122 123 b.Property<bool>("IsValid") 124 .HasColumnType("boolean"); 125 126 b.Property<string>("Token") 127 .HasColumnType("text"); 128 129 b.Property<int>("UserId") 130 .HasColumnType("integer"); 131 132 b.HasKey("Id"); 133 134 b.HasIndex("UserId"); 135 136 b.ToTable("RefreshToken"); 137 }); 138 112 139 modelBuilder.Entity("iknow_api.Models.User", b => 113 140 { … … 174 201 .WithOne("HighSchool") 175 202 .HasForeignKey("iknow_api.Models.HighSchool", "UserId") 203 .OnDelete(DeleteBehavior.Cascade) 204 .IsRequired(); 205 206 b.Navigation("User"); 207 }); 208 209 modelBuilder.Entity("iknow_api.Models.RefreshToken", b => 210 { 211 b.HasOne("iknow_api.Models.User", "User") 212 .WithMany() 213 .HasForeignKey("UserId") 176 214 .OnDelete(DeleteBehavior.Cascade) 177 215 .IsRequired(); -
iknow-api/Migrations/20251029131316_InitialCreate.cs
r1d32d5c rf844b7e 99 99 }); 100 100 101 migrationBuilder.CreateTable( 102 name: "RefreshToken", 103 columns: table => new 104 { 105 Id = table.Column<int>(type: "integer", nullable: false) 106 .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), 107 UserId = table.Column<int>(type: "integer", nullable: false), 108 Token = table.Column<string>(type: "text", nullable: true), 109 ExpiresAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false), 110 IsValid = table.Column<bool>(type: "boolean", nullable: false) 111 }, 112 constraints: table => 113 { 114 table.PrimaryKey("PK_RefreshToken", x => x.Id); 115 table.ForeignKey( 116 name: "FK_RefreshToken_User_UserId", 117 column: x => x.UserId, 118 principalTable: "User", 119 principalColumn: "Id", 120 onDelete: ReferentialAction.Cascade); 121 }); 122 101 123 migrationBuilder.CreateIndex( 102 124 name: "IX_ContactInfo_UserId", 103 125 table: "ContactInfo", 104 column: "UserId"); 126 column: "UserId", 127 unique: true); 105 128 106 129 migrationBuilder.CreateIndex( 107 130 name: "IX_EnrollmentInfo_UserId", 108 131 table: "EnrollmentInfo", 109 column: "UserId"); 132 column: "UserId", 133 unique: true); 110 134 111 135 migrationBuilder.CreateIndex( 112 136 name: "IX_HighSchool_UserId", 113 137 table: "HighSchool", 138 column: "UserId", 139 unique: true); 140 141 migrationBuilder.CreateIndex( 142 name: "IX_RefreshToken_UserId", 143 table: "RefreshToken", 114 144 column: "UserId"); 115 145 } … … 128 158 129 159 migrationBuilder.DropTable( 160 name: "RefreshToken"); 161 162 migrationBuilder.DropTable( 130 163 name: "User"); 131 164 } -
iknow-api/Migrations/AppDbContextModelSnapshot.cs
r1d32d5c rf844b7e 24 24 25 25 modelBuilder.Entity("iknow_api.Models.ContactInfo", b => 26 modelBuilder.Entity("iknow_api.Models.RefreshToken", b =>27 26 { 28 27 b.Property<int>("Id") … … 106 105 107 106 b.ToTable("HighSchool"); 107 }); 108 109 modelBuilder.Entity("iknow_api.Models.RefreshToken", b => 110 { 111 b.Property<int>("Id") 112 .ValueGeneratedOnAdd() 113 .HasColumnType("integer"); 114 115 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); 116 108 117 b.Property<DateTime>("ExpiresAt") 109 118 .HasColumnType("timestamp with time zone"); … … 113 122 114 123 b.Property<string>("Token") 115 .IsRequired()116 124 .HasColumnType("text"); 117 125 … … 168 176 .WithOne("ContactInfo") 169 177 .HasForeignKey("iknow_api.Models.ContactInfo", "UserId") 178 .OnDelete(DeleteBehavior.Cascade) 179 .IsRequired(); 180 181 b.Navigation("User"); 182 }); 183 184 modelBuilder.Entity("iknow_api.Models.EnrollmentInfo", b => 185 { 186 b.HasOne("iknow_api.Models.User", "User") 187 .WithOne("EnrollmentInfo") 188 .HasForeignKey("iknow_api.Models.EnrollmentInfo", "UserId") 189 .OnDelete(DeleteBehavior.Cascade) 190 .IsRequired(); 191 192 b.Navigation("User"); 193 }); 194 195 modelBuilder.Entity("iknow_api.Models.HighSchool", b => 196 { 197 b.HasOne("iknow_api.Models.User", "User") 198 .WithOne("HighSchool") 199 .HasForeignKey("iknow_api.Models.HighSchool", "UserId") 200 .OnDelete(DeleteBehavior.Cascade) 201 .IsRequired(); 202 203 b.Navigation("User"); 204 }); 205 170 206 modelBuilder.Entity("iknow_api.Models.RefreshToken", b => 171 207 { … … 173 209 .WithMany() 174 210 .HasForeignKey("UserId") 175 .OnDelete(DeleteBehavior.Cascade)176 .IsRequired();177 178 b.Navigation("User");179 });180 181 modelBuilder.Entity("iknow_api.Models.EnrollmentInfo", b =>182 {183 b.HasOne("iknow_api.Models.User", "User")184 .WithOne("EnrollmentInfo")185 .HasForeignKey("iknow_api.Models.EnrollmentInfo", "UserId")186 .OnDelete(DeleteBehavior.Cascade)187 .IsRequired();188 189 b.Navigation("User");190 });191 192 modelBuilder.Entity("iknow_api.Models.HighSchool", b =>193 {194 b.HasOne("iknow_api.Models.User", "User")195 .WithOne("HighSchool")196 .HasForeignKey("iknow_api.Models.HighSchool", "UserId")197 211 .OnDelete(DeleteBehavior.Cascade) 198 212 .IsRequired();
Note:
See TracChangeset
for help on using the changeset viewer.
