185 lines
6.1 KiB
C#
185 lines
6.1 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace CompanyManagment.EFCore.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class addcalculationdatetosalaryaidandaddentityidtocustomizecheckoutvalueobjects : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<DateTime>(
|
|
name: "CalculationDate",
|
|
table: "SalaryAids",
|
|
type: "datetime2",
|
|
nullable: false,
|
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "CalculationMonth",
|
|
table: "SalaryAids",
|
|
type: "int",
|
|
nullable: false,
|
|
defaultValue: 0);
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "CalculationYear",
|
|
table: "SalaryAids",
|
|
type: "int",
|
|
nullable: false,
|
|
defaultValue: 0);
|
|
|
|
migrationBuilder.AddColumn<DateTime>(
|
|
name: "CalculationDateTime",
|
|
table: "CustomizeCheckoutTempSalaryAid",
|
|
type: "datetime2",
|
|
nullable: false,
|
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "CalculationDateTimeFa",
|
|
table: "CustomizeCheckoutTempSalaryAid",
|
|
type: "nvarchar(15)",
|
|
maxLength: 15,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<long>(
|
|
name: "EntityId",
|
|
table: "CustomizeCheckoutTempSalaryAid",
|
|
type: "bigint",
|
|
nullable: false,
|
|
defaultValue: 0L);
|
|
|
|
migrationBuilder.AddColumn<long>(
|
|
name: "EntityId",
|
|
table: "CustomizeCheckoutTempReward",
|
|
type: "bigint",
|
|
nullable: false,
|
|
defaultValue: 0L);
|
|
|
|
migrationBuilder.AddColumn<long>(
|
|
name: "EntityId",
|
|
table: "CustomizeCheckoutTempLoanInstallments",
|
|
type: "bigint",
|
|
nullable: false,
|
|
defaultValue: 0L);
|
|
|
|
migrationBuilder.AddColumn<long>(
|
|
name: "EntityId",
|
|
table: "CustomizeCheckoutTempFine",
|
|
type: "bigint",
|
|
nullable: false,
|
|
defaultValue: 0L);
|
|
|
|
migrationBuilder.AddColumn<DateTime>(
|
|
name: "CalculationDateTime",
|
|
table: "CustomizeCheckoutSalaryAid",
|
|
type: "datetime2",
|
|
nullable: false,
|
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "CalculationDateTimeFa",
|
|
table: "CustomizeCheckoutSalaryAid",
|
|
type: "nvarchar(15)",
|
|
maxLength: 15,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<long>(
|
|
name: "EntityId",
|
|
table: "CustomizeCheckoutSalaryAid",
|
|
type: "bigint",
|
|
nullable: false,
|
|
defaultValue: 0L);
|
|
|
|
migrationBuilder.AddColumn<long>(
|
|
name: "EntityId",
|
|
table: "CustomizeCheckoutReward",
|
|
type: "bigint",
|
|
nullable: false,
|
|
defaultValue: 0L);
|
|
|
|
migrationBuilder.AddColumn<long>(
|
|
name: "EntityId",
|
|
table: "CustomizeCheckoutLoanInstallments",
|
|
type: "bigint",
|
|
nullable: false,
|
|
defaultValue: 0L);
|
|
|
|
migrationBuilder.AddColumn<long>(
|
|
name: "EntityId",
|
|
table: "CustomizeCheckoutFine",
|
|
type: "bigint",
|
|
nullable: false,
|
|
defaultValue: 0L);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "CalculationDate",
|
|
table: "SalaryAids");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "CalculationMonth",
|
|
table: "SalaryAids");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "CalculationYear",
|
|
table: "SalaryAids");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "CalculationDateTime",
|
|
table: "CustomizeCheckoutTempSalaryAid");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "CalculationDateTimeFa",
|
|
table: "CustomizeCheckoutTempSalaryAid");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "EntityId",
|
|
table: "CustomizeCheckoutTempSalaryAid");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "EntityId",
|
|
table: "CustomizeCheckoutTempReward");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "EntityId",
|
|
table: "CustomizeCheckoutTempLoanInstallments");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "EntityId",
|
|
table: "CustomizeCheckoutTempFine");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "CalculationDateTime",
|
|
table: "CustomizeCheckoutSalaryAid");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "CalculationDateTimeFa",
|
|
table: "CustomizeCheckoutSalaryAid");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "EntityId",
|
|
table: "CustomizeCheckoutSalaryAid");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "EntityId",
|
|
table: "CustomizeCheckoutReward");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "EntityId",
|
|
table: "CustomizeCheckoutLoanInstallments");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "EntityId",
|
|
table: "CustomizeCheckoutFine");
|
|
}
|
|
}
|
|
}
|