using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace BrokerApiServer.Migrations { /// public partial class SchemaChanges_164908 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "planet_item_type", table: "planet_item_exchange_order", type: "varchar(50)", maxLength: 50, nullable: false, comment: "플래닛 아이템 타입", oldClrType: typeof(string), oldType: "varchar(50)", oldMaxLength: 50, oldComment: "플래닛 아이템 타입") .Annotation("MySql:CharSet", "utf8mb4") .Annotation("Relational:ColumnOrder", 13) .OldAnnotation("MySql:CharSet", "utf8mb4") .OldAnnotation("Relational:ColumnOrder", 12); migrationBuilder.AlterColumn( name: "planet_item_quantity", table: "planet_item_exchange_order", type: "INT", nullable: false, comment: "플래닛 아이템 갯수", oldClrType: typeof(int), oldType: "INT", oldComment: "플래닛 아이템 갯수") .Annotation("Relational:ColumnOrder", 15) .OldAnnotation("Relational:ColumnOrder", 14); migrationBuilder.AlterColumn( name: "planet_item_id", table: "planet_item_exchange_order", type: "varchar(50)", maxLength: 50, nullable: false, comment: "플래닛 아이템 아이디", oldClrType: typeof(string), oldType: "varchar(50)", oldMaxLength: 50, oldComment: "플래닛 아이템 아이디") .Annotation("MySql:CharSet", "utf8mb4") .Annotation("Relational:ColumnOrder", 14) .OldAnnotation("MySql:CharSet", "utf8mb4") .OldAnnotation("Relational:ColumnOrder", 13); migrationBuilder.AlterColumn( name: "created_at", table: "planet_item_exchange_order", type: "TIMESTAMP", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP", comment: "교환 주문 시작 시간", oldClrType: typeof(DateTime), oldType: "TIMESTAMP", oldDefaultValueSql: "CURRENT_TIMESTAMP", oldComment: "교환 주문 시작 시간") .Annotation("Relational:ColumnOrder", 16) .OldAnnotation("Relational:ColumnOrder", 15); migrationBuilder.AlterColumn( name: "completed_at", table: "planet_item_exchange_order", type: "TIMESTAMP", nullable: true, comment: "교환 주문 완료 시간", oldClrType: typeof(DateTime), oldType: "TIMESTAMP", oldNullable: true, oldComment: "교환 주문 완료 시간") .Annotation("Relational:ColumnOrder", 17) .OldAnnotation("Relational:ColumnOrder", 16); migrationBuilder.AlterColumn( name: "caliverse_item_type", table: "planet_item_exchange_order", type: "varchar(50)", maxLength: 50, nullable: false, comment: "칼리버스 아이템 타입", oldClrType: typeof(string), oldType: "varchar(50)", oldMaxLength: 50, oldComment: "칼리버스 아이템 타입") .Annotation("MySql:CharSet", "utf8mb4") .Annotation("Relational:ColumnOrder", 10) .OldAnnotation("MySql:CharSet", "utf8mb4") .OldAnnotation("Relational:ColumnOrder", 9); migrationBuilder.AlterColumn( name: "caliverse_item_quantity", table: "planet_item_exchange_order", type: "INT", nullable: false, comment: "칼리버스 아이템 갯수", oldClrType: typeof(int), oldType: "INT", oldComment: "칼리버스 아이템 갯수") .Annotation("Relational:ColumnOrder", 12) .OldAnnotation("Relational:ColumnOrder", 11); migrationBuilder.AlterColumn( name: "caliverse_item_id", table: "planet_item_exchange_order", type: "varchar(50)", maxLength: 50, nullable: false, comment: "칼리버스 아이템 아이디", oldClrType: typeof(string), oldType: "varchar(50)", oldMaxLength: 50, oldComment: "칼리버스 아이템 아이디") .Annotation("MySql:CharSet", "utf8mb4") .Annotation("Relational:ColumnOrder", 11) .OldAnnotation("MySql:CharSet", "utf8mb4") .OldAnnotation("Relational:ColumnOrder", 10); migrationBuilder.AddColumn( name: "nickname", table: "planet_item_exchange_order", type: "varchar(50)", maxLength: 50, nullable: false, defaultValue: "", comment: "유저 닉네임") .Annotation("MySql:CharSet", "utf8mb4") .Annotation("Relational:ColumnOrder", 9); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "nickname", table: "planet_item_exchange_order"); migrationBuilder.AlterColumn( name: "planet_item_type", table: "planet_item_exchange_order", type: "varchar(50)", maxLength: 50, nullable: false, comment: "플래닛 아이템 타입", oldClrType: typeof(string), oldType: "varchar(50)", oldMaxLength: 50, oldComment: "플래닛 아이템 타입") .Annotation("MySql:CharSet", "utf8mb4") .Annotation("Relational:ColumnOrder", 12) .OldAnnotation("MySql:CharSet", "utf8mb4") .OldAnnotation("Relational:ColumnOrder", 13); migrationBuilder.AlterColumn( name: "planet_item_quantity", table: "planet_item_exchange_order", type: "INT", nullable: false, comment: "플래닛 아이템 갯수", oldClrType: typeof(int), oldType: "INT", oldComment: "플래닛 아이템 갯수") .Annotation("Relational:ColumnOrder", 14) .OldAnnotation("Relational:ColumnOrder", 15); migrationBuilder.AlterColumn( name: "planet_item_id", table: "planet_item_exchange_order", type: "varchar(50)", maxLength: 50, nullable: false, comment: "플래닛 아이템 아이디", oldClrType: typeof(string), oldType: "varchar(50)", oldMaxLength: 50, oldComment: "플래닛 아이템 아이디") .Annotation("MySql:CharSet", "utf8mb4") .Annotation("Relational:ColumnOrder", 13) .OldAnnotation("MySql:CharSet", "utf8mb4") .OldAnnotation("Relational:ColumnOrder", 14); migrationBuilder.AlterColumn( name: "created_at", table: "planet_item_exchange_order", type: "TIMESTAMP", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP", comment: "교환 주문 시작 시간", oldClrType: typeof(DateTime), oldType: "TIMESTAMP", oldDefaultValueSql: "CURRENT_TIMESTAMP", oldComment: "교환 주문 시작 시간") .Annotation("Relational:ColumnOrder", 15) .OldAnnotation("Relational:ColumnOrder", 16); migrationBuilder.AlterColumn( name: "completed_at", table: "planet_item_exchange_order", type: "TIMESTAMP", nullable: true, comment: "교환 주문 완료 시간", oldClrType: typeof(DateTime), oldType: "TIMESTAMP", oldNullable: true, oldComment: "교환 주문 완료 시간") .Annotation("Relational:ColumnOrder", 16) .OldAnnotation("Relational:ColumnOrder", 17); migrationBuilder.AlterColumn( name: "caliverse_item_type", table: "planet_item_exchange_order", type: "varchar(50)", maxLength: 50, nullable: false, comment: "칼리버스 아이템 타입", oldClrType: typeof(string), oldType: "varchar(50)", oldMaxLength: 50, oldComment: "칼리버스 아이템 타입") .Annotation("MySql:CharSet", "utf8mb4") .Annotation("Relational:ColumnOrder", 9) .OldAnnotation("MySql:CharSet", "utf8mb4") .OldAnnotation("Relational:ColumnOrder", 10); migrationBuilder.AlterColumn( name: "caliverse_item_quantity", table: "planet_item_exchange_order", type: "INT", nullable: false, comment: "칼리버스 아이템 갯수", oldClrType: typeof(int), oldType: "INT", oldComment: "칼리버스 아이템 갯수") .Annotation("Relational:ColumnOrder", 11) .OldAnnotation("Relational:ColumnOrder", 12); migrationBuilder.AlterColumn( name: "caliverse_item_id", table: "planet_item_exchange_order", type: "varchar(50)", maxLength: 50, nullable: false, comment: "칼리버스 아이템 아이디", oldClrType: typeof(string), oldType: "varchar(50)", oldMaxLength: 50, oldComment: "칼리버스 아이템 아이디") .Annotation("MySql:CharSet", "utf8mb4") .Annotation("Relational:ColumnOrder", 10) .OldAnnotation("MySql:CharSet", "utf8mb4") .OldAnnotation("Relational:ColumnOrder", 11); } } }