using Microsoft.EntityFrameworkCore.Migrations; using System; using System.Collections.Generic; namespace BTCPayServer.Migrations { public partial class events : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "InvoiceEvents", columns: table => new { InvoiceDataId = table.Column(nullable: false), UniqueId = table.Column(nullable: false), Message = table.Column(nullable: true), Timestamp = table.Column(nullable: false) }, constraints: table => { table.PrimaryKey("PK_InvoiceEvents", x => new { x.InvoiceDataId, x.UniqueId }); table.ForeignKey( name: "FK_InvoiceEvents_Invoices_InvoiceDataId", column: x => x.InvoiceDataId, principalTable: "Invoices", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "InvoiceEvents"); } } }