Removing database migrations in preparation for squashing them into one

This commit is contained in:
rockstardev 2020-06-13 19:25:12 -05:00
parent 0d876b9322
commit b973c0ab82
4 changed files with 586 additions and 734 deletions

View file

@ -1,48 +0,0 @@
using System;
using BTCPayServer.Data;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
namespace BTCPayServer.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20200528200358_AddNotificationEntity")]
public class AddNotificationEntity : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Notifications",
columns: table => new
{
Id = table.Column<string>(nullable: false),
Created = table.Column<DateTimeOffset>(nullable: false),
ApplicationUserId = table.Column<string>(nullable: true),
NotificationType = table.Column<string>(nullable: true),
Seen = table.Column<bool>(nullable: false),
Blob = table.Column<byte[]>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Notifications", x => x.Id);
table.ForeignKey(
name: "FK_Notifications_AspNetUsers_ApplicationUserId",
column: x => x.ApplicationUserId,
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
name: "IX_Notifications_ApplicationUserId",
table: "Notifications",
column: "ApplicationUserId");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Notifications");
}
}
}

View file

@ -1,21 +0,0 @@
using BTCPayServer.Data;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
namespace BTCPayServer.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20200612051342_LimitingNotificationStringFields")]
public class LimitingNotificationStringFields : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
}
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}

View file

@ -1,41 +0,0 @@
using BTCPayServer.Data;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
namespace BTCPayServer.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20200613234439_CascadeDeleteNotificationsForUser")]
public partial class CascadeDeleteNotificationsForUser : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Notifications_AspNetUsers_ApplicationUserId",
table: "Notifications");
migrationBuilder.AddForeignKey(
name: "FK_Notifications_AspNetUsers_ApplicationUserId",
table: "Notifications",
column: "ApplicationUserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Notifications_AspNetUsers_ApplicationUserId",
table: "Notifications");
migrationBuilder.AddForeignKey(
name: "FK_Notifications_AspNetUsers_ApplicationUserId",
table: "Notifications",
column: "ApplicationUserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
}
}