using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace VOL.Core.Migrations { public partial class init045 : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_Ai_SpecialUnit_Ai_Special_SpecialId", table: "Ai_SpecialUnit"); migrationBuilder.AlterColumn( name: "SpecialId", table: "Ai_SpecialUnit", type: "int", nullable: false, defaultValue: 0, comment: "专项Id", oldClrType: typeof(int), oldType: "int", oldNullable: true); migrationBuilder.AddColumn( name: "Subjects", table: "Ai_SpecialUnit", type: "int", nullable: false, defaultValue: 0, comment: "科目"); migrationBuilder.AddForeignKey( name: "FK_Ai_SpecialUnit_Ai_Special_SpecialId", table: "Ai_SpecialUnit", column: "SpecialId", principalTable: "Ai_Special", principalColumn: "Id", onDelete: ReferentialAction.Cascade); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_Ai_SpecialUnit_Ai_Special_SpecialId", table: "Ai_SpecialUnit"); migrationBuilder.DropColumn( name: "Subjects", table: "Ai_SpecialUnit"); migrationBuilder.AlterColumn( name: "SpecialId", table: "Ai_SpecialUnit", type: "int", nullable: true, oldClrType: typeof(int), oldType: "int", oldComment: "专项Id"); migrationBuilder.AddForeignKey( name: "FK_Ai_SpecialUnit_Ai_Special_SpecialId", table: "Ai_SpecialUnit", column: "SpecialId", principalTable: "Ai_Special", principalColumn: "Id"); } } }