using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Minecraft_Realms_Emulator.Migrations
{
///
public partial class Worlds_Subscription_field : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_Subscriptions_WorldId",
table: "Subscriptions");
migrationBuilder.DropColumn(
name: "DaysLeft",
table: "Worlds");
migrationBuilder.DropColumn(
name: "Expired",
table: "Worlds");
migrationBuilder.DropColumn(
name: "ExpiredTrial",
table: "Worlds");
migrationBuilder.DropColumn(
name: "RemoteSubscriptionId",
table: "Worlds");
migrationBuilder.CreateIndex(
name: "IX_Subscriptions_WorldId",
table: "Subscriptions",
column: "WorldId",
unique: true);
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_Subscriptions_WorldId",
table: "Subscriptions");
migrationBuilder.AddColumn(
name: "DaysLeft",
table: "Worlds",
type: "integer",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn(
name: "Expired",
table: "Worlds",
type: "boolean",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn(
name: "ExpiredTrial",
table: "Worlds",
type: "boolean",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn(
name: "RemoteSubscriptionId",
table: "Worlds",
type: "text",
nullable: false,
defaultValue: "");
migrationBuilder.CreateIndex(
name: "IX_Subscriptions_WorldId",
table: "Subscriptions",
column: "WorldId");
}
}
}