using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LudosData.Api.Data.Migrations
{
///
public partial class AddCollectorFields : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn(
name: "Condition",
table: "Games",
type: "INTEGER",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn(
name: "MarketValue",
table: "Games",
type: "INTEGER",
nullable: true);
migrationBuilder.AddColumn(
name: "MarketValueSource",
table: "Games",
type: "TEXT",
maxLength: 100,
nullable: true);
migrationBuilder.AddColumn(
name: "MarketValueUpdatedAt",
table: "Games",
type: "TEXT",
nullable: true);
migrationBuilder.AddColumn(
name: "Notes",
table: "Games",
type: "TEXT",
nullable: true);
migrationBuilder.AddColumn(
name: "PurchaseDate",
table: "Games",
type: "TEXT",
nullable: true);
migrationBuilder.AddColumn(
name: "PurchasePrice",
table: "Games",
type: "INTEGER",
nullable: true);
migrationBuilder.AddColumn(
name: "Rating",
table: "Games",
type: "INTEGER",
nullable: true);
migrationBuilder.AddColumn(
name: "Region",
table: "Games",
type: "INTEGER",
nullable: false,
defaultValue: 0);
migrationBuilder.CreateIndex(
name: "IX_Games_OwnerId_Rating",
table: "Games",
columns: new[] { "OwnerId", "Rating" });
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_Games_OwnerId_Rating",
table: "Games");
migrationBuilder.DropColumn(
name: "Condition",
table: "Games");
migrationBuilder.DropColumn(
name: "MarketValue",
table: "Games");
migrationBuilder.DropColumn(
name: "MarketValueSource",
table: "Games");
migrationBuilder.DropColumn(
name: "MarketValueUpdatedAt",
table: "Games");
migrationBuilder.DropColumn(
name: "Notes",
table: "Games");
migrationBuilder.DropColumn(
name: "PurchaseDate",
table: "Games");
migrationBuilder.DropColumn(
name: "PurchasePrice",
table: "Games");
migrationBuilder.DropColumn(
name: "Rating",
table: "Games");
migrationBuilder.DropColumn(
name: "Region",
table: "Games");
}
}
}