using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace CompanyManagment.EFCore.Migrations { /// public partial class addgroupingloanrewardSAfine : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.RenameColumn( name: "RewardedByAccountId", table: "Rewards", newName: "LastModifiedByAccountId"); migrationBuilder.AddColumn( name: "CreatedByAccountId", table: "SalaryAids", type: "bigint", nullable: false, defaultValue: 0L); migrationBuilder.AddColumn( name: "CreatedByUserType", table: "SalaryAids", type: "nvarchar(50)", maxLength: 50, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "LastModifiedByAccountId", table: "SalaryAids", type: "bigint", nullable: false, defaultValue: 0L); migrationBuilder.AddColumn( name: "LastModifiedByUserType", table: "SalaryAids", type: "nvarchar(50)", maxLength: 50, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "CreatedByAccountId", table: "Rewards", type: "bigint", nullable: false, defaultValue: 0L); migrationBuilder.AddColumn( name: "CreatedByUserType", table: "Rewards", type: "nvarchar(50)", maxLength: 50, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "LastModifiedByUserType", table: "Rewards", type: "nvarchar(50)", maxLength: 50, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "CreatedByAccountId", table: "Loan", type: "bigint", nullable: false, defaultValue: 0L); migrationBuilder.AddColumn( name: "CreatedByUserType", table: "Loan", type: "nvarchar(50)", maxLength: 50, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "CreatedByAccountId", table: "Fines", type: "bigint", nullable: false, defaultValue: 0L); migrationBuilder.AddColumn( name: "CreatedByUserType", table: "Fines", type: "nvarchar(50)", maxLength: 50, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "LastModifiedByAccountId", table: "Fines", type: "bigint", nullable: false, defaultValue: 0L); migrationBuilder.AddColumn( name: "LastModifiedByUserType", table: "Fines", type: "nvarchar(50)", maxLength: 50, nullable: false, defaultValue: ""); } /// 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"); } } }