using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace SCHALE.Common.Migrations.SqlServerMigrations { /// public partial class CafeAndFurnitures : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Cafes", columns: table => new { CafeDBId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), AccountServerId = table.Column(type: "bigint", nullable: false), CafeId = table.Column(type: "bigint", nullable: false), AccountId = table.Column(type: "bigint", nullable: false), CafeRank = table.Column(type: "int", nullable: false), LastUpdate = table.Column(type: "datetime2", nullable: false), LastSummonDate = table.Column(type: "datetime2", nullable: true), CafeVisitCharacterDBs = table.Column(type: "nvarchar(max)", nullable: false), ProductionAppliedTime = table.Column(type: "datetime2", nullable: false), CurrencyDict_Obsolete = table.Column(type: "nvarchar(max)", nullable: false), UpdateTimeDict_Obsolete = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Cafes", x => x.CafeDBId); table.ForeignKey( name: "FK_Cafes_Accounts_AccountServerId", column: x => x.AccountServerId, principalTable: "Accounts", principalColumn: "ServerId", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "Furnitures", columns: table => new { ServerId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Location = table.Column(type: "int", nullable: false), CafeDBId = table.Column(type: "bigint", nullable: false), PositionX = table.Column(type: "real", nullable: false), PositionY = table.Column(type: "real", nullable: false), Rotation = table.Column(type: "real", nullable: false), ItemDeploySequence = table.Column(type: "bigint", 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_Furnitures", x => x.ServerId); table.ForeignKey( name: "FK_Furnitures_Accounts_AccountServerId", column: x => x.AccountServerId, principalTable: "Accounts", principalColumn: "ServerId", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "IX_Cafes_AccountServerId", table: "Cafes", column: "AccountServerId"); migrationBuilder.CreateIndex( name: "IX_Furnitures_AccountServerId", table: "Furnitures", column: "AccountServerId"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Cafes"); migrationBuilder.DropTable( name: "Furnitures"); } } }