179 lines
5.5 KiB
C#
179 lines
5.5 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace CompanyManagment.EFCore.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class addgroupingloanrewardSAfine : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.RenameColumn(
|
|
name: "RewardedByAccountId",
|
|
table: "Rewards",
|
|
newName: "LastModifiedByAccountId");
|
|
|
|
migrationBuilder.AddColumn<long>(
|
|
name: "CreatedByAccountId",
|
|
table: "SalaryAids",
|
|
type: "bigint",
|
|
nullable: false,
|
|
defaultValue: 0L);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "CreatedByUserType",
|
|
table: "SalaryAids",
|
|
type: "nvarchar(50)",
|
|
maxLength: 50,
|
|
nullable: false,
|
|
defaultValue: "");
|
|
|
|
migrationBuilder.AddColumn<long>(
|
|
name: "LastModifiedByAccountId",
|
|
table: "SalaryAids",
|
|
type: "bigint",
|
|
nullable: false,
|
|
defaultValue: 0L);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "LastModifiedByUserType",
|
|
table: "SalaryAids",
|
|
type: "nvarchar(50)",
|
|
maxLength: 50,
|
|
nullable: false,
|
|
defaultValue: "");
|
|
|
|
migrationBuilder.AddColumn<long>(
|
|
name: "CreatedByAccountId",
|
|
table: "Rewards",
|
|
type: "bigint",
|
|
nullable: false,
|
|
defaultValue: 0L);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "CreatedByUserType",
|
|
table: "Rewards",
|
|
type: "nvarchar(50)",
|
|
maxLength: 50,
|
|
nullable: false,
|
|
defaultValue: "");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "LastModifiedByUserType",
|
|
table: "Rewards",
|
|
type: "nvarchar(50)",
|
|
maxLength: 50,
|
|
nullable: false,
|
|
defaultValue: "");
|
|
|
|
migrationBuilder.AddColumn<long>(
|
|
name: "CreatedByAccountId",
|
|
table: "Loan",
|
|
type: "bigint",
|
|
nullable: false,
|
|
defaultValue: 0L);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "CreatedByUserType",
|
|
table: "Loan",
|
|
type: "nvarchar(50)",
|
|
maxLength: 50,
|
|
nullable: false,
|
|
defaultValue: "");
|
|
|
|
migrationBuilder.AddColumn<long>(
|
|
name: "CreatedByAccountId",
|
|
table: "Fines",
|
|
type: "bigint",
|
|
nullable: false,
|
|
defaultValue: 0L);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "CreatedByUserType",
|
|
table: "Fines",
|
|
type: "nvarchar(50)",
|
|
maxLength: 50,
|
|
nullable: false,
|
|
defaultValue: "");
|
|
|
|
migrationBuilder.AddColumn<long>(
|
|
name: "LastModifiedByAccountId",
|
|
table: "Fines",
|
|
type: "bigint",
|
|
nullable: false,
|
|
defaultValue: 0L);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "LastModifiedByUserType",
|
|
table: "Fines",
|
|
type: "nvarchar(50)",
|
|
maxLength: 50,
|
|
nullable: false,
|
|
defaultValue: "");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "CreatedByAccountId",
|
|
table: "SalaryAids");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "CreatedByUserType",
|
|
table: "SalaryAids");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "LastModifiedByAccountId",
|
|
table: "SalaryAids");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "LastModifiedByUserType",
|
|
table: "SalaryAids");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "CreatedByAccountId",
|
|
table: "Rewards");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "CreatedByUserType",
|
|
table: "Rewards");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "LastModifiedByUserType",
|
|
table: "Rewards");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "CreatedByAccountId",
|
|
table: "Loan");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "CreatedByUserType",
|
|
table: "Loan");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "CreatedByAccountId",
|
|
table: "Fines");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "CreatedByUserType",
|
|
table: "Fines");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "LastModifiedByAccountId",
|
|
table: "Fines");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "LastModifiedByUserType",
|
|
table: "Fines");
|
|
|
|
migrationBuilder.RenameColumn(
|
|
name: "LastModifiedByAccountId",
|
|
table: "Rewards",
|
|
newName: "RewardedByAccountId");
|
|
}
|
|
}
|
|
}
|