CDN Integration
This commit is contained in:
@@ -0,0 +1,161 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace SystemRevivalServer.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class CDNIntegration : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "AttackFrames",
|
||||
table: "dungeon_mob_definitions");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DeathFrames",
|
||||
table: "dungeon_mob_definitions");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IdleFrames",
|
||||
table: "dungeon_mob_definitions");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SpriteIndex",
|
||||
table: "dungeon_mob_definitions");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "WalkFrames",
|
||||
table: "dungeon_mob_definitions");
|
||||
|
||||
migrationBuilder.AddColumn<float>(
|
||||
name: "Scale",
|
||||
table: "dungeon_mob_definitions",
|
||||
type: "float",
|
||||
nullable: false,
|
||||
defaultValue: 0f);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ScenePath",
|
||||
table: "dungeon_mob_definitions",
|
||||
type: "varchar(256)",
|
||||
maxLength: 256,
|
||||
nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "SpritePath",
|
||||
table: "dungeon_item_definitions",
|
||||
type: "varchar(256)",
|
||||
maxLength: 256,
|
||||
nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "TintColor",
|
||||
table: "dungeon_item_definitions",
|
||||
type: "varchar(16)",
|
||||
maxLength: 16,
|
||||
nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "client_assets",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
FilePath = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
AssetType = table.Column<int>(type: "int", nullable: false),
|
||||
FileHash = table.Column<string>(type: "varchar(32)", maxLength: 32, nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
FileSize = table.Column<long>(type: "bigint", nullable: false),
|
||||
Version = table.Column<int>(type: "int", nullable: false),
|
||||
IsRequired = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||
MinClientVersion = table.Column<string>(type: "varchar(16)", maxLength: 16, nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
CdnPath = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
IsEnabled = table.Column<bool>(type: "tinyint(1)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_client_assets", x => x.Id);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "client_assets");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Scale",
|
||||
table: "dungeon_mob_definitions");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ScenePath",
|
||||
table: "dungeon_mob_definitions");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SpritePath",
|
||||
table: "dungeon_item_definitions");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TintColor",
|
||||
table: "dungeon_item_definitions");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "AttackFrames",
|
||||
table: "dungeon_mob_definitions",
|
||||
type: "varchar(256)",
|
||||
maxLength: 256,
|
||||
nullable: false,
|
||||
defaultValue: "")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "DeathFrames",
|
||||
table: "dungeon_mob_definitions",
|
||||
type: "varchar(256)",
|
||||
maxLength: 256,
|
||||
nullable: false,
|
||||
defaultValue: "")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "IdleFrames",
|
||||
table: "dungeon_mob_definitions",
|
||||
type: "varchar(256)",
|
||||
maxLength: 256,
|
||||
nullable: false,
|
||||
defaultValue: "")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "SpriteIndex",
|
||||
table: "dungeon_mob_definitions",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "WalkFrames",
|
||||
table: "dungeon_mob_definitions",
|
||||
type: "varchar(256)",
|
||||
maxLength: 256,
|
||||
nullable: false,
|
||||
defaultValue: "")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user