using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace RadicadeServer.Migrations { public partial class FixModelChanges : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "Accessibility", table: "GiftItems"); migrationBuilder.DropColumn( name: "AvatarItemDesc", table: "GiftItems"); migrationBuilder.DropColumn( name: "AvatarItemType", table: "GiftItems"); migrationBuilder.DropColumn( name: "ConsumableItemDesc", table: "GiftItems"); migrationBuilder.DropColumn( name: "Context", table: "GiftItems"); migrationBuilder.DropColumn( name: "Currency", table: "GiftItems"); migrationBuilder.DropColumn( name: "IsFeatured", table: "GiftItems"); migrationBuilder.DropColumn( name: "IsQuery", table: "GiftItems"); migrationBuilder.DropColumn( name: "SubscribersOnly", table: "GiftItems"); migrationBuilder.DropColumn( name: "Unique", table: "GiftItems"); migrationBuilder.RenameColumn( name: "Tooltip", table: "GiftItems", newName: "Name"); migrationBuilder.RenameColumn( name: "Rarity", table: "GiftItems", newName: "XPAmount"); migrationBuilder.RenameColumn( name: "ItemSetId", table: "GiftItems", newName: "StorefrontId"); migrationBuilder.RenameColumn( name: "ItemSetFriendlyName", table: "GiftItems", newName: "EquipmentItems"); migrationBuilder.RenameColumn( name: "FriendlyName", table: "GiftItems", newName: "Description"); migrationBuilder.RenameColumn( name: "EquipmentPrefabName", table: "GiftItems", newName: "ConsumableItems"); migrationBuilder.RenameColumn( name: "EquipmentModificationGuid", table: "GiftItems", newName: "AvatarItems"); migrationBuilder.RenameColumn( name: "CurrencyType", table: "GiftItems", newName: "CurrencyAmount"); migrationBuilder.AddColumn( name: "IsJunior", table: "Players", type: "bit", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "EndTime", table: "GiftItems", type: "datetime2", nullable: false, defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); migrationBuilder.AddColumn( name: "StartTime", table: "GiftItems", type: "datetime2", nullable: false, defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); migrationBuilder.CreateTable( name: "PlayerEvents", columns: table => new { PlayerEventId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Name = table.Column(type: "nvarchar(max)", nullable: false), Description = table.Column(type: "nvarchar(max)", nullable: false), ImageName = table.Column(type: "nvarchar(max)", nullable: false), StartTime = table.Column(type: "datetime2", nullable: false), EndTime = table.Column(type: "datetime2", nullable: false), CreatorPlayerId = table.Column(type: "bigint", nullable: false), AttendeeCount = table.Column(type: "int", nullable: false), RoomId = table.Column(type: "bigint", nullable: false), Accessibility = table.Column(type: "int", nullable: false), CreatedAt = table.Column(type: "datetime2", nullable: false) }, constraints: table => { table.PrimaryKey("PK_PlayerEvents", x => x.PlayerEventId); }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "PlayerEvents"); migrationBuilder.DropColumn( name: "IsJunior", table: "Players"); migrationBuilder.DropColumn( name: "EndTime", table: "GiftItems"); migrationBuilder.DropColumn( name: "StartTime", table: "GiftItems"); migrationBuilder.RenameColumn( name: "XPAmount", table: "GiftItems", newName: "Rarity"); migrationBuilder.RenameColumn( name: "StorefrontId", table: "GiftItems", newName: "ItemSetId"); migrationBuilder.RenameColumn( name: "Name", table: "GiftItems", newName: "Tooltip"); migrationBuilder.RenameColumn( name: "EquipmentItems", table: "GiftItems", newName: "ItemSetFriendlyName"); migrationBuilder.RenameColumn( name: "Description", table: "GiftItems", newName: "FriendlyName"); migrationBuilder.RenameColumn( name: "CurrencyAmount", table: "GiftItems", newName: "CurrencyType"); migrationBuilder.RenameColumn( name: "ConsumableItems", table: "GiftItems", newName: "EquipmentPrefabName"); migrationBuilder.RenameColumn( name: "AvatarItems", table: "GiftItems", newName: "EquipmentModificationGuid"); migrationBuilder.AddColumn( name: "Accessibility", table: "GiftItems", type: "int", nullable: false, defaultValue: 0); migrationBuilder.AddColumn( name: "AvatarItemDesc", table: "GiftItems", type: "nvarchar(max)", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "AvatarItemType", table: "GiftItems", type: "int", nullable: false, defaultValue: 0); migrationBuilder.AddColumn( name: "ConsumableItemDesc", table: "GiftItems", type: "nvarchar(max)", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "Context", table: "GiftItems", type: "int", nullable: false, defaultValue: 0); migrationBuilder.AddColumn( name: "Currency", table: "GiftItems", type: "int", nullable: false, defaultValue: 0); migrationBuilder.AddColumn( name: "IsFeatured", table: "GiftItems", type: "bit", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "IsQuery", table: "GiftItems", type: "bit", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "SubscribersOnly", table: "GiftItems", type: "bit", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "Unique", table: "GiftItems", type: "bit", nullable: false, defaultValue: false); } } }