using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Infrastructure.Migrations { /// public partial class Initial : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { if (!MigrationHelper.Exists("card_bdata")) { migrationBuilder.CreateTable( name: "card_bdata", columns: table => new { cardid = table.Column(name: "card_id", type: "INTEGER", nullable: false), bdata = table.Column(type: "TEXT", nullable: true), bdatasize = table.Column(name: "bdata_size", type: "INTEGER", nullable: false) }, constraints: table => { table.PrimaryKey("PK_card_bdata", x => x.cardid); }); } if (!MigrationHelper.Exists("card_detail")) { migrationBuilder.CreateTable( name: "card_detail", columns: table => new { cardid = table.Column(name: "card_id", type: "INTEGER", nullable: false), pcol1 = table.Column(type: "INTEGER", nullable: false), pcol2 = table.Column(type: "INTEGER", nullable: false), pcol3 = table.Column(type: "INTEGER", nullable: false), scorei1 = table.Column(name: "score_i1", type: "INTEGER", nullable: false), scoreui1 = table.Column(name: "score_ui1", type: "INTEGER", nullable: false), scoreui2 = table.Column(name: "score_ui2", type: "INTEGER", nullable: false), scoreui3 = table.Column(name: "score_ui3", type: "INTEGER", nullable: false), scoreui4 = table.Column(name: "score_ui4", type: "INTEGER", nullable: false), scoreui5 = table.Column(name: "score_ui5", type: "INTEGER", nullable: false), scoreui6 = table.Column(name: "score_ui6", type: "INTEGER", nullable: false), scorebi1 = table.Column(name: "score_bi1", type: "INTEGER", nullable: false), lastplaytenpoid = table.Column(name: "last_play_tenpo_id", type: "TEXT", nullable: true), fcol1 = table.Column(type: "INTEGER", nullable: false), fcol2 = table.Column(type: "INTEGER", nullable: false), fcol3 = table.Column(type: "INTEGER", nullable: false), lastplaytime = table.Column(name: "last_play_time", type: "INTEGER", nullable: false) }, constraints: table => { table.PrimaryKey("PK_card_detail", x => new { x.cardid, x.pcol1, x.pcol2, x.pcol3 }); }); } if (!MigrationHelper.Exists("card_main")) { migrationBuilder.CreateTable( name: "card_main", columns: table => new { cardid = table.Column(name: "card_id", type: "INTEGER", nullable: false), playername = table.Column(name: "player_name", type: "TEXT", nullable: false), scorei1 = table.Column(name: "score_i1", type: "INTEGER", nullable: false), fcol1 = table.Column(type: "INTEGER", nullable: false), fcol2 = table.Column(type: "INTEGER", nullable: false), fcol3 = table.Column(type: "INTEGER", nullable: false), achievestatus = table.Column(name: "achieve_status", type: "TEXT", nullable: false), created = table.Column(type: "TEXT", nullable: true), modified = table.Column(type: "TEXT", nullable: true) }, constraints: table => { table.PrimaryKey("PK_card_main", x => x.cardid); }); } if (!MigrationHelper.Exists("CardPlayCount")) { migrationBuilder.CreateTable( name: "CardPlayCount", columns: table => new { cardid = table.Column(name: "card_id", type: "INTEGER", nullable: false), playcount = table.Column(name: "play_count", type: "INTEGER", nullable: false), lastplayedtime = table.Column(name: "last_played_time", type: "INTEGER", nullable: false) }, constraints: table => { table.PrimaryKey("PK_CardPlayCount", x => x.cardid); }); } } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "card_bdata"); migrationBuilder.DropTable( name: "card_detail"); migrationBuilder.DropTable( name: "card_main"); migrationBuilder.DropTable( name: "CardPlayCount"); } } }