using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace Minecraft_Realms_Emulator.Migrations { /// public partial class Subscriptions : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "RemoteSubscriptionId", table: "Worlds", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.CreateTable( name: "Subscriptions", columns: table => new { Id = table.Column(type: "integer", nullable: false) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), RemoteId = table.Column(type: "text", nullable: false), StartDate = table.Column(type: "text", nullable: false), DaysLeft = table.Column(type: "integer", nullable: false), SubscriptionType = table.Column(type: "text", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Subscriptions", x => x.Id); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Subscriptions"); migrationBuilder.AlterColumn( name: "RemoteSubscriptionId", table: "Worlds", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); } } }