using System; using Microsoft.EntityFrameworkCore.Migrations; namespace tb320eva.Migrations { public partial class FirstInitial : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "eva_performance_plan", columns: table => new { id = table.Column(nullable: false), created = table.Column(nullable: false), updated = table.Column(nullable: false), isActive = table.Column(nullable: false), fiscal_year = table.Column(nullable: true), theTime = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_eva_performance_plan", x => x.id); }); migrationBuilder.CreateTable( name: "eva_performance_plan_detail", columns: table => new { id = table.Column(nullable: false), created = table.Column(nullable: false), updated = table.Column(nullable: false), isActive = table.Column(nullable: false), performance_plan_id = table.Column(nullable: true), list_no = table.Column(nullable: true), step = table.Column(maxLength: 1000, nullable: true), start_date = table.Column(nullable: true), end_date = table.Column(nullable: true), remark = table.Column(maxLength: 1000, nullable: true) }, constraints: table => { table.PrimaryKey("PK_eva_performance_plan_detail", x => x.id); table.ForeignKey( name: "FK_eva_performance_plan_detail_eva_performance_plan_performanc~", column: x => x.performance_plan_id, principalTable: "eva_performance_plan", principalColumn: "id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateIndex( name: "IX_eva_performance_plan_detail_performance_plan_id", table: "eva_performance_plan_detail", column: "performance_plan_id"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "eva_performance_plan_detail"); migrationBuilder.DropTable( name: "eva_performance_plan"); } } }