using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Church.Net.DAL.EFCoreDBF.Migrations { public partial class AddMD2MobInfo : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Md2MobInfos", columns: table => new { Id = table.Column(type: "uuid", nullable: false, defaultValueSql: "uuid_generate_v4()"), Type = table.Column(type: "integer", nullable: false), From = table.Column(type: "integer", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Md2MobInfos", x => x.Id); }); migrationBuilder.CreateTable( name: "Md2MobLevelInfos", columns: table => new { Id = table.Column(type: "uuid", nullable: false, defaultValueSql: "uuid_generate_v4()"), MobInfoId = table.Column(type: "uuid", nullable: false), MobInfoId1 = table.Column(type: "uuid", nullable: false), MobInfoId2 = table.Column(type: "uuid", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Md2MobLevelInfos", x => x.Id); table.ForeignKey( name: "FK_Md2MobLevelInfos_Md2MobInfos_MobInfoId", column: x => x.MobInfoId, principalTable: "Md2MobInfos", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_Md2MobLevelInfos_Md2MobInfos_MobInfoId1", column: x => x.MobInfoId1, principalTable: "Md2MobInfos", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "IX_Md2MobLevelInfos_MobInfoId", table: "Md2MobLevelInfos", column: "MobInfoId"); migrationBuilder.CreateIndex( name: "IX_Md2MobLevelInfos_MobInfoId1", table: "Md2MobLevelInfos", column: "MobInfoId1"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Md2MobLevelInfos"); migrationBuilder.DropTable( name: "Md2MobInfos"); } } }