using System; using Microsoft.EntityFrameworkCore.Migrations; namespace tb320eva.Migrations { public partial class evaluation_create : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "eva_create_evaluation", 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), employee_id = table.Column(nullable: true), score1 = table.Column(nullable: true), score2 = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_eva_create_evaluation", x => x.id); table.ForeignKey( name: "FK_eva_create_evaluation_eva_performance_plan_performance_plan~", column: x => x.performance_plan_id, principalTable: "eva_performance_plan", principalColumn: "id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "eva_create_evaluation_detail", columns: table => new { id = table.Column(nullable: false), created = table.Column(nullable: false), updated = table.Column(nullable: false), isActive = table.Column(nullable: false), create_evaluation_id = table.Column(nullable: true), employee_id = table.Column(nullable: true), chief = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_eva_create_evaluation_detail", x => x.id); }); migrationBuilder.CreateIndex( name: "IX_eva_create_evaluation_performance_plan_id", table: "eva_create_evaluation", column: "performance_plan_id"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "eva_create_evaluation"); migrationBuilder.DropTable( name: "eva_create_evaluation_detail"); } } }