using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace YD_WeChatApplet.Api.Migrations { public partial class _20250528v1 : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.Sql(@" IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'TestTable') BEGIN DROP TABLE [TestTable]; END "); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "TestTable", columns: table => new { Id = table.Column(type: "int", nullable: false, comment: "Id") .Annotation("SqlServer:Identity", "1, 1"), Json = table.Column(type: "nvarchar(100)", nullable: false, comment: "Json"), Name = table.Column(type: "nvarchar(100)", nullable: false, comment: "Name") }, constraints: table => { table.PrimaryKey("PK_TestTable", x => x.Id); }); } } }