From aee7e5ce82f9d2d0084bbc747de8d9ac001d8d71 Mon Sep 17 00:00:00 2001 From: Mahan Ch Date: Mon, 2 Jun 2025 19:47:45 +0330 Subject: [PATCH] add migration --- .../20250602161025_add offDays to cws.cs | 76 +------------------ 1 file changed, 1 insertion(+), 75 deletions(-) diff --git a/CompanyManagment.EFCore/Migrations/20250602161025_add offDays to cws.cs b/CompanyManagment.EFCore/Migrations/20250602161025_add offDays to cws.cs index 8e499797..2ff8a540 100644 --- a/CompanyManagment.EFCore/Migrations/20250602161025_add offDays to cws.cs +++ b/CompanyManagment.EFCore/Migrations/20250602161025_add offDays to cws.cs @@ -11,68 +11,6 @@ namespace CompanyManagment.EFCore.Migrations /// protected override void Up(MigrationBuilder migrationBuilder) { - migrationBuilder.AddColumn( - name: "EndDate", - table: "InsuranceJobItems", - type: "datetime2", - nullable: true); - - migrationBuilder.AddColumn( - name: "StartDate", - table: "InsuranceJobItems", - type: "datetime2", - nullable: true); - - migrationBuilder.CreateTable( - name: "CheckoutLoanInstallment", - columns: table => new - { - Checkoutid = table.Column(type: "bigint", nullable: false), - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - AmountForMonth = table.Column(type: "nvarchar(25)", maxLength: 25, nullable: true), - Month = table.Column(type: "nvarchar(2)", maxLength: 2, nullable: true), - Year = table.Column(type: "nvarchar(4)", maxLength: 4, nullable: true), - LoanRemaining = table.Column(type: "nvarchar(25)", maxLength: 25, nullable: true), - IsActive = table.Column(type: "nvarchar(5)", maxLength: 5, nullable: false), - LoanAmount = table.Column(type: "nvarchar(30)", maxLength: 30, nullable: true), - EntityId = table.Column(type: "bigint", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_CheckoutLoanInstallment", x => new { x.Checkoutid, x.Id }); - table.ForeignKey( - name: "FK_CheckoutLoanInstallment_Checkouts_Checkoutid", - column: x => x.Checkoutid, - principalTable: "Checkouts", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "CheckoutSalaryAid", - columns: table => new - { - Checkoutid = table.Column(type: "bigint", nullable: false), - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - Amount = table.Column(type: "nvarchar(25)", maxLength: 25, nullable: true), - SalaryAidDateTime = table.Column(type: "datetime2", nullable: false), - SalaryAidDateTimeFa = table.Column(type: "nvarchar(15)", maxLength: 15, nullable: true), - CalculationDateTime = table.Column(type: "datetime2", nullable: false), - CalculationDateTimeFa = table.Column(type: "nvarchar(15)", maxLength: 15, nullable: true), - EntityId = table.Column(type: "bigint", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_CheckoutSalaryAid", x => new { x.Checkoutid, x.Id }); - table.ForeignKey( - name: "FK_CheckoutSalaryAid_Checkouts_Checkoutid", - column: x => x.Checkoutid, - principalTable: "Checkouts", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); migrationBuilder.CreateTable( name: "CustomizeWorkshopEmployeeSettings_WeeklyOffDays", @@ -153,12 +91,7 @@ namespace CompanyManagment.EFCore.Migrations /// protected override void Down(MigrationBuilder migrationBuilder) { - migrationBuilder.DropTable( - name: "CheckoutLoanInstallment"); - - migrationBuilder.DropTable( - name: "CheckoutSalaryAid"); - + migrationBuilder.DropTable( name: "CustomizeWorkshopEmployeeSettings_WeeklyOffDays"); @@ -168,13 +101,6 @@ namespace CompanyManagment.EFCore.Migrations migrationBuilder.DropTable( name: "CustomizeWorkshopSettings_WeeklyOffDays"); - migrationBuilder.DropColumn( - name: "EndDate", - table: "InsuranceJobItems"); - - migrationBuilder.DropColumn( - name: "StartDate", - table: "InsuranceJobItems"); } } }