using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace BrokerApiServer.Migrations { /// public partial class SchemaChanges_121410 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "planet_exchange_orders", columns: table => new { order_id = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "교환 주문 아이디 (GUID)") .Annotation("MySql:CharSet", "utf8mb4"), order_status = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "교환 주문 상태") .Annotation("MySql:CharSet", "utf8mb4"), exchange_meta_id = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "교환 메타 아이디") .Annotation("MySql:CharSet", "utf8mb4"), exchange_meta_amount = table.Column(type: "INT", nullable: false, comment: "교환 메타 수량"), account_id = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "SSO 아이디") .Annotation("MySql:CharSet", "utf8mb4"), user_guid = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "유저 아이디 (GUID)") .Annotation("MySql:CharSet", "utf8mb4"), planet_id = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "플래닛 아이디") .Annotation("MySql:CharSet", "utf8mb4"), caliverse_item_type = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "칼리버스 아이템 타입") .Annotation("MySql:CharSet", "utf8mb4"), caliverse_item_id = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "칼리버스 아이템 아이디") .Annotation("MySql:CharSet", "utf8mb4"), caliverse_item_quantity = table.Column(type: "INT", nullable: false, comment: "칼리버스 아이템 갯수"), planet_item_type = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "플래닛 아이템 타입") .Annotation("MySql:CharSet", "utf8mb4"), planet_item_id = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "플래닛 아이템 아이디") .Annotation("MySql:CharSet", "utf8mb4"), planet_item_quantity = table.Column(type: "INT", nullable: false, comment: "플래닛 아이템 갯수"), created_at = table.Column(type: "TIMESTAMP", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP", comment: "교환 주문 시작 시간"), completed_at = table.Column(type: "TIMESTAMP", nullable: true, comment: "교환 주문 완료 시간") }, constraints: table => { table.PrimaryKey("PK_planet_exchange_orders", x => x.order_id); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateIndex( name: "IX_planet_exchange_orders_account_id", table: "planet_exchange_orders", column: "account_id"); migrationBuilder.CreateIndex( name: "IX_planet_exchange_orders_created_at", table: "planet_exchange_orders", column: "created_at"); migrationBuilder.CreateIndex( name: "IX_planet_exchange_orders_order_status", table: "planet_exchange_orders", column: "order_status"); migrationBuilder.CreateIndex( name: "IX_planet_exchange_orders_planet_id", table: "planet_exchange_orders", column: "planet_id"); migrationBuilder.CreateIndex( name: "IX_planet_exchange_orders_user_guid", table: "planet_exchange_orders", column: "user_guid"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "planet_exchange_orders"); } } }