Changeset 0a694bb for FarmatikoData/Migrations
- Timestamp:
- 02/07/21 16:25:56 (4 years ago)
- Branches:
- master
- Children:
- e0cdea2
- Parents:
- ac51326
- Location:
- FarmatikoData/Migrations
- Files:
-
- 1 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
FarmatikoData/Migrations/20210205174704_Initial-Migration.Designer.cs
rac51326 r0a694bb 11 11 { 12 12 [DbContext(typeof(FarmatikoDataContext))] 13 [Migration("20210 124191844_InitialMigration")]13 [Migration("20210205174704_Initial-Migration")] 14 14 partial class InitialMigration 15 15 { … … 101 101 .ValueGeneratedOnAdd() 102 102 .HasColumnType("integer") 103 .HasAnnotation("Npgsql:IdentitySequenceOptions", "'1', '1', '', '', 'False', '1'")104 103 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); 105 104 … … 188 187 .ValueGeneratedOnAdd() 189 188 .HasColumnType("integer") 190 .HasAnnotation("Npgsql:IdentitySequenceOptions", "'1', '1', '', '', 'False', '1'")191 189 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); 192 190 … … 230 228 .ValueGeneratedOnAdd() 231 229 .HasColumnType("integer") 232 .HasAnnotation("Npgsql:IdentitySequenceOptions", "'1', '1', '', '', 'False', '1'")233 230 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); 234 231 … … 251 248 .HasColumnType("text"); 252 249 253 b.Property<int ?>("UserId")254 .HasColumnType("integer"); 255 256 b.HasKey("Id"); 257 258 b.HasIndex("UserI d");250 b.Property<int>("UserID") 251 .HasColumnType("integer"); 252 253 b.HasKey("Id"); 254 255 b.HasIndex("UserID"); 259 256 260 257 b.ToTable("PharmacyHeads"); … … 266 263 .ValueGeneratedOnAdd() 267 264 .HasColumnType("integer") 268 .HasAnnotation("Npgsql:IdentitySequenceOptions", "'1', '1', '', '', 'False', '1'")269 265 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); 270 266 … … 298 294 .ValueGeneratedOnAdd() 299 295 .HasColumnType("integer") 300 .HasAnnotation("Npgsql:IdentitySequenceOptions", "'1', '1', '', '', 'False', '1'")301 296 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); 302 297 … … 375 370 b.HasOne("FarmatikoData.Models.User", "User") 376 371 .WithMany() 377 .HasForeignKey("UserId"); 372 .HasForeignKey("UserID") 373 .OnDelete(DeleteBehavior.Cascade) 374 .IsRequired(); 378 375 }); 379 376 -
FarmatikoData/Migrations/20210205174704_Initial-Migration.cs
rac51326 r0a694bb 15 15 Id = table.Column<int>(nullable: false) 16 16 .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn), 17 CreatedOn = table.Column<DateTime>(nullable: false, defaultValueSql: 17 CreatedOn = table.Column<DateTime>(nullable: false, defaultValueSql:"now()"), 18 18 DeletedOn = table.Column<DateTime>(nullable: true), 19 19 Name = table.Column<string>(nullable: false), … … 125 125 Name = table.Column<string>(nullable: false), 126 126 Password = table.Column<string>(nullable: false), 127 UserI d = table.Column<int>(nullable: true)127 UserID = table.Column<int>(nullable: false) 128 128 }, 129 129 constraints: table => … … 131 131 table.PrimaryKey("PK_PharmacyHeads", x => x.Id); 132 132 table.ForeignKey( 133 name: "FK_PharmacyHeads_Users_UserI d",134 column: x => x.UserI d,133 name: "FK_PharmacyHeads_Users_UserID", 134 column: x => x.UserID, 135 135 principalTable: "Users", 136 136 principalColumn: "Id", 137 onDelete: ReferentialAction. Restrict);137 onDelete: ReferentialAction.Cascade); 138 138 }); 139 139 … … 172 172 CreatedOn = table.Column<DateTime>(nullable: false, defaultValueSql: "now()"), 173 173 DeletedOn = table.Column<DateTime>(nullable: true), 174 PheadId = table.Column<int>(nullable: true),174 PheadId = table.Column<int>(nullable: false), 175 175 HeadId = table.Column<int>(nullable: true), 176 MedicineId = table.Column<int>(nullable: true)176 MedicineId = table.Column<int>(nullable: false) 177 177 }, 178 178 constraints: table => … … 242 242 243 243 migrationBuilder.CreateIndex( 244 name: "IX_PharmacyHeads_UserI d",244 name: "IX_PharmacyHeads_UserID", 245 245 table: "PharmacyHeads", 246 column: "UserI d");246 column: "UserID"); 247 247 248 248 migrationBuilder.CreateIndex( -
FarmatikoData/Migrations/FarmatikoDataContextModelSnapshot.cs
rac51326 r0a694bb 99 99 .ValueGeneratedOnAdd() 100 100 .HasColumnType("integer") 101 .HasAnnotation("Npgsql:IdentitySequenceOptions", "'1', '1', '', '', 'False', '1'")102 101 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); 103 102 … … 186 185 .ValueGeneratedOnAdd() 187 186 .HasColumnType("integer") 188 .HasAnnotation("Npgsql:IdentitySequenceOptions", "'1', '1', '', '', 'False', '1'")189 187 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); 190 188 … … 228 226 .ValueGeneratedOnAdd() 229 227 .HasColumnType("integer") 230 .HasAnnotation("Npgsql:IdentitySequenceOptions", "'1', '1', '', '', 'False', '1'")231 228 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); 232 229 … … 249 246 .HasColumnType("text"); 250 247 251 b.Property<int ?>("UserId")252 .HasColumnType("integer"); 253 254 b.HasKey("Id"); 255 256 b.HasIndex("UserI d");248 b.Property<int>("UserID") 249 .HasColumnType("integer"); 250 251 b.HasKey("Id"); 252 253 b.HasIndex("UserID"); 257 254 258 255 b.ToTable("PharmacyHeads"); … … 264 261 .ValueGeneratedOnAdd() 265 262 .HasColumnType("integer") 266 .HasAnnotation("Npgsql:IdentitySequenceOptions", "'1', '1', '', '', 'False', '1'")267 263 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); 268 264 … … 296 292 .ValueGeneratedOnAdd() 297 293 .HasColumnType("integer") 298 .HasAnnotation("Npgsql:IdentitySequenceOptions", "'1', '1', '', '', 'False', '1'")299 294 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); 300 295 … … 373 368 b.HasOne("FarmatikoData.Models.User", "User") 374 369 .WithMany() 375 .HasForeignKey("UserId"); 370 .HasForeignKey("UserID") 371 .OnDelete(DeleteBehavior.Cascade) 372 .IsRequired(); 376 373 }); 377 374
Note:
See TracChangeset
for help on using the changeset viewer.