using System; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace SystemRevivalServer.Migrations { /// public partial class TileBuildChanges : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "SocketConfigJson", table: "tile_templates", type: "json", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "socket_names", columns: table => new { Id = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), Description = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), UsageCount = table.Column(type: "int", nullable: false), CreatedAt = table.Column(type: "datetime(6)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_socket_names", x => x.Id); }) .Annotation("MySql:CharSet", "utf8mb4"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "socket_names"); migrationBuilder.DropColumn( name: "SocketConfigJson", table: "tile_templates"); } } }