using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace SCHALE.Common.Migrations { /// public partial class Init : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Accounts", columns: table => new { ServerId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Nickname = table.Column(type: "nvarchar(max)", nullable: true), CallName = table.Column(type: "nvarchar(max)", nullable: true), DevId = table.Column(type: "nvarchar(max)", nullable: true), State = table.Column(type: "int", nullable: false), Level = table.Column(type: "int", nullable: false), Exp = table.Column(type: "bigint", nullable: false), Comment = table.Column(type: "nvarchar(max)", nullable: true), LobbyMode = table.Column(type: "int", nullable: false), RepresentCharacterServerId = table.Column(type: "int", nullable: false), MemoryLobbyUniqueId = table.Column(type: "bigint", nullable: false), LastConnectTime = table.Column(type: "datetime2", nullable: false), BirthDay = table.Column(type: "datetime2", nullable: true), CallNameUpdateTime = table.Column(type: "datetime2", nullable: false), PublisherAccountId = table.Column(type: "bigint", nullable: false), RetentionDays = table.Column(type: "int", nullable: true), VIPLevel = table.Column(type: "int", nullable: true), CreateDate = table.Column(type: "datetime2", nullable: false), UnReadMailCount = table.Column(type: "int", nullable: true), LinkRewardDate = table.Column(type: "datetime2", nullable: true) }, constraints: table => { table.PrimaryKey("PK_Accounts", x => x.ServerId); }); migrationBuilder.CreateTable( name: "AccountTutorials", columns: table => new { AccountServerId = table.Column(type: "bigint", nullable: false), TutorialIds = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_AccountTutorials", x => x.AccountServerId); }); migrationBuilder.CreateTable( name: "GuestAccounts", columns: table => new { Uid = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), DeviceId = table.Column(type: "nvarchar(max)", nullable: false), Token = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_GuestAccounts", x => x.Uid); }); migrationBuilder.CreateTable( name: "Items", columns: table => new { ServerId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), IsLocked = table.Column(type: "bit", nullable: false), AccountServerId = table.Column(type: "bigint", nullable: false), UniqueId = table.Column(type: "bigint", nullable: false), StackCount = table.Column(type: "bigint", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Items", x => x.ServerId); }); migrationBuilder.CreateTable( name: "MissionProgresses", columns: table => new { ServerId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), AccountServerId = table.Column(type: "bigint", nullable: false), MissionUniqueId = table.Column(type: "bigint", nullable: false), Complete = table.Column(type: "bit", nullable: false), StartTime = table.Column(type: "datetime2", nullable: false), ProgressParameters = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_MissionProgresses", x => x.ServerId); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Accounts"); migrationBuilder.DropTable( name: "AccountTutorials"); migrationBuilder.DropTable( name: "GuestAccounts"); migrationBuilder.DropTable( name: "Items"); migrationBuilder.DropTable( name: "MissionProgresses"); } } }