Ignore:
Timestamp:
02/07/21 16:25:56 (3 years ago)
Author:
Dimitar Slezenkovski <dslezenkovski@…>
Branches:
master
Children:
e0cdea2
Parents:
ac51326
Message:

Fix create new user bug.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • FarmatikoData/Migrations/20210205174704_Initial-Migration.cs

    rac51326 r0a694bb  
    1515                    Id = table.Column<int>(nullable: false)
    1616                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
    17                     CreatedOn = table.Column<DateTime>(nullable: false, defaultValueSql: "now()"),
     17                    CreatedOn = table.Column<DateTime>(nullable: false, defaultValueSql:"now()"),
    1818                    DeletedOn = table.Column<DateTime>(nullable: true),
    1919                    Name = table.Column<string>(nullable: false),
     
    125125                    Name = table.Column<string>(nullable: false),
    126126                    Password = table.Column<string>(nullable: false),
    127                     UserId = table.Column<int>(nullable: true)
     127                    UserID = table.Column<int>(nullable: false)
    128128                },
    129129                constraints: table =>
     
    131131                    table.PrimaryKey("PK_PharmacyHeads", x => x.Id);
    132132                    table.ForeignKey(
    133                         name: "FK_PharmacyHeads_Users_UserId",
    134                         column: x => x.UserId,
     133                        name: "FK_PharmacyHeads_Users_UserID",
     134                        column: x => x.UserID,
    135135                        principalTable: "Users",
    136136                        principalColumn: "Id",
    137                         onDelete: ReferentialAction.Restrict);
     137                        onDelete: ReferentialAction.Cascade);
    138138                });
    139139
     
    172172                    CreatedOn = table.Column<DateTime>(nullable: false, defaultValueSql: "now()"),
    173173                    DeletedOn = table.Column<DateTime>(nullable: true),
    174                     PheadId = table.Column<int>(nullable: true),
     174                    PheadId = table.Column<int>(nullable: false),
    175175                    HeadId = table.Column<int>(nullable: true),
    176                     MedicineId = table.Column<int>(nullable: true)
     176                    MedicineId = table.Column<int>(nullable: false)
    177177                },
    178178                constraints: table =>
     
    242242
    243243            migrationBuilder.CreateIndex(
    244                 name: "IX_PharmacyHeads_UserId",
     244                name: "IX_PharmacyHeads_UserID",
    245245                table: "PharmacyHeads",
    246                 column: "UserId");
     246                column: "UserID");
    247247
    248248            migrationBuilder.CreateIndex(
Note: See TracChangeset for help on using the changeset viewer.