using System; using Microsoft.EntityFrameworkCore.Migrations; using BTCPayServer.Data; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; namespace BTCPayServer.Migrations { [DbContext(typeof(ApplicationDbContext))] [Migration("20210314092253_Fido2Credentials")] public partial class Fido2Credentials : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Fido2Credentials", columns: table => new { Id = table.Column(nullable: false), Name = table.Column(nullable: true), ApplicationUserId = table.Column(nullable: true), Blob = table.Column(nullable: true), Type = table.Column(nullable: false) }, constraints: table => { table.PrimaryKey("PK_Fido2Credentials", x => x.Id); table.ForeignKey( name: "FK_Fido2Credentials_AspNetUsers_ApplicationUserId", column: x => x.ApplicationUserId, principalTable: "AspNetUsers", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "IX_Fido2Credentials_ApplicationUserId", table: "Fido2Credentials", column: "ApplicationUserId"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Fido2Credentials"); } } }