using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;

#nullable disable

namespace DodoSSH.Infrastructure.Migrations
{
    /// <inheritdoc />
    public partial class InitialSchema : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.EnsureSchema(
                name: "dodo");

            migrationBuilder.AlterDatabase()
                .Annotation("Npgsql:PostgresExtension:citext", ",,");

            migrationBuilder.CreateTable(
                name: "key_log",
                schema: "dodo",
                columns: table => new
                {
                    sequence = table.Column<long>(type: "bigint", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityAlwaysColumn),
                    user_id = table.Column<Guid>(type: "uuid", nullable: false),
                    generation = table.Column<int>(type: "integer", nullable: false),
                    encryption_public_key = table.Column<byte[]>(type: "bytea", maxLength: 32, nullable: false),
                    signing_public_key = table.Column<byte[]>(type: "bytea", maxLength: 32, nullable: false),
                    statement_signature = table.Column<byte[]>(type: "bytea", maxLength: 64, nullable: false),
                    previous_hash = table.Column<byte[]>(type: "bytea", maxLength: 32, nullable: false),
                    hash = table.Column<byte[]>(type: "bytea", maxLength: 32, nullable: false),
                    created_at_utc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("pk_key_log", x => x.sequence);
                });

            migrationBuilder.CreateTable(
                name: "sync_change",
                schema: "dodo",
                columns: table => new
                {
                    sequence = table.Column<long>(type: "bigint", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityAlwaysColumn),
                    vault_id = table.Column<Guid>(type: "uuid", nullable: false),
                    entity_type = table.Column<int>(type: "integer", nullable: false),
                    entity_id = table.Column<Guid>(type: "uuid", nullable: false),
                    operation = table.Column<int>(type: "integer", nullable: false),
                    revision = table.Column<int>(type: "integer", nullable: false),
                    actor_user_id = table.Column<Guid>(type: "uuid", nullable: false),
                    occurred_at_utc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("pk_sync_change", x => x.sequence);
                });

            migrationBuilder.CreateTable(
                name: "sync_operation_receipt",
                schema: "dodo",
                columns: table => new
                {
                    operation_id = table.Column<Guid>(type: "uuid", nullable: false),
                    vault_id = table.Column<Guid>(type: "uuid", nullable: false),
                    applied_change_sequence = table.Column<long>(type: "bigint", nullable: true),
                    result_version = table.Column<int>(type: "integer", nullable: true),
                    created_at_utc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("pk_sync_operation_receipt", x => x.operation_id);
                });

