using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace SystemRevivalServer.Migrations { /// public partial class DungeonBrowser : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "dungeon_instances", columns: table => new { Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), Tier = table.Column(type: "int", nullable: false), Seed = table.Column(type: "int", nullable: false), LevelBracketMin = table.Column(type: "int", nullable: false), LevelBracketMax = table.Column(type: "int", nullable: false), CreatorCharacterId = table.Column(type: "bigint unsigned", nullable: false), CreatorName = table.Column(type: "longtext", nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), CreatorLevel = table.Column(type: "int", nullable: false), CreatedAt = table.Column(type: "datetime(6)", nullable: false), LastActivity = table.Column(type: "datetime(6)", nullable: false), PersistedAt = table.Column(type: "datetime(6)", nullable: true), BossKilled = table.Column(type: "tinyint(1)", nullable: false), IsCleared = table.Column(type: "tinyint(1)", nullable: false), MobStateJson = table.Column(type: "json", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), ChestStateJson = table.Column(type: "json", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), LootChestStateJson = table.Column(type: "json", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), CreatorId = table.Column(type: "bigint unsigned", nullable: true) }, constraints: table => { table.PrimaryKey("PK_dungeon_instances", x => x.Id); table.ForeignKey( name: "FK_dungeon_instances_dungeon_characters_CreatorId", column: x => x.CreatorId, principalTable: "dungeon_characters", principalColumn: "Id"); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateIndex( name: "IX_dungeon_instances_CreatorId", table: "dungeon_instances", column: "CreatorId"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "dungeon_instances"); } } }