- Timestamp:
- 02/08/21 16:39:25 (4 years ago)
- Branches:
- master
- Children:
- 8eb1e21, dae4cde
- Parents:
- 0a694bb
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
FarmatikoData/Migrations/20210208041424_Initial-Create.cs
r0a694bb re0cdea2 5 5 namespace FarmatikoData.Migrations 6 6 { 7 public partial class Initial Migration: Migration7 public partial class InitialCreate : Migration 8 8 { 9 9 protected override void Up(MigrationBuilder migrationBuilder) … … 150 150 Address = table.Column<string>(nullable: false), 151 151 WorkAllTime = table.Column<bool>(nullable: false), 152 PheadId = table.Column<int>(nullable: false), 153 PharmacyHeadId = table.Column<int>(nullable: true) 152 PheadId = table.Column<int>(nullable: true) 154 153 }, 155 154 constraints: table => … … 157 156 table.PrimaryKey("PK_Pharmacies", x => x.Id); 158 157 table.ForeignKey( 159 name: "FK_Pharmacies_PharmacyHeads_Ph armacyHeadId",160 column: x => x.Ph armacyHeadId,158 name: "FK_Pharmacies_PharmacyHeads_PheadId", 159 column: x => x.PheadId, 161 160 principalTable: "PharmacyHeads", 162 161 principalColumn: "Id", … … 201 200 CreatedOn = table.Column<DateTime>(nullable: false, defaultValueSql: "now()"), 202 201 DeletedOn = table.Column<DateTime>(nullable: true), 203 HeadId = table.Column<int>(nullable: false),204 PharmacyId = table.Column<int>(nullable: false)202 HeadId = table.Column<int>(nullable: true), 203 PharmacyId = table.Column<int>(nullable: true) 205 204 }, 206 205 constraints: table => … … 212 211 principalTable: "PharmacyHeads", 213 212 principalColumn: "Id", 214 onDelete: ReferentialAction. Cascade);213 onDelete: ReferentialAction.Restrict); 215 214 table.ForeignKey( 216 215 name: "FK_PHRequests_Pharmacies_PharmacyId", … … 218 217 principalTable: "Pharmacies", 219 218 principalColumn: "Id", 220 onDelete: ReferentialAction. Cascade);219 onDelete: ReferentialAction.Restrict); 221 220 }); 222 221 … … 227 226 228 227 migrationBuilder.CreateIndex( 229 name: "IX_Pharmacies_Ph armacyHeadId",228 name: "IX_Pharmacies_PheadId", 230 229 table: "Pharmacies", 231 column: "Ph armacyHeadId");230 column: "PheadId"); 232 231 233 232 migrationBuilder.CreateIndex(
Note:
See TracChangeset
for help on using the changeset viewer.