using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace DodoSSH.Client.Storage.Migrations
{
    /// <inheritdoc />
    public partial class AddVaultKeyWrapHistory : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "vault_key_wrap",
                columns: table => new
                {
                    vault_id = table.Column<Guid>(type: "TEXT", nullable: false),
                    key_generation = table.Column<uint>(type: "INTEGER", nullable: false),
                    wrapped_key = table.Column<byte[]>(type: "BLOB", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("pk_vault_key_wrap", x => new { x.vault_id, x.key_generation });
                });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "vault_key_wrap");
        }
    }
}
