42 lines
1.6 KiB
C#
42 lines
1.6 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
#nullable disable
|
|
|
|
namespace Cloud.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddPasskeyCredentials : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "PasskeyCredentials",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<int>(type: "integer", nullable: false)
|
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
|
CredentialId = table.Column<byte[]>(type: "bytea", nullable: false),
|
|
PublicKey = table.Column<byte[]>(type: "bytea", nullable: false),
|
|
SignCount = table.Column<long>(type: "bigint", nullable: false),
|
|
UserHandle = table.Column<byte[]>(type: "bytea", nullable: false),
|
|
AaGuid = table.Column<string>(type: "text", nullable: false),
|
|
CreatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_PasskeyCredentials", x => x.Id);
|
|
});
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "PasskeyCredentials");
|
|
}
|
|
}
|
|
}
|