            migrationBuilder.CreateTable(
                name: "team",
                schema: "dodo",
                columns: table => new
                {
                    id = table.Column<Guid>(type: "uuid", nullable: false),
                    name = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false),
                    slug = table.Column<string>(type: "citext", maxLength: 128, nullable: false),
                    description = table.Column<string>(type: "character varying(2048)", maxLength: 2048, nullable: true),
                    created_by_user_id = table.Column<Guid>(type: "uuid", nullable: false),
                    created_at_utc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
                    deleted_at_utc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
                    xmin = table.Column<uint>(type: "xid", rowVersion: true, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("pk_team", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "user_account",
                schema: "dodo",
                columns: table => new
                {
                    id = table.Column<Guid>(type: "uuid", nullable: false),
                    issuer = table.Column<string>(type: "character varying(512)", maxLength: 512, nullable: false),
                    subject = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false),
                    email = table.Column<string>(type: "citext", maxLength: 320, nullable: true),
                    display_name = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
                    status = table.Column<int>(type: "integer", nullable: false),
                    enrolled_at_utc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
                    created_at_utc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
                    updated_at_utc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
                    last_seen_at_utc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
                    deleted_at_utc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
                    xmin = table.Column<uint>(type: "xid", rowVersion: true, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("pk_user_account", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "device",
                schema: "dodo",
                columns: table => new
                {
                    id = table.Column<Guid>(type: "uuid", nullable: false),
                    user_id = table.Column<Guid>(type: "uuid", nullable: false),
                    name = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false),
                    platform = table.Column<int>(type: "integer", nullable: false),
                    public_key = table.Column<byte[]>(type: "bytea", maxLength: 32, nullable: false),
                    enrolled_at_utc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
                    last_seen_at_utc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
                    revoked_at_utc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("pk_device", x => x.id);
                    table.ForeignKey(
                        name: "fk_device_users_user_id",
                        column: x => x.user_id,
                        principalSchema: "dodo",
                        principalTable: "user_account",
                        principalColumn: "id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "team_membership",
                schema: "dodo",
                columns: table => new
                {
                    id = table.Column<Guid>(type: "uuid", nullable: false),
                    team_id = table.Column<Guid>(type: "uuid", nullable: false),
                    user_id = table.Column<Guid>(type: "uuid", nullable: false),
                    role = table.Column<int>(type: "integer", nullable: false),
                    status = table.Column<int>(type: "integer", nullable: false),
                    invited_by_user_id = table.Column<Guid>(type: "uuid", nullable: true),
                    joined_at_utc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
                    created_at_utc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
                    deleted_at_utc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
                    xmin = table.Column<uint>(type: "xid", rowVersion: true, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("pk_team_membership", x => x.id);
                    table.ForeignKey(
                        name: "fk_team_membership_team_team_id",
                        column: x => x.team_id,
                        principalSchema: "dodo",
                        principalTable: "team",
                        principalColumn: "id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "fk_team_membership_users_user_id",
                        column: x => x.user_id,
                        principalSchema: "dodo",
                        principalTable: "user_account",
                        principalColumn: "id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "user_key",
                schema: "dodo",
                columns: table => new
                {
                    id = table.Column<Guid>(type: "uuid", nullable: false),
                    user_id = table.Column<Guid>(type: "uuid", nullable: false),
                    generation = table.Column<int>(type: "integer", nullable: false),
                    encryption_public_key = table.Column<byte[]>(type: "bytea", maxLength: 32, nullable: false),
                    signing_public_key = table.Column<byte[]>(type: "bytea", maxLength: 32, nullable: false),
                    fingerprint_sha256 = table.Column<byte[]>(type: "bytea", maxLength: 32, nullable: false),
                    statement = table.Column<string>(type: "jsonb", nullable: false),
                    statement_signature = table.Column<byte[]>(type: "bytea", maxLength: 64, nullable: false),
                    identity_provider_binding = table.Column<string>(type: "jsonb", nullable: true),
                    is_current = table.Column<bool>(type: "boolean", nullable: false),
                    created_at_utc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
                    revoked_at_utc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("pk_user_key", x => x.id);
                    table.ForeignKey(
                        name: "fk_user_key_user_account_user_id",
                        column: x => x.user_id,
                        principalSchema: "dodo",
                        principalTable: "user_account",
                        principalColumn: "id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "vault",
                schema: "dodo",
                columns: table => new
                {
                    id = table.Column<Guid>(type: "uuid", nullable: false),
                    name = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false),
                    owner_kind = table.Column<int>(type: "integer", nullable: false),
                    owner_user_id = table.Column<Guid>(type: "uuid", nullable: true),
                    team_id = table.Column<Guid>(type: "uuid", nullable: true),
                    key_generation = table.Column<int>(type: "integer", nullable: false),
                    rekey_required = table.Column<bool>(type: "boolean", nullable: false),
                    rekey_reason = table.Column<int>(type: "integer", nullable: false),
                    created_at_utc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
                    updated_at_utc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
                    deleted_at_utc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
                    xmin = table.Column<uint>(type: "xid", rowVersion: true, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("pk_vault", x => x.id);
                    table.CheckConstraint("ck_vault_key_generation", "key_generation >= 1");
                    table.CheckConstraint("ck_vault_owner", "(owner_kind = 1 AND owner_user_id IS NOT NULL AND team_id IS NULL)\nOR (owner_kind = 2 AND team_id IS NOT NULL AND owner_user_id IS NULL)");
                    table.ForeignKey(
                        name: "fk_vault_team_team_id",
                        column: x => x.team_id,
                        principalSchema: "dodo",
                        principalTable: "team",
                        principalColumn: "id",
                        onDelete: ReferentialAction.Restrict);
                    table.ForeignKey(
                        name: "fk_vault_user_account_owner_user_id",
                        column: x => x.owner_user_id,
                        principalSchema: "dodo",
                        principalTable: "user_account",
                        principalColumn: "id",
                        onDelete: ReferentialAction.Restrict);
                });

            migrationBuilder.CreateTable(
                name: "user_key_wrap",
                schema: "dodo",
                columns: table => new
                {
                    id = table.Column<Guid>(type: "uuid", nullable: false),
                    user_id = table.Column<Guid>(type: "uuid", nullable: false),
                    kind = table.Column<int>(type: "integer", nullable: false),
                    device_id = table.Column<Guid>(type: "uuid", nullable: true),
                    wrap = table.Column<byte[]>(type: "bytea", nullable: false),
                    wrap_version = table.Column<int>(type: "integer", nullable: false),
                    kdf_algorithm = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true),
                    kdf_salt = table.Column<byte[]>(type: "bytea", maxLength: 64, nullable: true),
                    kdf_memory_kibibytes = table.Column<int>(type: "integer", nullable: true),
                    kdf_passes = table.Column<int>(type: "integer", nullable: true),
                    kdf_parallelism = table.Column<int>(type: "integer", nullable: true),
                    created_at_utc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
                    last_used_at_utc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
                    xmin = table.Column<uint>(type: "xid", rowVersion: true, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("pk_user_key_wrap", x => x.id);
                    table.CheckConstraint("ck_user_key_wrap_device", "(kind = 2 AND device_id IS NOT NULL) OR (kind <> 2 AND device_id IS NULL)");
                    table.CheckConstraint("ck_user_key_wrap_kdf", "(kind IN (1, 3) AND kdf_algorithm IS NOT NULL AND kdf_salt IS NOT NULL\n    AND kdf_memory_kibibytes IS NOT NULL AND kdf_passes IS NOT NULL\n    AND kdf_parallelism IS NOT NULL)\nOR (kind IN (2, 4) AND kdf_algorithm IS NULL AND kdf_salt IS NULL)");
                    table.ForeignKey(
                        name: "fk_user_key_wrap_device_device_id",
                        column: x => x.device_id,
                        principalSchema: "dodo",
                        principalTable: "device",
                        principalColumn: "id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "fk_user_key_wrap_user_account_user_id",
                        column: x => x.user_id,
                        principalSchema: "dodo",
                        principalTable: "user_account",
                        principalColumn: "id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "host",
                schema: "dodo",
                columns: table => new
                {
                    id = table.Column<Guid>(type: "uuid", nullable: false),
                    vault_id = table.Column<Guid>(type: "uuid", nullable: false),
                    payload = table.Column<byte[]>(type: "bytea", nullable: false),
                    data_key_wrap = table.Column<byte[]>(type: "bytea", nullable: true),
                    content_key_id = table.Column<Guid>(type: "uuid", nullable: true),
                    key_generation = table.Column<int>(type: "integer", nullable: false),
                    payload_aad_version = table.Column<short>(type: "smallint", nullable: false),
                    relay_enabled = table.Column<bool>(type: "boolean", nullable: false),
                    hostname = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: true),
                    port = table.Column<int>(type: "integer", nullable: true),
                    group_id = table.Column<Guid>(type: "uuid", nullable: true),
                    version = table.Column<int>(type: "integer", nullable: false),
                    change_sequence = table.Column<long>(type: "bigint", nullable: false),
                    created_at_utc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
                    updated_at_utc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
                    deleted_at_utc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
                    created_by_user_id = table.Column<Guid>(type: "uuid", nullable: false),
                    updated_by_user_id = table.Column<Guid>(type: "uuid", nullable: false),
                    xmin = table.Column<uint>(type: "xid", rowVersion: true, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("pk_host", x => x.id);
                    table.CheckConstraint("ck_host_port_range", "port IS NULL OR (port BETWEEN 1 AND 65535)");
                    table.CheckConstraint("ck_host_relay_target", "(relay_enabled AND hostname IS NOT NULL AND port IS NOT NULL)\nOR (NOT relay_enabled AND hostname IS NULL AND port IS NULL)");
                    table.CheckConstraint("ck_host_version", "version >= 1");
                    table.ForeignKey(
                        name: "fk_host_vaults_vault_id",
                        column: x => x.vault_id,
                        principalSchema: "dodo",
                        principalTable: "vault",
                        principalColumn: "id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "vault_key_grant",
                schema: "dodo",
                columns: table => new
                {
                    id = table.Column<Guid>(type: "uuid", nullable: false),
                    vault_id = table.Column<Guid>(type: "uuid", nullable: false),
                    key_generation = table.Column<int>(type: "integer", nullable: false),
                    kind = table.Column<int>(type: "integer", nullable: false),
                    recipient_user_id = table.Column<Guid>(type: "uuid", nullable: true),
                    recipient_key_fingerprint = table.Column<byte[]>(type: "bytea", maxLength: 32, nullable: false),
                    wrapped_key = table.Column<byte[]>(type: "bytea", nullable: false),
                    granter_user_id = table.Column<Guid>(type: "uuid", nullable: false),
                    granter_key_fingerprint = table.Column<byte[]>(type: "bytea", maxLength: 32, nullable: false),
                    key_log_head = table.Column<byte[]>(type: "bytea", maxLength: 32, nullable: true),
                    signature = table.Column<byte[]>(type: "bytea", maxLength: 64, nullable: false),
                    state = table.Column<int>(type: "integer", nullable: false),
                    created_at_utc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
                    revoked_at_utc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
                    xmin = table.Column<uint>(type: "xid", rowVersion: true, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("pk_vault_key_grant", x => x.id);
                    table.CheckConstraint("ck_vault_key_grant_recipient", "(kind = 1 AND recipient_user_id IS NOT NULL) OR (kind <> 1 AND recipient_user_id IS NULL)");
                    table.ForeignKey(
                        name: "fk_vault_key_grant_user_account_recipient_user_id",
                        column: x => x.recipient_user_id,
                        principalSchema: "dodo",
                        principalTable: "user_account",
                        principalColumn: "id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "fk_vault_key_grant_vault_vault_id",
                        column: x => x.vault_id,
                        principalSchema: "dodo",
                        principalTable: "vault",
                        principalColumn: "id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateIndex(
                name: "ix_device_user_id",
                schema: "dodo",
                table: "device",
                column: "user_id");

            migrationBuilder.CreateIndex(
                name: "ix_host_vault_id_change_sequence",
                schema: "dodo",
                table: "host",
                columns: new[] { "vault_id", "change_sequence" });

            migrationBuilder.CreateIndex(
                name: "ix_host_vault_live",
                schema: "dodo",
                table: "host",
                column: "vault_id",
                filter: "deleted_at_utc IS NULL");

            migrationBuilder.CreateIndex(
                name: "ix_key_log_hash",
                schema: "dodo",
                table: "key_log",
                column: "hash",
                unique: true);

            migrationBuilder.CreateIndex(
                name: "ix_key_log_user_id",
                schema: "dodo",
                table: "key_log",
                column: "user_id");

            migrationBuilder.CreateIndex(
                name: "ix_sync_change_vault_id_entity_id_sequence",
                schema: "dodo",
                table: "sync_change",
                columns: new[] { "vault_id", "entity_id", "sequence" },
                descending: new[] { false, false, true });

            migrationBuilder.CreateIndex(
                name: "ix_sync_change_vault_id_sequence",
                schema: "dodo",
                table: "sync_change",
                columns: new[] { "vault_id", "sequence" });

            migrationBuilder.CreateIndex(
                name: "ix_sync_operation_receipt_vault_id_created_at_utc",
                schema: "dodo",
                table: "sync_operation_receipt",
                columns: new[] { "vault_id", "created_at_utc" });

            migrationBuilder.CreateIndex(
                name: "ix_team_slug",
                schema: "dodo",
                table: "team",
                column: "slug",
                unique: true,
                filter: "deleted_at_utc IS NULL");

            migrationBuilder.CreateIndex(
                name: "ix_team_membership_team_id_user_id",
                schema: "dodo",
                table: "team_membership",
                columns: new[] { "team_id", "user_id" },
                unique: true,
                filter: "deleted_at_utc IS NULL");

            migrationBuilder.CreateIndex(
                name: "ix_team_membership_user_id",
                schema: "dodo",
                table: "team_membership",
                column: "user_id");

            migrationBuilder.CreateIndex(
                name: "ix_user_account_email",
                schema: "dodo",
                table: "user_account",
                column: "email",
                unique: true,
                filter: "email IS NOT NULL AND deleted_at_utc IS NULL");

            migrationBuilder.CreateIndex(
                name: "ix_user_account_issuer_subject",
                schema: "dodo",
                table: "user_account",
                columns: new[] { "issuer", "subject" },
                unique: true);

            migrationBuilder.CreateIndex(
                name: "ix_user_key_current",
                schema: "dodo",
                table: "user_key",
                column: "user_id",
                unique: true,
                filter: "is_current");

            migrationBuilder.CreateIndex(
                name: "ix_user_key_fingerprint_sha256",
                schema: "dodo",
                table: "user_key",
                column: "fingerprint_sha256",
                unique: true);

            migrationBuilder.CreateIndex(
                name: "ix_user_key_user_id_generation",
                schema: "dodo",
                table: "user_key",
                columns: new[] { "user_id", "generation" },
                unique: true);

            migrationBuilder.CreateIndex(
                name: "ix_user_key_wrap_device_id",
                schema: "dodo",
                table: "user_key_wrap",
                column: "device_id");

            migrationBuilder.CreateIndex(
                name: "ix_user_key_wrap_user_device",
                schema: "dodo",
                table: "user_key_wrap",
                columns: new[] { "user_id", "device_id" },
                unique: true,
                filter: "device_id IS NOT NULL");

            migrationBuilder.CreateIndex(
                name: "ix_user_key_wrap_user_kind",
                schema: "dodo",
                table: "user_key_wrap",
                columns: new[] { "user_id", "kind" },
                unique: true,
                filter: "device_id IS NULL");

            migrationBuilder.CreateIndex(
                name: "ix_vault_owner_user_id",
                schema: "dodo",
                table: "vault",
                column: "owner_user_id");

            migrationBuilder.CreateIndex(
                name: "ix_vault_team_id",
                schema: "dodo",
                table: "vault",
                column: "team_id");

            migrationBuilder.CreateIndex(
                name: "ix_vault_key_grant_recipient_user_id",
                schema: "dodo",
                table: "vault_key_grant",
                column: "recipient_user_id");

            migrationBuilder.CreateIndex(
                name: "ix_vault_key_grant_vault_id_key_generation_recipient_user_id",
                schema: "dodo",
                table: "vault_key_grant",
                columns: new[] { "vault_id", "key_generation", "recipient_user_id" },
                unique: true,
                filter: "revoked_at_utc IS NULL AND recipient_user_id IS NOT NULL");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "host",
                schema: "dodo");

            migrationBuilder.DropTable(
                name: "key_log",
                schema: "dodo");

            migrationBuilder.DropTable(
                name: "sync_change",
                schema: "dodo");

            migrationBuilder.DropTable(
                name: "sync_operation_receipt",
                schema: "dodo");

            migrationBuilder.DropTable(
                name: "team_membership",
                schema: "dodo");

            migrationBuilder.DropTable(
                name: "user_key",
                schema: "dodo");

            migrationBuilder.DropTable(
                name: "user_key_wrap",
                schema: "dodo");

            migrationBuilder.DropTable(
                name: "vault_key_grant",
                schema: "dodo");

            migrationBuilder.DropTable(
                name: "device",
                schema: "dodo");

            migrationBuilder.DropTable(
                name: "vault",
                schema: "dodo");

            migrationBuilder.DropTable(
                name: "team",
                schema: "dodo");

            migrationBuilder.DropTable(
                name: "user_account",
                schema: "dodo");
        }
    }
}
