{
  "dialect": "sqlite",
  "id": "f96803f2-a3c4-4397-a79d-b46dfc6e7c49",
  "prevIds": [
    "c68f3a1e-cf2c-45a2-8538-df9790e43bd6"
  ],
  "version": "7",
  "ddl": [
    {
      "name": "account",
      "entityType": "tables"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "id",
      "table": "account",
      "entityType": "columns"
    },
    {
      "columns": [
        "id"
      ],
      "nameExplicit": false,
      "name": "account_pk",
      "table": "account",
      "entityType": "pks"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "account_id",
      "table": "account",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "provider_id",
      "table": "account",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "user_id",
      "table": "account",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "access_token",
      "table": "account",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "refresh_token",
      "table": "account",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "id_token",
      "table": "account",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "access_token_expires_at",
      "table": "account",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "refresh_token_expires_at",
      "table": "account",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "scope",
      "table": "account",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "password",
      "table": "account",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "(unixepoch() * 1000)",
      "generated": null,
      "name": "created_at",
      "table": "account",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "(unixepoch() * 1000)",
      "generated": null,
      "name": "updated_at",
      "table": "account",
      "entityType": "columns"
    },
    {
      "columns": [
        {
          "value": "user_id",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "account_userId_idx",
      "table": "account",
      "entityType": "indexes"
    },
    {
      "columns": [
        "user_id"
      ],
      "tableTo": "users_table",
      "columnsTo": [
        "id"
      ],
      "onUpdate": "NO ACTION",
      "onDelete": "CASCADE",
      "nameExplicit": false,
      "name": "account_user_id_users_table_id_fk",
      "table": "account",
      "entityType": "fks"
    },
    {
      "name": "app_metadata",
      "entityType": "tables"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "key",
      "table": "app_metadata",
      "entityType": "columns"
    },
    {
      "columns": [
        "key"
      ],
      "nameExplicit": false,
      "name": "app_metadata_pk",
      "table": "app_metadata",
      "entityType": "pks"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "value",
      "table": "app_metadata",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "(unixepoch() * 1000)",
      "generated": null,
      "name": "created_at",
      "table": "app_metadata",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "(unixepoch() * 1000)",
      "generated": null,
      "name": "updated_at",
      "table": "app_metadata",
      "entityType": "columns"
    },
    {
      "name": "backup_schedule_mirrors_table",
      "entityType": "tables"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": true,
      "default": null,
      "generated": null,
      "name": "id",
      "table": "backup_schedule_mirrors_table",
      "entityType": "columns"
    },
    {
      "columns": [
        "id"
      ],
      "nameExplicit": false,
      "name": "backup_schedule_mirrors_table_pk",
      "table": "backup_schedule_mirrors_table",
      "entityType": "pks"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "schedule_id",
      "table": "backup_schedule_mirrors_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "repository_id",
      "table": "backup_schedule_mirrors_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "true",
      "generated": null,
      "name": "enabled",
      "table": "backup_schedule_mirrors_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "last_copy_at",
      "table": "backup_schedule_mirrors_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "last_copy_status",
      "table": "backup_schedule_mirrors_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "last_copy_error",
      "table": "backup_schedule_mirrors_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "(unixepoch() * 1000)",
      "generated": null,
      "name": "created_at",
      "table": "backup_schedule_mirrors_table",
      "entityType": "columns"
    },
    {
      "columns": [
        {
          "value": "schedule_id",
          "isExpression": false
        },
        {
          "value": "repository_id",
          "isExpression": false
        }
      ],
      "isUnique": true,
      "where": null,
      "origin": "manual",
      "name": "backup_schedule_mirrors_table_schedule_id_repository_id_unique",
      "table": "backup_schedule_mirrors_table",
      "entityType": "indexes"
    },
    {
      "columns": [
        "schedule_id"
      ],
      "tableTo": "backup_schedules_table",
      "columnsTo": [
        "id"
      ],
      "onUpdate": "NO ACTION",
      "onDelete": "CASCADE",
      "nameExplicit": false,
      "name": "backup_schedule_mirrors_table_schedule_id_backup_schedules_table_id_fk",
      "table": "backup_schedule_mirrors_table",
      "entityType": "fks"
    },
    {
      "columns": [
        "repository_id"
      ],
      "tableTo": "repositories_table",
      "columnsTo": [
        "id"
      ],
      "onUpdate": "NO ACTION",
      "onDelete": "CASCADE",
      "nameExplicit": false,
      "name": "backup_schedule_mirrors_table_repository_id_repositories_table_id_fk",
      "table": "backup_schedule_mirrors_table",
      "entityType": "fks"
    },
    {
      "name": "backup_schedule_notifications_table",
      "entityType": "tables"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "schedule_id",
      "table": "backup_schedule_notifications_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "destination_id",
      "table": "backup_schedule_notifications_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "false",
      "generated": null,
      "name": "notify_on_start",
      "table": "backup_schedule_notifications_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "false",
      "generated": null,
      "name": "notify_on_success",
      "table": "backup_schedule_notifications_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "true",
      "generated": null,
      "name": "notify_on_warning",
      "table": "backup_schedule_notifications_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "true",
      "generated": null,
      "name": "notify_on_failure",
      "table": "backup_schedule_notifications_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "(unixepoch() * 1000)",
      "generated": null,
      "name": "created_at",
      "table": "backup_schedule_notifications_table",
      "entityType": "columns"
    },
    {
      "columns": [
        "schedule_id",
        "destination_id"
      ],
      "nameExplicit": false,
      "name": "backup_schedule_notifications_table_schedule_id_destination_id_pk",
      "table": "backup_schedule_notifications_table",
      "entityType": "pks"
    },
    {
      "columns": [
        "schedule_id"
      ],
      "tableTo": "backup_schedules_table",
      "columnsTo": [
        "id"
      ],
      "onUpdate": "NO ACTION",
      "onDelete": "CASCADE",
      "nameExplicit": false,
      "name": "backup_schedule_notifications_table_schedule_id_backup_schedules_table_id_fk",
      "table": "backup_schedule_notifications_table",
      "entityType": "fks"
    },
    {
      "columns": [
        "destination_id"
      ],
      "tableTo": "notification_destinations_table",
      "columnsTo": [
        "id"
      ],
      "onUpdate": "NO ACTION",
      "onDelete": "CASCADE",
      "nameExplicit": false,
      "name": "backup_schedule_notifications_table_destination_id_notification_destinations_table_id_fk",
      "table": "backup_schedule_notifications_table",
      "entityType": "fks"
    },
    {
      "name": "backup_schedules_table",
      "entityType": "tables"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": true,
      "default": null,
      "generated": null,
      "name": "id",
      "table": "backup_schedules_table",
      "entityType": "columns"
    },
    {
      "columns": [
        "id"
      ],
      "nameExplicit": false,
      "name": "backup_schedules_table_pk",
      "table": "backup_schedules_table",
      "entityType": "pks"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "short_id",
      "table": "backup_schedules_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "name",
      "table": "backup_schedules_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "volume_id",
      "table": "backup_schedules_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "repository_id",
      "table": "backup_schedules_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "true",
      "generated": null,
      "name": "enabled",
      "table": "backup_schedules_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "cron_expression",
      "table": "backup_schedules_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "retention_policy",
      "table": "backup_schedules_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": "'[]'",
      "generated": null,
      "name": "exclude_patterns",
      "table": "backup_schedules_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": "'[]'",
      "generated": null,
      "name": "exclude_if_present",
      "table": "backup_schedules_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": "'[]'",
      "generated": null,
      "name": "include_patterns",
      "table": "backup_schedules_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "last_backup_at",
      "table": "backup_schedules_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "last_backup_status",
      "table": "backup_schedules_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "last_backup_error",
      "table": "backup_schedules_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "next_backup_at",
      "table": "backup_schedules_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "false",
      "generated": null,
      "name": "one_file_system",
      "table": "backup_schedules_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "0",
      "generated": null,
      "name": "sort_order",
      "table": "backup_schedules_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "(unixepoch() * 1000)",
      "generated": null,
      "name": "created_at",
      "table": "backup_schedules_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "(unixepoch() * 1000)",
      "generated": null,
      "name": "updated_at",
      "table": "backup_schedules_table",
      "entityType": "columns"
    },
    {
      "columns": [
        {
          "value": "short_id",
          "isExpression": false
        }
      ],
      "isUnique": true,
      "where": null,
      "origin": "manual",
      "name": "backup_schedules_table_short_id_unique",
      "table": "backup_schedules_table",
      "entityType": "indexes"
    },
    {
      "columns": [
        {
          "value": "name",
          "isExpression": false
        }
      ],
      "isUnique": true,
      "where": null,
      "origin": "manual",
      "name": "backup_schedules_table_name_unique",
      "table": "backup_schedules_table",
      "entityType": "indexes"
    },
    {
      "columns": [
        "volume_id"
      ],
      "tableTo": "volumes_table",
      "columnsTo": [
        "id"
      ],
      "onUpdate": "NO ACTION",
      "onDelete": "CASCADE",
      "nameExplicit": false,
      "name": "backup_schedules_table_volume_id_volumes_table_id_fk",
      "table": "backup_schedules_table",
      "entityType": "fks"
    },
    {
      "columns": [
        "repository_id"
      ],
      "tableTo": "repositories_table",
      "columnsTo": [
        "id"
      ],
      "onUpdate": "NO ACTION",
      "onDelete": "CASCADE",
      "nameExplicit": false,
      "name": "backup_schedules_table_repository_id_repositories_table_id_fk",
      "table": "backup_schedules_table",
      "entityType": "fks"
    },
    {
      "name": "invitation",
      "entityType": "tables"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "id",
      "table": "invitation",
      "entityType": "columns"
    },
    {
      "columns": [
        "id"
      ],
      "nameExplicit": false,
      "name": "invitation_pk",
      "table": "invitation",
      "entityType": "pks"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "organization_id",
      "table": "invitation",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "email",
      "table": "invitation",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "role",
      "table": "invitation",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": "'pending'",
      "generated": null,
      "name": "status",
      "table": "invitation",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "expires_at",
      "table": "invitation",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "created_at",
      "table": "invitation",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "inviter_id",
      "table": "invitation",
      "entityType": "columns"
    },
    {
      "columns": [
        {
          "value": "organization_id",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "invitation_organizationId_idx",
      "table": "invitation",
      "entityType": "indexes"
    },
    {
      "columns": [
        {
          "value": "email",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "invitation_email_idx",
      "table": "invitation",
      "entityType": "indexes"
    },
    {
      "columns": [
        "organization_id"
      ],
      "tableTo": "organization",
      "columnsTo": [
        "id"
      ],
      "onUpdate": "NO ACTION",
      "onDelete": "CASCADE",
      "nameExplicit": false,
      "name": "invitation_organization_id_organization_id_fk",
      "table": "invitation",
      "entityType": "fks"
    },
    {
      "columns": [
        "inviter_id"
      ],
      "tableTo": "users_table",
      "columnsTo": [
        "id"
      ],
      "onUpdate": "NO ACTION",
      "onDelete": "CASCADE",
      "nameExplicit": false,
      "name": "invitation_inviter_id_users_table_id_fk",
      "table": "invitation",
      "entityType": "fks"
    },
    {
      "name": "member",
      "entityType": "tables"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "id",
      "table": "member",
      "entityType": "columns"
    },
    {
      "columns": [
        "id"
      ],
      "nameExplicit": false,
      "name": "member_pk",
      "table": "member",
      "entityType": "pks"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "organization_id",
      "table": "member",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "user_id",
      "table": "member",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": "'member'",
      "generated": null,
      "name": "role",
      "table": "member",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "created_at",
      "table": "member",
      "entityType": "columns"
    },
    {
      "columns": [
        {
          "value": "organization_id",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "member_organizationId_idx",
      "table": "member",
      "entityType": "indexes"
    },
    {
      "columns": [
        {
          "value": "user_id",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "member_userId_idx",
      "table": "member",
      "entityType": "indexes"
    },
    {
      "columns": [
        "organization_id"
      ],
      "tableTo": "organization",
      "columnsTo": [
        "id"
      ],
      "onUpdate": "NO ACTION",
      "onDelete": "CASCADE",
      "nameExplicit": false,
      "name": "member_organization_id_organization_id_fk",
      "table": "member",
      "entityType": "fks"
    },
    {
      "columns": [
        "user_id"
      ],
      "tableTo": "users_table",
      "columnsTo": [
        "id"
      ],
      "onUpdate": "NO ACTION",
      "onDelete": "CASCADE",
      "nameExplicit": false,
      "name": "member_user_id_users_table_id_fk",
      "table": "member",
      "entityType": "fks"
    },
    {
      "name": "notification_destinations_table",
      "entityType": "tables"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": true,
      "default": null,
      "generated": null,
      "name": "id",
      "table": "notification_destinations_table",
      "entityType": "columns"
    },
    {
      "columns": [
        "id"
      ],
      "nameExplicit": false,
      "name": "notification_destinations_table_pk",
      "table": "notification_destinations_table",
      "entityType": "pks"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "name",
      "table": "notification_destinations_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "true",
      "generated": null,
      "name": "enabled",
      "table": "notification_destinations_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "type",
      "table": "notification_destinations_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "config",
      "table": "notification_destinations_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "(unixepoch() * 1000)",
      "generated": null,
      "name": "created_at",
      "table": "notification_destinations_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "(unixepoch() * 1000)",
      "generated": null,
      "name": "updated_at",
      "table": "notification_destinations_table",
      "entityType": "columns"
    },
    {
      "columns": [
        {
          "value": "name",
          "isExpression": false
        }
      ],
      "isUnique": true,
      "where": null,
      "origin": "manual",
      "name": "notification_destinations_table_name_unique",
      "table": "notification_destinations_table",
      "entityType": "indexes"
    },
    {
      "name": "organization",
      "entityType": "tables"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "id",
      "table": "organization",
      "entityType": "columns"
    },
    {
      "columns": [
        "id"
      ],
      "nameExplicit": false,
      "name": "organization_pk",
      "table": "organization",
      "entityType": "pks"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "name",
      "table": "organization",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "slug",
      "table": "organization",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "logo",
      "table": "organization",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "created_at",
      "table": "organization",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "metadata",
      "table": "organization",
      "entityType": "columns"
    },
    {
      "columns": [
        {
          "value": "slug",
          "isExpression": false
        }
      ],
      "isUnique": true,
      "where": null,
      "origin": "manual",
      "name": "organization_slug_unique",
      "table": "organization",
      "entityType": "indexes"
    },
    {
      "columns": [
        {
          "value": "slug",
          "isExpression": false
        }
      ],
      "isUnique": true,
      "where": null,
      "origin": "manual",
      "name": "organization_slug_uidx",
      "table": "organization",
      "entityType": "indexes"
    },
    {
      "name": "repositories_table",
      "entityType": "tables"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "id",
      "table": "repositories_table",
      "entityType": "columns"
    },
    {
      "columns": [
        "id"
      ],
      "nameExplicit": false,
      "name": "repositories_table_pk",
      "table": "repositories_table",
      "entityType": "pks"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "short_id",
      "table": "repositories_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "name",
      "table": "repositories_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "type",
      "table": "repositories_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "config",
      "table": "repositories_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": "'auto'",
      "generated": null,
      "name": "compression_mode",
      "table": "repositories_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": "'unknown'",
      "generated": null,
      "name": "status",
      "table": "repositories_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "last_checked",
      "table": "repositories_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "last_error",
      "table": "repositories_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "false",
      "generated": null,
      "name": "upload_limit_enabled",
      "table": "repositories_table",
      "entityType": "columns"
    },
    {
      "type": "real",
      "notNull": true,
      "autoincrement": false,
      "default": "1",
      "generated": null,
      "name": "upload_limit_value",
      "table": "repositories_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": "'Mbps'",
      "generated": null,
      "name": "upload_limit_unit",
      "table": "repositories_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "false",
      "generated": null,
      "name": "download_limit_enabled",
      "table": "repositories_table",
      "entityType": "columns"
    },
    {
      "type": "real",
      "notNull": true,
      "autoincrement": false,
      "default": "1",
      "generated": null,
      "name": "download_limit_value",
      "table": "repositories_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": "'Mbps'",
      "generated": null,
      "name": "download_limit_unit",
      "table": "repositories_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "(unixepoch() * 1000)",
      "generated": null,
      "name": "created_at",
      "table": "repositories_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "(unixepoch() * 1000)",
      "generated": null,
      "name": "updated_at",
      "table": "repositories_table",
      "entityType": "columns"
    },
    {
      "columns": [
        {
          "value": "short_id",
          "isExpression": false
        }
      ],
      "isUnique": true,
      "where": null,
      "origin": "manual",
      "name": "repositories_table_short_id_unique",
      "table": "repositories_table",
      "entityType": "indexes"
    },
    {
      "name": "sessions_table",
      "entityType": "tables"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "id",
      "table": "sessions_table",
      "entityType": "columns"
    },
    {
      "columns": [
        "id"
      ],
      "nameExplicit": false,
      "name": "sessions_table_pk",
      "table": "sessions_table",
      "entityType": "pks"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "user_id",
      "table": "sessions_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "token",
      "table": "sessions_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "expires_at",
      "table": "sessions_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "(unixepoch() * 1000)",
      "generated": null,
      "name": "created_at",
      "table": "sessions_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "(unixepoch() * 1000)",
      "generated": null,
      "name": "updated_at",
      "table": "sessions_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "ip_address",
      "table": "sessions_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "user_agent",
      "table": "sessions_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "impersonated_by",
      "table": "sessions_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "active_organization_id",
      "table": "sessions_table",
      "entityType": "columns"
    },
    {
      "columns": [
        {
          "value": "token",
          "isExpression": false
        }
      ],
      "isUnique": true,
      "where": null,
      "origin": "manual",
      "name": "sessions_table_token_unique",
      "table": "sessions_table",
      "entityType": "indexes"
    },
    {
      "columns": [
        {
          "value": "user_id",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "sessionsTable_userId_idx",
      "table": "sessions_table",
      "entityType": "indexes"
    },
    {
      "columns": [
        "user_id"
      ],
      "tableTo": "users_table",
      "columnsTo": [
        "id"
      ],
      "onUpdate": "NO ACTION",
      "onDelete": "CASCADE",
      "nameExplicit": false,
      "name": "sessions_table_user_id_users_table_id_fk",
      "table": "sessions_table",
      "entityType": "fks"
    },
    {
      "name": "two_factor",
      "entityType": "tables"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "id",
      "table": "two_factor",
      "entityType": "columns"
    },
    {
      "columns": [
        "id"
      ],
      "nameExplicit": false,
      "name": "two_factor_pk",
      "table": "two_factor",
      "entityType": "pks"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "secret",
      "table": "two_factor",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "backup_codes",
      "table": "two_factor",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "user_id",
      "table": "two_factor",
      "entityType": "columns"
    },
    {
      "columns": [
        {
          "value": "secret",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "twoFactor_secret_idx",
      "table": "two_factor",
      "entityType": "indexes"
    },
    {
      "columns": [
        {
          "value": "user_id",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "twoFactor_userId_idx",
      "table": "two_factor",
      "entityType": "indexes"
    },
    {
      "columns": [
        "user_id"
      ],
      "tableTo": "users_table",
      "columnsTo": [
        "id"
      ],
      "onUpdate": "NO ACTION",
      "onDelete": "CASCADE",
      "nameExplicit": false,
      "name": "two_factor_user_id_users_table_id_fk",
      "table": "two_factor",
      "entityType": "fks"
    },
    {
      "name": "users_table",
      "entityType": "tables"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "id",
      "table": "users_table",
      "entityType": "columns"
    },
    {
      "columns": [
        "id"
      ],
      "nameExplicit": false,
      "name": "users_table_pk",
      "table": "users_table",
      "entityType": "pks"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "username",
      "table": "users_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "password_hash",
      "table": "users_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "false",
      "generated": null,
      "name": "has_downloaded_restic_password",
      "table": "users_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "(unixepoch() * 1000)",
      "generated": null,
      "name": "created_at",
      "table": "users_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "(unixepoch() * 1000)",
      "generated": null,
      "name": "updated_at",
      "table": "users_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "name",
      "table": "users_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "email",
      "table": "users_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "false",
      "generated": null,
      "name": "email_verified",
      "table": "users_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "image",
      "table": "users_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "display_username",
      "table": "users_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "false",
      "generated": null,
      "name": "two_factor_enabled",
      "table": "users_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "role",
      "table": "users_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": "false",
      "generated": null,
      "name": "banned",
      "table": "users_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "ban_reason",
      "table": "users_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "ban_expires",
      "table": "users_table",
      "entityType": "columns"
    },
    {
      "columns": [
        {
          "value": "username",
          "isExpression": false
        }
      ],
      "isUnique": true,
      "where": null,
      "origin": "manual",
      "name": "users_table_username_unique",
      "table": "users_table",
      "entityType": "indexes"
    },
    {
      "columns": [
        {
          "value": "email",
          "isExpression": false
        }
      ],
      "isUnique": true,
      "where": null,
      "origin": "manual",
      "name": "users_table_email_unique",
      "table": "users_table",
      "entityType": "indexes"
    },
    {
      "name": "verification",
      "entityType": "tables"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "id",
      "table": "verification",
      "entityType": "columns"
    },
    {
      "columns": [
        "id"
      ],
      "nameExplicit": false,
      "name": "verification_pk",
      "table": "verification",
      "entityType": "pks"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "identifier",
      "table": "verification",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "value",
      "table": "verification",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "expires_at",
      "table": "verification",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "(unixepoch() * 1000)",
      "generated": null,
      "name": "created_at",
      "table": "verification",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "(unixepoch() * 1000)",
      "generated": null,
      "name": "updated_at",
      "table": "verification",
      "entityType": "columns"
    },
    {
      "columns": [
        {
          "value": "identifier",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "verification_identifier_idx",
      "table": "verification",
      "entityType": "indexes"
    },
    {
      "name": "volumes_table",
      "entityType": "tables"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": true,
      "default": null,
      "generated": null,
      "name": "id",
      "table": "volumes_table",
      "entityType": "columns"
    },
    {
      "columns": [
        "id"
      ],
      "nameExplicit": false,
      "name": "volumes_table_pk",
      "table": "volumes_table",
      "entityType": "pks"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "short_id",
      "table": "volumes_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "name",
      "table": "volumes_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "type",
      "table": "volumes_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": "'unmounted'",
      "generated": null,
      "name": "status",
      "table": "volumes_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "last_error",
      "table": "volumes_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "(unixepoch() * 1000)",
      "generated": null,
      "name": "last_health_check",
      "table": "volumes_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "(unixepoch() * 1000)",
      "generated": null,
      "name": "created_at",
      "table": "volumes_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "(unixepoch() * 1000)",
      "generated": null,
      "name": "updated_at",
      "table": "volumes_table",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "config",
      "table": "volumes_table",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "true",
      "generated": null,
      "name": "auto_remount",
      "table": "volumes_table",
      "entityType": "columns"
    },
    {
      "columns": [
        {
          "value": "short_id",
          "isExpression": false
        }
      ],
      "isUnique": true,
      "where": null,
      "origin": "manual",
      "name": "volumes_table_short_id_unique",
      "table": "volumes_table",
      "entityType": "indexes"
    },
    {
      "columns": [
        {
          "value": "name",
          "isExpression": false
        }
      ],
      "isUnique": true,
      "where": null,
      "origin": "manual",
      "name": "volumes_table_name_unique",
      "table": "volumes_table",
      "entityType": "indexes"
    }
  ],
  "renames": []
}