fix migration problem
This commit is contained in:
parent
5bb6cfbee8
commit
2267d1236a
4 changed files with 31 additions and 139 deletions
|
|
@ -12,8 +12,8 @@ using Oracle.EntityFrameworkCore.Metadata;
|
||||||
namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
||||||
{
|
{
|
||||||
[DbContext(typeof(ApplicationDBContext))]
|
[DbContext(typeof(ApplicationDBContext))]
|
||||||
[Migration("20240503070505_Init Oracle Project")]
|
[Migration("20240503074712_Init for Oracle")]
|
||||||
partial class InitOracleProject
|
partial class InitforOracle
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
|
@ -10096,7 +10096,10 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
||||||
|
|
||||||
b.HasIndex("PositionEmployeeLevelId");
|
b.HasIndex("PositionEmployeeLevelId");
|
||||||
|
|
||||||
b.ToTable("OrganizationPositionEmployeeLevels");
|
b.ToTable("OrganizationPositionEmployeeLevels", t =>
|
||||||
|
{
|
||||||
|
t.ExcludeFromMigrations();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b =>
|
modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b =>
|
||||||
|
|
@ -10158,7 +10161,10 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
||||||
|
|
||||||
b.HasIndex("PositionEmployeePositionSideId");
|
b.HasIndex("PositionEmployeePositionSideId");
|
||||||
|
|
||||||
b.ToTable("OrganizationPositionEmployeePositionSides");
|
b.ToTable("OrganizationPositionEmployeePositionSides", t =>
|
||||||
|
{
|
||||||
|
t.ExcludeFromMigrations();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b =>
|
modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b =>
|
||||||
|
|
@ -10763,7 +10769,10 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
||||||
|
|
||||||
b.HasIndex("PositionMasterEntityId");
|
b.HasIndex("PositionMasterEntityId");
|
||||||
|
|
||||||
b.ToTable("PositionMasterHistoryEntity");
|
b.ToTable("PositionMasterHistoryEntity", t =>
|
||||||
|
{
|
||||||
|
t.ExcludeFromMigrations();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b =>
|
modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b =>
|
||||||
|
|
@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class InitOracleProject : Migration
|
public partial class InitforOracle : Migration
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
|
@ -248,64 +248,6 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
||||||
table.PrimaryKey("PK_Notifications", x => x.Id);
|
table.PrimaryKey("PK_Notifications", x => x.Id);
|
||||||
});
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "OrganizationPositionEmployeeLevels",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "RAW(16)", nullable: false, comment: "PrimaryKey"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"),
|
|
||||||
OrganizationEmployeeId = table.Column<Guid>(type: "RAW(16)", nullable: true),
|
|
||||||
PositionEmployeeLevelId = table.Column<Guid>(type: "RAW(16)", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_OrganizationPositionEmployeeLevels", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_OrganizationPositionEmployeeLevels_OrganizationEmployees_OrganizationEmployeeId",
|
|
||||||
column: x => x.OrganizationEmployeeId,
|
|
||||||
principalTable: "OrganizationEmployees",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_OrganizationPositionEmployeeLevels_PositionEmployeeLevels_PositionEmployeeLevelId",
|
|
||||||
column: x => x.PositionEmployeeLevelId,
|
|
||||||
principalTable: "PositionEmployeeLevels",
|
|
||||||
principalColumn: "Id");
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "OrganizationPositionEmployeePositionSides",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "RAW(16)", nullable: false, comment: "PrimaryKey"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"),
|
|
||||||
OrganizationEmployeeId = table.Column<Guid>(type: "RAW(16)", nullable: true),
|
|
||||||
PositionEmployeePositionSideId = table.Column<Guid>(type: "RAW(16)", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_OrganizationPositionEmployeePositionSides", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_OrganizationPositionEmployeePositionSides_OrganizationEmployees_OrganizationEmployeeId",
|
|
||||||
column: x => x.OrganizationEmployeeId,
|
|
||||||
principalTable: "OrganizationEmployees",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_OrganizationPositionEmployeePositionSides_PositionEmployeePositionSides_PositionEmployeePositionSideId",
|
|
||||||
column: x => x.PositionEmployeePositionSideId,
|
|
||||||
principalTable: "PositionEmployeePositionSides",
|
|
||||||
principalColumn: "Id");
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "PlacementIsProperties",
|
name: "PlacementIsProperties",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
|
|
@ -695,44 +637,6 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
||||||
table.PrimaryKey("PK_PlacementTypes", x => x.Id);
|
table.PrimaryKey("PK_PlacementTypes", x => x.Id);
|
||||||
});
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "PositionMasterHistoryEntity",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "RAW(16)", nullable: false, comment: "PrimaryKey"),
|
|
||||||
Position = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true, comment: "Position"),
|
|
||||||
PositionPath = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true, comment: "PositionPath"),
|
|
||||||
PositionType = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true, comment: "PositionType"),
|
|
||||||
PositionExecutive = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true, comment: "PositionExecutive"),
|
|
||||||
PositionExecutiveSide = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true, comment: "PositionExecutiveSide"),
|
|
||||||
PositionPathSide = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true, comment: "PositionPathSide"),
|
|
||||||
PositionLine = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true, comment: "PositionLine"),
|
|
||||||
PositionStatus = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true, comment: "PositionStatus"),
|
|
||||||
PositionCondition = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true, comment: "PositionCondition"),
|
|
||||||
PositionLevel = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true, comment: "PositionLevel"),
|
|
||||||
PositionMasterUserNote = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true, comment: "PositionMasterUserNote"),
|
|
||||||
IsDirector = table.Column<bool>(type: "NUMBER(1)", nullable: true, comment: "IsDirector"),
|
|
||||||
Qualification = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true, comment: "คุณวุฒิ"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"),
|
|
||||||
PositionMasterEntityId = table.Column<Guid>(type: "RAW(16)", nullable: true),
|
|
||||||
PositionPathSideObject = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true),
|
|
||||||
PositionExecutiveSideObject = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_PositionMasterHistoryEntity", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PositionMasterHistoryEntity_PositionMasters_PositionMasterEntityId",
|
|
||||||
column: x => x.PositionMasterEntityId,
|
|
||||||
principalTable: "PositionMasters",
|
|
||||||
principalColumn: "Id");
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "RetirementDeceaseds",
|
name: "RetirementDeceaseds",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
|
|
@ -2580,26 +2484,6 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
||||||
table: "InsigniaRequests",
|
table: "InsigniaRequests",
|
||||||
column: "PeriodId");
|
column: "PeriodId");
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_OrganizationPositionEmployeeLevels_OrganizationEmployeeId",
|
|
||||||
table: "OrganizationPositionEmployeeLevels",
|
|
||||||
column: "OrganizationEmployeeId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_OrganizationPositionEmployeeLevels_PositionEmployeeLevelId",
|
|
||||||
table: "OrganizationPositionEmployeeLevels",
|
|
||||||
column: "PositionEmployeeLevelId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_OrganizationPositionEmployeePositionSides_OrganizationEmployeeId",
|
|
||||||
table: "OrganizationPositionEmployeePositionSides",
|
|
||||||
column: "OrganizationEmployeeId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_OrganizationPositionEmployeePositionSides_PositionEmployeePositionSideId",
|
|
||||||
table: "OrganizationPositionEmployeePositionSides",
|
|
||||||
column: "PositionEmployeePositionSideId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_PlacementAppointmentDocs_DocumentId",
|
name: "IX_PlacementAppointmentDocs_DocumentId",
|
||||||
table: "PlacementAppointmentDocs",
|
table: "PlacementAppointmentDocs",
|
||||||
|
|
@ -2910,11 +2794,6 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
||||||
table: "PlacementTransfers",
|
table: "PlacementTransfers",
|
||||||
column: "ProfileId");
|
column: "ProfileId");
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PositionMasterHistoryEntity_PositionMasterEntityId",
|
|
||||||
table: "PositionMasterHistoryEntity",
|
|
||||||
column: "PositionMasterEntityId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_RetirementDeceasedNotis_DocumentId",
|
name: "IX_RetirementDeceasedNotis_DocumentId",
|
||||||
table: "RetirementDeceasedNotis",
|
table: "RetirementDeceasedNotis",
|
||||||
|
|
@ -3047,12 +2926,6 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "Notifications");
|
name: "Notifications");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "OrganizationPositionEmployeeLevels");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "OrganizationPositionEmployeePositionSides");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "PlacementAppointmentDocs");
|
name: "PlacementAppointmentDocs");
|
||||||
|
|
||||||
|
|
@ -3083,9 +2956,6 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "PlacementTransferDocs");
|
name: "PlacementTransferDocs");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "PositionMasterHistoryEntity");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "RetirementDeceasedNotis");
|
name: "RetirementDeceasedNotis");
|
||||||
|
|
||||||
|
|
@ -10093,7 +10093,10 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
||||||
|
|
||||||
b.HasIndex("PositionEmployeeLevelId");
|
b.HasIndex("PositionEmployeeLevelId");
|
||||||
|
|
||||||
b.ToTable("OrganizationPositionEmployeeLevels");
|
b.ToTable("OrganizationPositionEmployeeLevels", t =>
|
||||||
|
{
|
||||||
|
t.ExcludeFromMigrations();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b =>
|
modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b =>
|
||||||
|
|
@ -10155,7 +10158,10 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
||||||
|
|
||||||
b.HasIndex("PositionEmployeePositionSideId");
|
b.HasIndex("PositionEmployeePositionSideId");
|
||||||
|
|
||||||
b.ToTable("OrganizationPositionEmployeePositionSides");
|
b.ToTable("OrganizationPositionEmployeePositionSides", t =>
|
||||||
|
{
|
||||||
|
t.ExcludeFromMigrations();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b =>
|
modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b =>
|
||||||
|
|
@ -10760,7 +10766,10 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
||||||
|
|
||||||
b.HasIndex("PositionMasterEntityId");
|
b.HasIndex("PositionMasterEntityId");
|
||||||
|
|
||||||
b.ToTable("PositionMasterHistoryEntity");
|
b.ToTable("PositionMasterHistoryEntity", t =>
|
||||||
|
{
|
||||||
|
t.ExcludeFromMigrations();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b =>
|
modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b =>
|
||||||
|
|
|
||||||
|
|
@ -414,6 +414,10 @@ namespace BMA.EHR.Infrastructure.Persistence
|
||||||
modelBuilder.Entity<PositionMasterEntity>().Metadata.SetIsTableExcludedFromMigrations(true);
|
modelBuilder.Entity<PositionMasterEntity>().Metadata.SetIsTableExcludedFromMigrations(true);
|
||||||
modelBuilder.Entity<PositionNumberEntity>().Metadata.SetIsTableExcludedFromMigrations(true);
|
modelBuilder.Entity<PositionNumberEntity>().Metadata.SetIsTableExcludedFromMigrations(true);
|
||||||
modelBuilder.Entity<ProfilePosition>().Metadata.SetIsTableExcludedFromMigrations(true);
|
modelBuilder.Entity<ProfilePosition>().Metadata.SetIsTableExcludedFromMigrations(true);
|
||||||
|
modelBuilder.Entity<PositionMasterHistoryEntity>().Metadata.SetIsTableExcludedFromMigrations(true);
|
||||||
|
|
||||||
|
modelBuilder.Entity<OrganizationPositionEmployeeLevel>().Metadata.SetIsTableExcludedFromMigrations(true);
|
||||||
|
modelBuilder.Entity<OrganizationPositionEmployeePositionSide>().Metadata.SetIsTableExcludedFromMigrations(true);
|
||||||
|
|
||||||
modelBuilder.Entity<Report2>().Metadata.SetIsTableExcludedFromMigrations(true);
|
modelBuilder.Entity<Report2>().Metadata.SetIsTableExcludedFromMigrations(true);
|
||||||
modelBuilder.Entity<Report2History>().Metadata.SetIsTableExcludedFromMigrations(true);
|
modelBuilder.Entity<Report2History>().Metadata.SetIsTableExcludedFromMigrations(true);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue