using System; using Microsoft.EntityFrameworkCore.Migrations; namespace tb320eva.Migrations { public partial class AddLimitFrame : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "eva_limit_frame_plan", columns: table => new { id = table.Column(nullable: false), created = table.Column(nullable: false), updated = table.Column(nullable: false), isActive = table.Column(nullable: false), plan_guid = table.Column(nullable: true), executed_date = table.Column(nullable: true), limit_frame_005 = table.Column(nullable: true), status_self = table.Column(maxLength: 1, nullable: true), status_chief = table.Column(maxLength: 1, nullable: true), supervisor1 = table.Column(nullable: true), supervisor1_result = table.Column(maxLength: 1, nullable: true), supervisor1_remark = table.Column(maxLength: 1000, nullable: true), supervisor1_date = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_eva_limit_frame_plan", x => x.id); table.ForeignKey( name: "FK_eva_limit_frame_plan_eva_performance_plan_plan_guid", column: x => x.plan_guid, principalTable: "eva_performance_plan", principalColumn: "id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "eva_limit_frame_group", columns: table => new { id = table.Column(nullable: false), created = table.Column(nullable: false), updated = table.Column(nullable: false), isActive = table.Column(nullable: false), frame_plan_guid = table.Column(nullable: true), group_guid = table.Column(nullable: true), limit_frame_295 = table.Column(nullable: true), total_salary = table.Column(nullable: true), total_salary_limit = table.Column(nullable: true), total_salary_limit_rounded = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_eva_limit_frame_group", x => x.id); table.ForeignKey( name: "FK_eva_limit_frame_group_eva_limit_frame_plan_frame_plan_guid", column: x => x.frame_plan_guid, principalTable: "eva_limit_frame_plan", principalColumn: "id", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_eva_limit_frame_group_eva_evaluation_group_group_guid", column: x => x.group_guid, principalTable: "eva_evaluation_group", principalColumn: "id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "eva_limit_frame_employee", columns: table => new { id = table.Column(nullable: false), created = table.Column(nullable: false), updated = table.Column(nullable: false), isActive = table.Column(nullable: false), frame_group_guid = table.Column(nullable: true), employee_id = table.Column(nullable: true), org_id = table.Column(nullable: true), position_id = table.Column(nullable: true), level_id = table.Column(nullable: true), salary = table.Column(nullable: true), position_allowance = table.Column(nullable: true), monthly_remuneration = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_eva_limit_frame_employee", x => x.id); table.ForeignKey( name: "FK_eva_limit_frame_employee_eva_limit_frame_group_frame_group_~", column: x => x.frame_group_guid, principalTable: "eva_limit_frame_group", principalColumn: "id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateIndex( name: "IX_eva_limit_frame_employee_frame_group_guid", table: "eva_limit_frame_employee", column: "frame_group_guid"); migrationBuilder.CreateIndex( name: "IX_eva_limit_frame_group_frame_plan_guid", table: "eva_limit_frame_group", column: "frame_plan_guid"); migrationBuilder.CreateIndex( name: "IX_eva_limit_frame_group_group_guid", table: "eva_limit_frame_group", column: "group_guid"); migrationBuilder.CreateIndex( name: "IX_eva_limit_frame_plan_plan_guid", table: "eva_limit_frame_plan", column: "plan_guid"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "eva_limit_frame_employee"); migrationBuilder.DropTable( name: "eva_limit_frame_group"); migrationBuilder.DropTable( name: "eva_limit_frame_plan"); } } }