using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace BrokerApiServer.Migrations { /// public partial class SchemaChanges_120450 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropPrimaryKey( name: "PK_planet_exchange_order_amount_user_limits", table: "planet_exchange_order_amount_user_limits"); migrationBuilder.DropPrimaryKey( name: "PK_planet_exchange_order_amount_total_limits", table: "planet_exchange_order_amount_total_limits"); migrationBuilder.RenameColumn( name: "UpdatedAt", table: "planet_exchange_order_amount_user_limits", newName: "updated_at"); migrationBuilder.RenameColumn( name: "SeasonId", table: "planet_exchange_order_amount_user_limits", newName: "season_id"); migrationBuilder.RenameColumn( name: "CreatedAt", table: "planet_exchange_order_amount_user_limits", newName: "created_at"); migrationBuilder.RenameColumn( name: "UpdatedAt", table: "planet_exchange_order_amount_total_limits", newName: "updated_at"); migrationBuilder.RenameColumn( name: "SeasonId", table: "planet_exchange_order_amount_total_limits", newName: "season_id"); migrationBuilder.RenameColumn( name: "PlanetId", table: "planet_exchange_order_amount_total_limits", newName: "planet_id"); migrationBuilder.RenameColumn( name: "CreatedAt", table: "planet_exchange_order_amount_total_limits", newName: "created_at"); migrationBuilder.AlterColumn( name: "updated_at", table: "planet_exchange_order_amount_user_limits", type: "TIMESTAMP", nullable: false, comment: "업데이트 일자", oldClrType: typeof(DateTime), oldType: "datetime(6)"); migrationBuilder.AlterColumn( name: "season_id", table: "planet_exchange_order_amount_user_limits", type: "varchar(50)", maxLength: 50, nullable: false, comment: "시즌 아이디", oldClrType: typeof(string), oldType: "longtext") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "created_at", table: "planet_exchange_order_amount_user_limits", type: "TIMESTAMP", nullable: false, comment: "생성 일자", oldClrType: typeof(DateTime), oldType: "datetime(6)"); migrationBuilder.AlterColumn( name: "updated_at", table: "planet_exchange_order_amount_total_limits", type: "TIMESTAMP", nullable: false, comment: "업데이트 일자", oldClrType: typeof(DateTime), oldType: "datetime(6)"); migrationBuilder.AlterColumn( name: "season_id", table: "planet_exchange_order_amount_total_limits", type: "varchar(50)", maxLength: 50, nullable: false, comment: "시즌 아이디", oldClrType: typeof(string), oldType: "longtext") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "planet_id", table: "planet_exchange_order_amount_total_limits", type: "varchar(50)", maxLength: 50, nullable: false, comment: "플래닛 아이디", oldClrType: typeof(string), oldType: "longtext") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "created_at", table: "planet_exchange_order_amount_total_limits", type: "TIMESTAMP", nullable: false, comment: "생성 일자", oldClrType: typeof(DateTime), oldType: "datetime(6)"); migrationBuilder.AddPrimaryKey( name: "PK_planet_exchange_order_amount_user_limits", table: "planet_exchange_order_amount_user_limits", columns: new[] { "exchange_meta_id", "exchange_date", "season_id", "user_guid" }); migrationBuilder.AddPrimaryKey( name: "PK_planet_exchange_order_amount_total_limits", table: "planet_exchange_order_amount_total_limits", columns: new[] { "exchange_meta_id", "exchange_date", "season_id" }); migrationBuilder.CreateIndex( name: "IX_planet_exchange_order_amount_user_limits_season_id", table: "planet_exchange_order_amount_user_limits", column: "season_id"); migrationBuilder.CreateIndex( name: "IX_planet_exchange_order_amount_total_limits_planet_id", table: "planet_exchange_order_amount_total_limits", column: "planet_id"); migrationBuilder.CreateIndex( name: "IX_planet_exchange_order_amount_total_limits_season_id", table: "planet_exchange_order_amount_total_limits", column: "season_id"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropPrimaryKey( name: "PK_planet_exchange_order_amount_user_limits", table: "planet_exchange_order_amount_user_limits"); migrationBuilder.DropIndex( name: "IX_planet_exchange_order_amount_user_limits_season_id", table: "planet_exchange_order_amount_user_limits"); migrationBuilder.DropPrimaryKey( name: "PK_planet_exchange_order_amount_total_limits", table: "planet_exchange_order_amount_total_limits"); migrationBuilder.DropIndex( name: "IX_planet_exchange_order_amount_total_limits_planet_id", table: "planet_exchange_order_amount_total_limits"); migrationBuilder.DropIndex( name: "IX_planet_exchange_order_amount_total_limits_season_id", table: "planet_exchange_order_amount_total_limits"); migrationBuilder.RenameColumn( name: "updated_at", table: "planet_exchange_order_amount_user_limits", newName: "UpdatedAt"); migrationBuilder.RenameColumn( name: "created_at", table: "planet_exchange_order_amount_user_limits", newName: "CreatedAt"); migrationBuilder.RenameColumn( name: "season_id", table: "planet_exchange_order_amount_user_limits", newName: "SeasonId"); migrationBuilder.RenameColumn( name: "updated_at", table: "planet_exchange_order_amount_total_limits", newName: "UpdatedAt"); migrationBuilder.RenameColumn( name: "planet_id", table: "planet_exchange_order_amount_total_limits", newName: "PlanetId"); migrationBuilder.RenameColumn( name: "created_at", table: "planet_exchange_order_amount_total_limits", newName: "CreatedAt"); migrationBuilder.RenameColumn( name: "season_id", table: "planet_exchange_order_amount_total_limits", newName: "SeasonId"); migrationBuilder.AlterColumn( name: "UpdatedAt", table: "planet_exchange_order_amount_user_limits", type: "datetime(6)", nullable: false, oldClrType: typeof(DateTime), oldType: "TIMESTAMP", oldComment: "업데이트 일자"); migrationBuilder.AlterColumn( name: "CreatedAt", table: "planet_exchange_order_amount_user_limits", type: "datetime(6)", nullable: false, oldClrType: typeof(DateTime), oldType: "TIMESTAMP", oldComment: "생성 일자"); migrationBuilder.AlterColumn( name: "SeasonId", table: "planet_exchange_order_amount_user_limits", type: "longtext", nullable: false, oldClrType: typeof(string), oldType: "varchar(50)", oldMaxLength: 50, oldComment: "시즌 아이디") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "UpdatedAt", table: "planet_exchange_order_amount_total_limits", type: "datetime(6)", nullable: false, oldClrType: typeof(DateTime), oldType: "TIMESTAMP", oldComment: "업데이트 일자"); migrationBuilder.AlterColumn( name: "PlanetId", table: "planet_exchange_order_amount_total_limits", type: "longtext", nullable: false, oldClrType: typeof(string), oldType: "varchar(50)", oldMaxLength: 50, oldComment: "플래닛 아이디") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "CreatedAt", table: "planet_exchange_order_amount_total_limits", type: "datetime(6)", nullable: false, oldClrType: typeof(DateTime), oldType: "TIMESTAMP", oldComment: "생성 일자"); migrationBuilder.AlterColumn( name: "SeasonId", table: "planet_exchange_order_amount_total_limits", type: "longtext", nullable: false, oldClrType: typeof(string), oldType: "varchar(50)", oldMaxLength: 50, oldComment: "시즌 아이디") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddPrimaryKey( name: "PK_planet_exchange_order_amount_user_limits", table: "planet_exchange_order_amount_user_limits", columns: new[] { "exchange_meta_id", "exchange_date", "user_guid" }); migrationBuilder.AddPrimaryKey( name: "PK_planet_exchange_order_amount_total_limits", table: "planet_exchange_order_amount_total_limits", columns: new[] { "exchange_meta_id", "exchange_date" }); } } }