{
  "id": "40cb8f02-ae99-4c4d-8ab2-afc170b387e3",
  "prevId": "00000000-0000-0000-0000-000000000000",
  "version": "7",
  "dialect": "postgresql",
  "tables": {
    "public.tenant_configs": {
      "name": "tenant_configs",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "tenant_id": {
          "name": "tenant_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "submission_prompt_text": {
          "name": "submission_prompt_text",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "additional_info_prompt_text": {
          "name": "additional_info_prompt_text",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "submission_max_chars": {
          "name": "submission_max_chars",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 4000
        },
        "initial_expert_invites": {
          "name": "initial_expert_invites",
          "type": "text[]",
          "primaryKey": false,
          "notNull": true,
          "default": "'{}'"
        },
        "initial_dual_access_invites": {
          "name": "initial_dual_access_invites",
          "type": "text[]",
          "primaryKey": false,
          "notNull": true,
          "default": "'{}'"
        },
        "ai_provider": {
          "name": "ai_provider",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'anthropic'"
        },
        "ai_model": {
          "name": "ai_model",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'claude-sonnet-4-6'"
        },
        "ai_temperature": {
          "name": "ai_temperature",
          "type": "real",
          "primaryKey": false,
          "notNull": true,
          "default": 0.3
        },
        "min_info_score_threshold": {
          "name": "min_info_score_threshold",
          "type": "real",
          "primaryKey": false,
          "notNull": true,
          "default": 0.7
        },
        "max_clarification_cycles": {
          "name": "max_clarification_cycles",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 2
        },
        "ai_job_timeout_seconds": {
          "name": "ai_job_timeout_seconds",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 120
        },
        "data_processing_consent": {
          "name": "data_processing_consent",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "tenant_configs_tenant_id_tenants_id_fk": {
          "name": "tenant_configs_tenant_id_tenants_id_fk",
          "tableFrom": "tenant_configs",
          "tableTo": "tenants",
          "columnsFrom": [
            "tenant_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.tenants": {
      "name": "tenants",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "slug": {
          "name": "slug",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "tenants_slug_unique": {
          "name": "tenants_slug_unique",
          "nullsNotDistinct": false,
          "columns": [
            "slug"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.accounts": {
      "name": "accounts",
      "schema": "",
      "columns": {
        "user_id": {
          "name": "user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "type": {
          "name": "type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "provider": {
          "name": "provider",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "provider_account_id": {
          "name": "provider_account_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "refresh_token": {
          "name": "refresh_token",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "access_token": {
          "name": "access_token",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "expires_at": {
          "name": "expires_at",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "token_type": {
          "name": "token_type",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "scope": {
          "name": "scope",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "id_token": {
          "name": "id_token",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "session_state": {
          "name": "session_state",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "accounts_user_id_users_id_fk": {
          "name": "accounts_user_id_users_id_fk",
          "tableFrom": "accounts",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.sessions": {
      "name": "sessions",
      "schema": "",
      "columns": {
        "session_token": {
          "name": "session_token",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "expires": {
          "name": "expires",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true
        }
      },
      "indexes": {},
      "foreignKeys": {
        "sessions_user_id_users_id_fk": {
          "name": "sessions_user_id_users_id_fk",
          "tableFrom": "sessions",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.users": {
      "name": "users",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "tenant_id": {
          "name": "tenant_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "email": {
          "name": "email",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "display_name": {
          "name": "display_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "role": {
          "name": "role",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'line_manager'"
        },
        "auth_provider": {
          "name": "auth_provider",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'magic_link'"
        },
        "auth_sub": {
          "name": "auth_sub",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "last_login_at": {
          "name": "last_login_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "users_tenant_id_tenants_id_fk": {
          "name": "users_tenant_id_tenants_id_fk",
          "tableFrom": "users",
          "tableTo": "tenants",
          "columnsFrom": [
            "tenant_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "users_email_unique": {
          "name": "users_email_unique",
          "nullsNotDistinct": false,
          "columns": [
            "email"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.verification_tokens": {
      "name": "verification_tokens",
      "schema": "",
      "columns": {
        "identifier": {
          "name": "identifier",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "token": {
          "name": "token",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "expires": {
          "name": "expires",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    }
  },
  "enums": {},
  "schemas": {},
  "sequences": {},
  "roles": {},
  "policies": {},
  "views": {},
  "_meta": {
    "columns": {},
    "schemas": {},
    "tables": {}
  }
}