123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237 |
- using Microsoft.EntityFrameworkCore.Migrations;
- #nullable disable
- namespace MTWorkHR.Infrastructure.Migrations
- {
- /// <inheritdoc />
- public partial class altrUserRelation : Migration
- {
- /// <inheritdoc />
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.AlterColumn<long>(
- name: "UniversityId",
- table: "AspNetUsers",
- type: "bigint",
- nullable: true,
- oldClrType: typeof(int),
- oldType: "int",
- oldNullable: true);
- migrationBuilder.AlterColumn<long>(
- name: "QualificationId",
- table: "AspNetUsers",
- type: "bigint",
- nullable: true,
- oldClrType: typeof(int),
- oldType: "int",
- oldNullable: true);
- migrationBuilder.AlterColumn<long>(
- name: "JobTitleId",
- table: "AspNetUsers",
- type: "bigint",
- nullable: true,
- oldClrType: typeof(int),
- oldType: "int",
- oldNullable: true);
- migrationBuilder.AlterColumn<long>(
- name: "IndustryId",
- table: "AspNetUsers",
- type: "bigint",
- nullable: true,
- oldClrType: typeof(int),
- oldType: "int",
- oldNullable: true);
- migrationBuilder.AlterColumn<long>(
- name: "CountryId",
- table: "AspNetUsers",
- type: "bigint",
- nullable: true,
- oldClrType: typeof(int),
- oldType: "int",
- oldNullable: true);
- migrationBuilder.UpdateData(
- table: "AspNetUsers",
- keyColumn: "Id",
- keyValue: "ADMB3B92-2311-48F8-9DEC-F9FAEF1F21UA",
- columns: new[] { "CountryId", "IndustryId", "JobTitleId", "QualificationId", "UniversityId" },
- values: new object[] { null, null, null, null, null });
- migrationBuilder.UpdateData(
- table: "AspNetUsers",
- keyColumn: "Id",
- keyValue: "AL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB",
- columns: new[] { "CountryId", "IndustryId", "JobTitleId", "QualificationId", "UniversityId" },
- values: new object[] { null, null, null, null, null });
- migrationBuilder.CreateIndex(
- name: "IX_AspNetUsers_CountryId",
- table: "AspNetUsers",
- column: "CountryId");
- migrationBuilder.CreateIndex(
- name: "IX_AspNetUsers_IndustryId",
- table: "AspNetUsers",
- column: "IndustryId");
- migrationBuilder.CreateIndex(
- name: "IX_AspNetUsers_JobTitleId",
- table: "AspNetUsers",
- column: "JobTitleId");
- migrationBuilder.CreateIndex(
- name: "IX_AspNetUsers_QualificationId",
- table: "AspNetUsers",
- column: "QualificationId");
- migrationBuilder.CreateIndex(
- name: "IX_AspNetUsers_UniversityId",
- table: "AspNetUsers",
- column: "UniversityId");
- migrationBuilder.AddForeignKey(
- name: "FK_AspNetUsers_CountryLookups_CountryId",
- table: "AspNetUsers",
- column: "CountryId",
- principalTable: "CountryLookups",
- principalColumn: "Id");
- migrationBuilder.AddForeignKey(
- name: "FK_AspNetUsers_Industries_IndustryId",
- table: "AspNetUsers",
- column: "IndustryId",
- principalTable: "Industries",
- principalColumn: "Id");
- migrationBuilder.AddForeignKey(
- name: "FK_AspNetUsers_JobTitles_JobTitleId",
- table: "AspNetUsers",
- column: "JobTitleId",
- principalTable: "JobTitles",
- principalColumn: "Id");
- migrationBuilder.AddForeignKey(
- name: "FK_AspNetUsers_Qualifications_QualificationId",
- table: "AspNetUsers",
- column: "QualificationId",
- principalTable: "Qualifications",
- principalColumn: "Id");
- migrationBuilder.AddForeignKey(
- name: "FK_AspNetUsers_Universities_UniversityId",
- table: "AspNetUsers",
- column: "UniversityId",
- principalTable: "Universities",
- principalColumn: "Id");
- }
- /// <inheritdoc />
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropForeignKey(
- name: "FK_AspNetUsers_CountryLookups_CountryId",
- table: "AspNetUsers");
- migrationBuilder.DropForeignKey(
- name: "FK_AspNetUsers_Industries_IndustryId",
- table: "AspNetUsers");
- migrationBuilder.DropForeignKey(
- name: "FK_AspNetUsers_JobTitles_JobTitleId",
- table: "AspNetUsers");
- migrationBuilder.DropForeignKey(
- name: "FK_AspNetUsers_Qualifications_QualificationId",
- table: "AspNetUsers");
- migrationBuilder.DropForeignKey(
- name: "FK_AspNetUsers_Universities_UniversityId",
- table: "AspNetUsers");
- migrationBuilder.DropIndex(
- name: "IX_AspNetUsers_CountryId",
- table: "AspNetUsers");
- migrationBuilder.DropIndex(
- name: "IX_AspNetUsers_IndustryId",
- table: "AspNetUsers");
- migrationBuilder.DropIndex(
- name: "IX_AspNetUsers_JobTitleId",
- table: "AspNetUsers");
- migrationBuilder.DropIndex(
- name: "IX_AspNetUsers_QualificationId",
- table: "AspNetUsers");
- migrationBuilder.DropIndex(
- name: "IX_AspNetUsers_UniversityId",
- table: "AspNetUsers");
- migrationBuilder.AlterColumn<int>(
- name: "UniversityId",
- table: "AspNetUsers",
- type: "int",
- nullable: true,
- oldClrType: typeof(long),
- oldType: "bigint",
- oldNullable: true);
- migrationBuilder.AlterColumn<int>(
- name: "QualificationId",
- table: "AspNetUsers",
- type: "int",
- nullable: true,
- oldClrType: typeof(long),
- oldType: "bigint",
- oldNullable: true);
- migrationBuilder.AlterColumn<int>(
- name: "JobTitleId",
- table: "AspNetUsers",
- type: "int",
- nullable: true,
- oldClrType: typeof(long),
- oldType: "bigint",
- oldNullable: true);
- migrationBuilder.AlterColumn<int>(
- name: "IndustryId",
- table: "AspNetUsers",
- type: "int",
- nullable: true,
- oldClrType: typeof(long),
- oldType: "bigint",
- oldNullable: true);
- migrationBuilder.AlterColumn<int>(
- name: "CountryId",
- table: "AspNetUsers",
- type: "int",
- nullable: true,
- oldClrType: typeof(long),
- oldType: "bigint",
- oldNullable: true);
- migrationBuilder.UpdateData(
- table: "AspNetUsers",
- keyColumn: "Id",
- keyValue: "ADMB3B92-2311-48F8-9DEC-F9FAEF1F21UA",
- columns: new[] { "CountryId", "IndustryId", "JobTitleId", "QualificationId", "UniversityId" },
- values: new object[] { null, null, null, 1, null });
- migrationBuilder.UpdateData(
- table: "AspNetUsers",
- keyColumn: "Id",
- keyValue: "AL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB",
- columns: new[] { "CountryId", "IndustryId", "JobTitleId", "QualificationId", "UniversityId" },
- values: new object[] { null, null, null, 1, null });
- }
- }
- }
|