using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace VOL.Core.Migrations { public partial class _20260722StudentPromotion : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "S_StudentPromotionBatch", columns: table => new { Id = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), SchoolCode = table.Column(type: "nvarchar(100)", nullable: true), SchoolNatureId = table.Column(type: "int", nullable: false), SchoolNatureName = table.Column(type: "nvarchar(100)", nullable: true), AcademicYear = table.Column(type: "nvarchar(20)", nullable: true), Status = table.Column(type: "int", nullable: false), PromotedCount = table.Column(type: "int", nullable: false), GraduatedCount = table.Column(type: "int", nullable: false), OperatorId = table.Column(type: "int", nullable: false), CreateDate = table.Column(type: "datetime", nullable: false), RevokeOperatorId = table.Column(type: "int", nullable: true), RevokeDate = table.Column(type: "datetime", nullable: true) }, constraints: table => { table.PrimaryKey("PK_S_StudentPromotionBatch", x => x.Id); }); migrationBuilder.CreateTable( name: "S_StudentPromotionDetail", columns: table => new { Id = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), BatchId = table.Column(type: "bigint", nullable: false), StudentId = table.Column(type: "int", nullable: false), OriginalClassId = table.Column(type: "int", nullable: false), OriginalClassName = table.Column(type: "nvarchar(100)", nullable: true), OriginalStatus = table.Column(type: "int", nullable: false), OriginalAge = table.Column(type: "int", nullable: false), TargetClassId = table.Column(type: "int", nullable: false), TargetClassName = table.Column(type: "nvarchar(100)", nullable: true), TargetStatus = table.Column(type: "int", nullable: false), TargetAge = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_S_StudentPromotionDetail", x => x.Id); }); migrationBuilder.CreateIndex( name: "IX_S_StudentPromotionBatch_SchoolCode_AcademicYear", table: "S_StudentPromotionBatch", columns: new[] { "SchoolCode", "AcademicYear" }); migrationBuilder.CreateIndex( name: "IX_S_StudentPromotionDetail_BatchId", table: "S_StudentPromotionDetail", column: "BatchId"); migrationBuilder.CreateIndex( name: "IX_S_StudentPromotionDetail_StudentId", table: "S_StudentPromotionDetail", column: "StudentId"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "S_StudentPromotionBatch"); migrationBuilder.DropTable( name: "S_StudentPromotionDetail"); } } }