buster/packages/database/drizzle/meta/0077_snapshot.json

6190 lines
164 KiB
JSON

{
"id": "69b60fbe-2657-452d-bd4b-b3a9925deb88",
"prevId": "3170cf76-f294-41e3-b4fe-e1c736607fce",
"version": "7",
"dialect": "postgresql",
"tables": {
"public.api_keys": {
"name": "api_keys",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"owner_id": {
"name": "owner_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"key": {
"name": "key",
"type": "text",
"primaryKey": false,
"notNull": true
},
"organization_id": {
"name": "organization_id",
"type": "uuid",
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"api_keys_organization_id_fkey": {
"name": "api_keys_organization_id_fkey",
"tableFrom": "api_keys",
"columnsFrom": [
"organization_id"
],
"tableTo": "organizations",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"api_keys_owner_id_fkey": {
"name": "api_keys_owner_id_fkey",
"tableFrom": "api_keys",
"columnsFrom": [
"owner_id"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"api_keys_key_key": {
"name": "api_keys_key_key",
"columns": [
"key"
],
"nullsNotDistinct": false
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.asset_permissions": {
"name": "asset_permissions",
"schema": "",
"columns": {
"identity_id": {
"name": "identity_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"identity_type": {
"name": "identity_type",
"type": "identity_type_enum",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"asset_id": {
"name": "asset_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"asset_type": {
"name": "asset_type",
"type": "asset_type_enum",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"role": {
"name": "role",
"type": "asset_permission_role_enum",
"typeSchema": "public",
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"created_by": {
"name": "created_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"updated_by": {
"name": "updated_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {
"asset_permissions_created_by_fkey": {
"name": "asset_permissions_created_by_fkey",
"tableFrom": "asset_permissions",
"columnsFrom": [
"created_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
},
"asset_permissions_updated_by_fkey": {
"name": "asset_permissions_updated_by_fkey",
"tableFrom": "asset_permissions",
"columnsFrom": [
"updated_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {
"asset_permissions_pkey": {
"name": "asset_permissions_pkey",
"columns": [
"identity_id",
"identity_type",
"asset_id",
"asset_type"
]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.asset_search": {
"name": "asset_search",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"asset_id": {
"name": "asset_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"asset_type": {
"name": "asset_type",
"type": "text",
"primaryKey": false,
"notNull": true
},
"content": {
"name": "content",
"type": "text",
"primaryKey": false,
"notNull": true
},
"organization_id": {
"name": "organization_id",
"type": "uuid",
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
"asset_search_asset_id_asset_type_idx": {
"name": "asset_search_asset_id_asset_type_idx",
"columns": [
{
"expression": "asset_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "text_ops"
},
{
"expression": "asset_type",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "text_ops"
}
],
"isUnique": true,
"with": {},
"method": "btree",
"concurrently": false
},
"pgroonga_content_index": {
"name": "pgroonga_content_index",
"columns": [
{
"expression": "content",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "pgroonga_text_full_text_search_ops_v2"
}
],
"isUnique": false,
"with": {},
"method": "pgroonga",
"concurrently": false
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.chats": {
"name": "chats",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": true
},
"organization_id": {
"name": "organization_id",
"type": "uuid",
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"created_by": {
"name": "created_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"updated_by": {
"name": "updated_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"publicly_accessible": {
"name": "publicly_accessible",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"publicly_enabled_by": {
"name": "publicly_enabled_by",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"public_expiry_date": {
"name": "public_expiry_date",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"most_recent_file_id": {
"name": "most_recent_file_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"most_recent_file_type": {
"name": "most_recent_file_type",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false
},
"most_recent_version_number": {
"name": "most_recent_version_number",
"type": "integer",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
"chats_created_at_idx": {
"name": "chats_created_at_idx",
"columns": [
{
"expression": "created_at",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "timestamptz_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"chats_created_by_idx": {
"name": "chats_created_by_idx",
"columns": [
{
"expression": "created_by",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"chats_organization_id_idx": {
"name": "chats_organization_id_idx",
"columns": [
{
"expression": "organization_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"idx_chats_most_recent_file_id": {
"name": "idx_chats_most_recent_file_id",
"columns": [
{
"expression": "most_recent_file_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"idx_chats_most_recent_file_type": {
"name": "idx_chats_most_recent_file_type",
"columns": [
{
"expression": "most_recent_file_type",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "text_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"chats_organization_id_fkey": {
"name": "chats_organization_id_fkey",
"tableFrom": "chats",
"columnsFrom": [
"organization_id"
],
"tableTo": "organizations",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "no action"
},
"chats_created_by_fkey": {
"name": "chats_created_by_fkey",
"tableFrom": "chats",
"columnsFrom": [
"created_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
},
"chats_updated_by_fkey": {
"name": "chats_updated_by_fkey",
"tableFrom": "chats",
"columnsFrom": [
"updated_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
},
"chats_publicly_enabled_by_fkey": {
"name": "chats_publicly_enabled_by_fkey",
"tableFrom": "chats",
"columnsFrom": [
"publicly_enabled_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.collections": {
"name": "collections",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"description": {
"name": "description",
"type": "text",
"primaryKey": false,
"notNull": false
},
"created_by": {
"name": "created_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"updated_by": {
"name": "updated_by",
"type": "uuid",
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"organization_id": {
"name": "organization_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {
"collections_organization_id_fkey": {
"name": "collections_organization_id_fkey",
"tableFrom": "collections",
"columnsFrom": [
"organization_id"
],
"tableTo": "organizations",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
},
"collections_created_by_fkey": {
"name": "collections_created_by_fkey",
"tableFrom": "collections",
"columnsFrom": [
"created_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
},
"collections_updated_by_fkey": {
"name": "collections_updated_by_fkey",
"tableFrom": "collections",
"columnsFrom": [
"updated_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.collections_to_assets": {
"name": "collections_to_assets",
"schema": "",
"columns": {
"collection_id": {
"name": "collection_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"asset_id": {
"name": "asset_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"asset_type": {
"name": "asset_type",
"type": "asset_type_enum",
"typeSchema": "public",
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"created_by": {
"name": "created_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"updated_by": {
"name": "updated_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {
"collections_to_assets_created_by_fkey": {
"name": "collections_to_assets_created_by_fkey",
"tableFrom": "collections_to_assets",
"columnsFrom": [
"created_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
},
"collections_to_assets_updated_by_fkey": {
"name": "collections_to_assets_updated_by_fkey",
"tableFrom": "collections_to_assets",
"columnsFrom": [
"updated_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {
"collections_to_assets_pkey": {
"name": "collections_to_assets_pkey",
"columns": [
"collection_id",
"asset_id",
"asset_type"
]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.dashboard_files": {
"name": "dashboard_files",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"name": {
"name": "name",
"type": "varchar",
"primaryKey": false,
"notNull": true
},
"file_name": {
"name": "file_name",
"type": "varchar",
"primaryKey": false,
"notNull": true
},
"content": {
"name": "content",
"type": "jsonb",
"primaryKey": false,
"notNull": true
},
"filter": {
"name": "filter",
"type": "varchar",
"primaryKey": false,
"notNull": false
},
"organization_id": {
"name": "organization_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"created_by": {
"name": "created_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "CURRENT_TIMESTAMP"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "CURRENT_TIMESTAMP"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"publicly_accessible": {
"name": "publicly_accessible",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"publicly_enabled_by": {
"name": "publicly_enabled_by",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"public_expiry_date": {
"name": "public_expiry_date",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"version_history": {
"name": "version_history",
"type": "jsonb",
"primaryKey": false,
"notNull": true,
"default": "'{}'::jsonb"
},
"public_password": {
"name": "public_password",
"type": "text",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
"dashboard_files_created_by_idx": {
"name": "dashboard_files_created_by_idx",
"columns": [
{
"expression": "created_by",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"dashboard_files_deleted_at_idx": {
"name": "dashboard_files_deleted_at_idx",
"columns": [
{
"expression": "deleted_at",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "timestamptz_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"dashboard_files_organization_id_idx": {
"name": "dashboard_files_organization_id_idx",
"columns": [
{
"expression": "organization_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"dashboard_files_created_by_fkey": {
"name": "dashboard_files_created_by_fkey",
"tableFrom": "dashboard_files",
"columnsFrom": [
"created_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
},
"dashboard_files_publicly_enabled_by_fkey": {
"name": "dashboard_files_publicly_enabled_by_fkey",
"tableFrom": "dashboard_files",
"columnsFrom": [
"publicly_enabled_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.dashboard_versions": {
"name": "dashboard_versions",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"dashboard_id": {
"name": "dashboard_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"config": {
"name": "config",
"type": "jsonb",
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"dashboard_versions_dashboard_id_fkey": {
"name": "dashboard_versions_dashboard_id_fkey",
"tableFrom": "dashboard_versions",
"columnsFrom": [
"dashboard_id"
],
"tableTo": "dashboards",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.dashboards": {
"name": "dashboards",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"description": {
"name": "description",
"type": "text",
"primaryKey": false,
"notNull": false
},
"config": {
"name": "config",
"type": "jsonb",
"primaryKey": false,
"notNull": true
},
"publicly_accessible": {
"name": "publicly_accessible",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"publicly_enabled_by": {
"name": "publicly_enabled_by",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"public_expiry_date": {
"name": "public_expiry_date",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"password_secret_id": {
"name": "password_secret_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"created_by": {
"name": "created_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"updated_by": {
"name": "updated_by",
"type": "uuid",
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"organization_id": {
"name": "organization_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {
"dashboards_publicly_enabled_by_fkey": {
"name": "dashboards_publicly_enabled_by_fkey",
"tableFrom": "dashboards",
"columnsFrom": [
"publicly_enabled_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
},
"dashboards_organization_id_fkey": {
"name": "dashboards_organization_id_fkey",
"tableFrom": "dashboards",
"columnsFrom": [
"organization_id"
],
"tableTo": "organizations",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
},
"dashboards_created_by_fkey": {
"name": "dashboards_created_by_fkey",
"tableFrom": "dashboards",
"columnsFrom": [
"created_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
},
"dashboards_updated_by_fkey": {
"name": "dashboards_updated_by_fkey",
"tableFrom": "dashboards",
"columnsFrom": [
"updated_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.data_sources": {
"name": "data_sources",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"type": {
"name": "type",
"type": "text",
"primaryKey": false,
"notNull": true
},
"secret_id": {
"name": "secret_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"onboarding_status": {
"name": "onboarding_status",
"type": "data_source_onboarding_status_enum",
"typeSchema": "public",
"primaryKey": false,
"notNull": true,
"default": "'notStarted'"
},
"onboarding_error": {
"name": "onboarding_error",
"type": "text",
"primaryKey": false,
"notNull": false
},
"organization_id": {
"name": "organization_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"created_by": {
"name": "created_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"updated_by": {
"name": "updated_by",
"type": "uuid",
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"env": {
"name": "env",
"type": "varchar",
"primaryKey": false,
"notNull": true,
"default": "'dev'"
}
},
"indexes": {},
"foreignKeys": {
"data_sources_organization_id_fkey": {
"name": "data_sources_organization_id_fkey",
"tableFrom": "data_sources",
"columnsFrom": [
"organization_id"
],
"tableTo": "organizations",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"data_sources_created_by_fkey": {
"name": "data_sources_created_by_fkey",
"tableFrom": "data_sources",
"columnsFrom": [
"created_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
},
"data_sources_updated_by_fkey": {
"name": "data_sources_updated_by_fkey",
"tableFrom": "data_sources",
"columnsFrom": [
"updated_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"data_sources_name_organization_id_env_key": {
"name": "data_sources_name_organization_id_env_key",
"columns": [
"name",
"organization_id",
"env"
],
"nullsNotDistinct": false
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.database_metadata": {
"name": "database_metadata",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"data_source_id": {
"name": "data_source_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"owner": {
"name": "owner",
"type": "text",
"primaryKey": false,
"notNull": false
},
"comment": {
"name": "comment",
"type": "text",
"primaryKey": false,
"notNull": false
},
"created": {
"name": "created",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"last_modified": {
"name": "last_modified",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"metadata": {
"name": "metadata",
"type": "jsonb",
"primaryKey": false,
"notNull": true,
"default": "'{}'::jsonb"
},
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
"database_metadata_data_source_id_idx": {
"name": "database_metadata_data_source_id_idx",
"columns": [
{
"expression": "data_source_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"database_metadata_data_source_id_fkey": {
"name": "database_metadata_data_source_id_fkey",
"tableFrom": "database_metadata",
"columnsFrom": [
"data_source_id"
],
"tableTo": "data_sources",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"database_metadata_data_source_id_name_key": {
"name": "database_metadata_data_source_id_name_key",
"columns": [
"data_source_id",
"name"
],
"nullsNotDistinct": false
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.dataset_columns": {
"name": "dataset_columns",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true
},
"dataset_id": {
"name": "dataset_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"type": {
"name": "type",
"type": "text",
"primaryKey": false,
"notNull": true
},
"description": {
"name": "description",
"type": "text",
"primaryKey": false,
"notNull": false
},
"nullable": {
"name": "nullable",
"type": "boolean",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"updated_at": {
"name": "updated_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"stored_values": {
"name": "stored_values",
"type": "boolean",
"primaryKey": false,
"notNull": false,
"default": false
},
"stored_values_status": {
"name": "stored_values_status",
"type": "stored_values_status_enum",
"typeSchema": "public",
"primaryKey": false,
"notNull": false
},
"stored_values_error": {
"name": "stored_values_error",
"type": "text",
"primaryKey": false,
"notNull": false
},
"stored_values_count": {
"name": "stored_values_count",
"type": "bigint",
"primaryKey": false,
"notNull": false
},
"stored_values_last_synced": {
"name": "stored_values_last_synced",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"semantic_type": {
"name": "semantic_type",
"type": "text",
"primaryKey": false,
"notNull": false
},
"dim_type": {
"name": "dim_type",
"type": "text",
"primaryKey": false,
"notNull": false
},
"expr": {
"name": "expr",
"type": "text",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"unique_dataset_column_name": {
"name": "unique_dataset_column_name",
"columns": [
"dataset_id",
"name"
],
"nullsNotDistinct": false
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.dataset_groups": {
"name": "dataset_groups",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"organization_id": {
"name": "organization_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"name": {
"name": "name",
"type": "varchar",
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
"dataset_groups_deleted_at_idx": {
"name": "dataset_groups_deleted_at_idx",
"columns": [
{
"expression": "deleted_at",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "timestamptz_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"dataset_groups_organization_id_idx": {
"name": "dataset_groups_organization_id_idx",
"columns": [
{
"expression": "organization_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"dataset_groups_organization_id_fkey": {
"name": "dataset_groups_organization_id_fkey",
"tableFrom": "dataset_groups",
"columnsFrom": [
"organization_id"
],
"tableTo": "organizations",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {
"dataset_groups_policy": {
"name": "dataset_groups_policy",
"as": "PERMISSIVE",
"for": "ALL",
"to": [
"authenticated"
],
"using": "true"
}
},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.dataset_groups_permissions": {
"name": "dataset_groups_permissions",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"dataset_group_id": {
"name": "dataset_group_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"permission_id": {
"name": "permission_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"permission_type": {
"name": "permission_type",
"type": "varchar",
"primaryKey": false,
"notNull": true
},
"organization_id": {
"name": "organization_id",
"type": "uuid",
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
"dataset_groups_permissions_dataset_group_id_idx": {
"name": "dataset_groups_permissions_dataset_group_id_idx",
"columns": [
{
"expression": "dataset_group_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"dataset_groups_permissions_organization_id_idx": {
"name": "dataset_groups_permissions_organization_id_idx",
"columns": [
{
"expression": "organization_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"dataset_groups_permissions_permission_id_idx": {
"name": "dataset_groups_permissions_permission_id_idx",
"columns": [
{
"expression": "permission_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"dataset_groups_permissions_dataset_group_id_fkey": {
"name": "dataset_groups_permissions_dataset_group_id_fkey",
"tableFrom": "dataset_groups_permissions",
"columnsFrom": [
"dataset_group_id"
],
"tableTo": "dataset_groups",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "no action"
},
"dataset_groups_permissions_organization_id_fkey": {
"name": "dataset_groups_permissions_organization_id_fkey",
"tableFrom": "dataset_groups_permissions",
"columnsFrom": [
"organization_id"
],
"tableTo": "organizations",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"unique_dataset_group_permission": {
"name": "unique_dataset_group_permission",
"columns": [
"dataset_group_id",
"permission_id",
"permission_type"
],
"nullsNotDistinct": false
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.dataset_permissions": {
"name": "dataset_permissions",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"organization_id": {
"name": "organization_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"dataset_id": {
"name": "dataset_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"permission_id": {
"name": "permission_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"permission_type": {
"name": "permission_type",
"type": "varchar",
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
"dataset_permissions_dataset_id_idx": {
"name": "dataset_permissions_dataset_id_idx",
"columns": [
{
"expression": "dataset_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"dataset_permissions_deleted_at_idx": {
"name": "dataset_permissions_deleted_at_idx",
"columns": [
{
"expression": "deleted_at",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "timestamptz_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"dataset_permissions_organization_id_idx": {
"name": "dataset_permissions_organization_id_idx",
"columns": [
{
"expression": "organization_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"dataset_permissions_permission_lookup_idx": {
"name": "dataset_permissions_permission_lookup_idx",
"columns": [
{
"expression": "permission_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
},
{
"expression": "permission_type",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "text_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"dataset_permissions_organization_id_fkey": {
"name": "dataset_permissions_organization_id_fkey",
"tableFrom": "dataset_permissions",
"columnsFrom": [
"organization_id"
],
"tableTo": "organizations",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"dataset_permissions_dataset_id_fkey": {
"name": "dataset_permissions_dataset_id_fkey",
"tableFrom": "dataset_permissions",
"columnsFrom": [
"dataset_id"
],
"tableTo": "datasets",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"dataset_permissions_dataset_id_permission_id_permission_typ_key": {
"name": "dataset_permissions_dataset_id_permission_id_permission_typ_key",
"columns": [
"dataset_id",
"permission_id",
"permission_type"
],
"nullsNotDistinct": false
}
},
"policies": {
"dataset_permissions_policy": {
"name": "dataset_permissions_policy",
"as": "PERMISSIVE",
"for": "ALL",
"to": [
"authenticated"
],
"using": "true"
}
},
"checkConstraints": {
"dataset_permissions_permission_type_check": {
"name": "dataset_permissions_permission_type_check",
"value": "(permission_type)::text = ANY ((ARRAY['user'::character varying, 'dataset_group'::character varying, 'permission_group'::character varying])::text[])"
}
},
"isRLSEnabled": false
},
"public.datasets": {
"name": "datasets",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"database_name": {
"name": "database_name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"when_to_use": {
"name": "when_to_use",
"type": "text",
"primaryKey": false,
"notNull": false
},
"when_not_to_use": {
"name": "when_not_to_use",
"type": "text",
"primaryKey": false,
"notNull": false
},
"type": {
"name": "type",
"type": "dataset_type_enum",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"definition": {
"name": "definition",
"type": "text",
"primaryKey": false,
"notNull": true
},
"schema": {
"name": "schema",
"type": "text",
"primaryKey": false,
"notNull": true
},
"enabled": {
"name": "enabled",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"imported": {
"name": "imported",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"data_source_id": {
"name": "data_source_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"organization_id": {
"name": "organization_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"created_by": {
"name": "created_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"updated_by": {
"name": "updated_by",
"type": "uuid",
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"model": {
"name": "model",
"type": "text",
"primaryKey": false,
"notNull": false
},
"yml_file": {
"name": "yml_file",
"type": "text",
"primaryKey": false,
"notNull": false
},
"database_identifier": {
"name": "database_identifier",
"type": "text",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"datasets_data_source_id_fkey": {
"name": "datasets_data_source_id_fkey",
"tableFrom": "datasets",
"columnsFrom": [
"data_source_id"
],
"tableTo": "data_sources",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"datasets_organization_id_fkey": {
"name": "datasets_organization_id_fkey",
"tableFrom": "datasets",
"columnsFrom": [
"organization_id"
],
"tableTo": "organizations",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"datasets_created_by_fkey": {
"name": "datasets_created_by_fkey",
"tableFrom": "datasets",
"columnsFrom": [
"created_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
},
"datasets_updated_by_fkey": {
"name": "datasets_updated_by_fkey",
"tableFrom": "datasets",
"columnsFrom": [
"updated_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"datasets_database_name_data_source_id_key": {
"name": "datasets_database_name_data_source_id_key",
"columns": [
"database_name",
"data_source_id"
],
"nullsNotDistinct": false
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.datasets_to_dataset_groups": {
"name": "datasets_to_dataset_groups",
"schema": "",
"columns": {
"dataset_id": {
"name": "dataset_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"dataset_group_id": {
"name": "dataset_group_id",
"type": "uuid",
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
"datasets_to_dataset_groups_dataset_group_id_idx": {
"name": "datasets_to_dataset_groups_dataset_group_id_idx",
"columns": [
{
"expression": "dataset_group_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"datasets_to_dataset_groups_dataset_id_fkey": {
"name": "datasets_to_dataset_groups_dataset_id_fkey",
"tableFrom": "datasets_to_dataset_groups",
"columnsFrom": [
"dataset_id"
],
"tableTo": "datasets",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"datasets_to_dataset_groups_dataset_group_id_fkey": {
"name": "datasets_to_dataset_groups_dataset_group_id_fkey",
"tableFrom": "datasets_to_dataset_groups",
"columnsFrom": [
"dataset_group_id"
],
"tableTo": "dataset_groups",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
}
},
"compositePrimaryKeys": {
"datasets_to_dataset_groups_pkey": {
"name": "datasets_to_dataset_groups_pkey",
"columns": [
"dataset_id",
"dataset_group_id"
]
}
},
"uniqueConstraints": {},
"policies": {
"datasets_to_dataset_groups_policy": {
"name": "datasets_to_dataset_groups_policy",
"as": "PERMISSIVE",
"for": "ALL",
"to": [
"authenticated"
],
"using": "true"
}
},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.datasets_to_permission_groups": {
"name": "datasets_to_permission_groups",
"schema": "",
"columns": {
"dataset_id": {
"name": "dataset_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"permission_group_id": {
"name": "permission_group_id",
"type": "uuid",
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"datasets_to_permission_groups_dataset_id_fkey": {
"name": "datasets_to_permission_groups_dataset_id_fkey",
"tableFrom": "datasets_to_permission_groups",
"columnsFrom": [
"dataset_id"
],
"tableTo": "datasets",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"datasets_to_permission_groups_permission_group_id_fkey": {
"name": "datasets_to_permission_groups_permission_group_id_fkey",
"tableFrom": "datasets_to_permission_groups",
"columnsFrom": [
"permission_group_id"
],
"tableTo": "permission_groups",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
}
},
"compositePrimaryKeys": {
"datasets_to_permission_groups_pkey": {
"name": "datasets_to_permission_groups_pkey",
"columns": [
"dataset_id",
"permission_group_id"
]
}
},
"uniqueConstraints": {},
"policies": {
"datasets_to_permission_groups_policy": {
"name": "datasets_to_permission_groups_policy",
"as": "PERMISSIVE",
"for": "ALL",
"to": [
"authenticated"
],
"using": "true"
}
},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.__diesel_schema_migrations": {
"name": "__diesel_schema_migrations",
"schema": "",
"columns": {
"version": {
"name": "version",
"type": "varchar(50)",
"primaryKey": true,
"notNull": true
},
"run_on": {
"name": "run_on",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "CURRENT_TIMESTAMP"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {
"diesel_schema_migrations_policy": {
"name": "diesel_schema_migrations_policy",
"as": "PERMISSIVE",
"for": "ALL",
"to": [
"authenticated"
],
"using": "true"
}
},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.entity_relationship": {
"name": "entity_relationship",
"schema": "",
"columns": {
"primary_dataset_id": {
"name": "primary_dataset_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"foreign_dataset_id": {
"name": "foreign_dataset_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"relationship_type": {
"name": "relationship_type",
"type": "text",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"entity_relationship_pkey": {
"name": "entity_relationship_pkey",
"columns": [
"primary_dataset_id",
"foreign_dataset_id"
]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.messages": {
"name": "messages",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"request_message": {
"name": "request_message",
"type": "text",
"primaryKey": false,
"notNull": false
},
"response_messages": {
"name": "response_messages",
"type": "jsonb",
"primaryKey": false,
"notNull": true
},
"reasoning": {
"name": "reasoning",
"type": "jsonb",
"primaryKey": false,
"notNull": true
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": true
},
"raw_llm_messages": {
"name": "raw_llm_messages",
"type": "jsonb",
"primaryKey": false,
"notNull": true
},
"final_reasoning_message": {
"name": "final_reasoning_message",
"type": "text",
"primaryKey": false,
"notNull": false
},
"chat_id": {
"name": "chat_id",
"type": "uuid",
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"created_by": {
"name": "created_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"feedback": {
"name": "feedback",
"type": "text",
"primaryKey": false,
"notNull": false
},
"is_completed": {
"name": "is_completed",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"post_processing_message": {
"name": "post_processing_message",
"type": "jsonb",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
"messages_chat_id_idx": {
"name": "messages_chat_id_idx",
"columns": [
{
"expression": "chat_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"messages_created_at_idx": {
"name": "messages_created_at_idx",
"columns": [
{
"expression": "created_at",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "timestamptz_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"messages_created_by_idx": {
"name": "messages_created_by_idx",
"columns": [
{
"expression": "created_by",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"messages_chat_id_fkey": {
"name": "messages_chat_id_fkey",
"tableFrom": "messages",
"columnsFrom": [
"chat_id"
],
"tableTo": "chats",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "no action"
},
"messages_created_by_fkey": {
"name": "messages_created_by_fkey",
"tableFrom": "messages",
"columnsFrom": [
"created_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.messages_deprecated": {
"name": "messages_deprecated",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"thread_id": {
"name": "thread_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"sent_by": {
"name": "sent_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"message": {
"name": "message",
"type": "text",
"primaryKey": false,
"notNull": true
},
"responses": {
"name": "responses",
"type": "jsonb",
"primaryKey": false,
"notNull": false
},
"code": {
"name": "code",
"type": "text",
"primaryKey": false,
"notNull": false
},
"context": {
"name": "context",
"type": "jsonb",
"primaryKey": false,
"notNull": false
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": false
},
"feedback": {
"name": "feedback",
"type": "message_feedback_enum",
"typeSchema": "public",
"primaryKey": false,
"notNull": false
},
"verification": {
"name": "verification",
"type": "verification_enum",
"typeSchema": "public",
"primaryKey": false,
"notNull": true,
"default": "'notRequested'"
},
"dataset_id": {
"name": "dataset_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"chart_config": {
"name": "chart_config",
"type": "jsonb",
"primaryKey": false,
"notNull": false,
"default": "'{}'::jsonb"
},
"chart_recommendations": {
"name": "chart_recommendations",
"type": "jsonb",
"primaryKey": false,
"notNull": false,
"default": "'{}'::jsonb"
},
"time_frame": {
"name": "time_frame",
"type": "text",
"primaryKey": false,
"notNull": false
},
"data_metadata": {
"name": "data_metadata",
"type": "jsonb",
"primaryKey": false,
"notNull": false
},
"draft_session_id": {
"name": "draft_session_id",
"type": "uuid",
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"draft_state": {
"name": "draft_state",
"type": "jsonb",
"primaryKey": false,
"notNull": false
},
"summary_question": {
"name": "summary_question",
"type": "text",
"primaryKey": false,
"notNull": false
},
"sql_evaluation_id": {
"name": "sql_evaluation_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"messages_sent_by_fkey": {
"name": "messages_sent_by_fkey",
"tableFrom": "messages_deprecated",
"columnsFrom": [
"sent_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
},
"messages_dataset_id_fkey": {
"name": "messages_dataset_id_fkey",
"tableFrom": "messages_deprecated",
"columnsFrom": [
"dataset_id"
],
"tableTo": "datasets",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"messages_deprecated_sent_by_fkey": {
"name": "messages_deprecated_sent_by_fkey",
"tableFrom": "messages_deprecated",
"columnsFrom": [
"sent_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.messages_to_files": {
"name": "messages_to_files",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true
},
"message_id": {
"name": "message_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"file_id": {
"name": "file_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "CURRENT_TIMESTAMP"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "CURRENT_TIMESTAMP"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"is_duplicate": {
"name": "is_duplicate",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"version_number": {
"name": "version_number",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 1
}
},
"indexes": {
"messages_files_file_id_idx": {
"name": "messages_files_file_id_idx",
"columns": [
{
"expression": "file_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"messages_files_message_id_idx": {
"name": "messages_files_message_id_idx",
"columns": [
{
"expression": "message_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"messages_to_files_message_id_fkey": {
"name": "messages_to_files_message_id_fkey",
"tableFrom": "messages_to_files",
"columnsFrom": [
"message_id"
],
"tableTo": "messages",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"messages_to_files_message_id_file_id_key": {
"name": "messages_to_files_message_id_file_id_key",
"columns": [
"message_id",
"file_id"
],
"nullsNotDistinct": false
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.messages_to_slack_messages": {
"name": "messages_to_slack_messages",
"schema": "",
"columns": {
"message_id": {
"name": "message_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"slack_message_id": {
"name": "slack_message_id",
"type": "uuid",
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
"messages_to_slack_messages_message_id_idx": {
"name": "messages_to_slack_messages_message_id_idx",
"columns": [
{
"expression": "message_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"messages_to_slack_messages_slack_message_id_idx": {
"name": "messages_to_slack_messages_slack_message_id_idx",
"columns": [
{
"expression": "slack_message_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"messages_to_slack_messages_message_id_fkey": {
"name": "messages_to_slack_messages_message_id_fkey",
"tableFrom": "messages_to_slack_messages",
"columnsFrom": [
"message_id"
],
"tableTo": "messages",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"messages_to_slack_messages_slack_message_id_fkey": {
"name": "messages_to_slack_messages_slack_message_id_fkey",
"tableFrom": "messages_to_slack_messages",
"columnsFrom": [
"slack_message_id"
],
"tableTo": "slack_message_tracking",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
}
},
"compositePrimaryKeys": {
"messages_to_slack_messages_pkey": {
"name": "messages_to_slack_messages_pkey",
"columns": [
"message_id",
"slack_message_id"
]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.metric_files": {
"name": "metric_files",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"name": {
"name": "name",
"type": "varchar",
"primaryKey": false,
"notNull": true
},
"file_name": {
"name": "file_name",
"type": "varchar",
"primaryKey": false,
"notNull": true
},
"content": {
"name": "content",
"type": "jsonb",
"primaryKey": false,
"notNull": true
},
"verification": {
"name": "verification",
"type": "verification_enum",
"typeSchema": "public",
"primaryKey": false,
"notNull": true,
"default": "'notRequested'"
},
"evaluation_obj": {
"name": "evaluation_obj",
"type": "jsonb",
"primaryKey": false,
"notNull": false
},
"evaluation_summary": {
"name": "evaluation_summary",
"type": "text",
"primaryKey": false,
"notNull": false
},
"evaluation_score": {
"name": "evaluation_score",
"type": "double precision",
"primaryKey": false,
"notNull": false
},
"organization_id": {
"name": "organization_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"created_by": {
"name": "created_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "CURRENT_TIMESTAMP"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "CURRENT_TIMESTAMP"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"publicly_accessible": {
"name": "publicly_accessible",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"publicly_enabled_by": {
"name": "publicly_enabled_by",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"public_expiry_date": {
"name": "public_expiry_date",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"version_history": {
"name": "version_history",
"type": "jsonb",
"primaryKey": false,
"notNull": true,
"default": "'{}'::jsonb"
},
"data_metadata": {
"name": "data_metadata",
"type": "jsonb",
"primaryKey": false,
"notNull": false
},
"public_password": {
"name": "public_password",
"type": "text",
"primaryKey": false,
"notNull": false
},
"data_source_id": {
"name": "data_source_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
}
},
"indexes": {
"metric_files_created_by_idx": {
"name": "metric_files_created_by_idx",
"columns": [
{
"expression": "created_by",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"metric_files_data_metadata_idx": {
"name": "metric_files_data_metadata_idx",
"columns": [
{
"expression": "data_metadata",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "jsonb_ops"
}
],
"isUnique": false,
"with": {},
"method": "gin",
"concurrently": false
},
"metric_files_deleted_at_idx": {
"name": "metric_files_deleted_at_idx",
"columns": [
{
"expression": "deleted_at",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "timestamptz_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"metric_files_organization_id_idx": {
"name": "metric_files_organization_id_idx",
"columns": [
{
"expression": "organization_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"metric_files_created_by_fkey": {
"name": "metric_files_created_by_fkey",
"tableFrom": "metric_files",
"columnsFrom": [
"created_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
},
"metric_files_publicly_enabled_by_fkey": {
"name": "metric_files_publicly_enabled_by_fkey",
"tableFrom": "metric_files",
"columnsFrom": [
"publicly_enabled_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
},
"fk_data_source": {
"name": "fk_data_source",
"tableFrom": "metric_files",
"columnsFrom": [
"data_source_id"
],
"tableTo": "data_sources",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.metric_files_to_dashboard_files": {
"name": "metric_files_to_dashboard_files",
"schema": "",
"columns": {
"metric_file_id": {
"name": "metric_file_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"dashboard_file_id": {
"name": "dashboard_file_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "CURRENT_TIMESTAMP"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "CURRENT_TIMESTAMP"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"created_by": {
"name": "created_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
}
},
"indexes": {
"metric_files_to_dashboard_files_dashboard_id_idx": {
"name": "metric_files_to_dashboard_files_dashboard_id_idx",
"columns": [
{
"expression": "dashboard_file_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"metric_files_to_dashboard_files_deleted_at_idx": {
"name": "metric_files_to_dashboard_files_deleted_at_idx",
"columns": [
{
"expression": "deleted_at",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "timestamptz_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"metric_files_to_dashboard_files_metric_id_idx": {
"name": "metric_files_to_dashboard_files_metric_id_idx",
"columns": [
{
"expression": "metric_file_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"metric_files_to_dashboard_files_metric_file_id_fkey": {
"name": "metric_files_to_dashboard_files_metric_file_id_fkey",
"tableFrom": "metric_files_to_dashboard_files",
"columnsFrom": [
"metric_file_id"
],
"tableTo": "metric_files",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "no action"
},
"metric_files_to_dashboard_files_dashboard_file_id_fkey": {
"name": "metric_files_to_dashboard_files_dashboard_file_id_fkey",
"tableFrom": "metric_files_to_dashboard_files",
"columnsFrom": [
"dashboard_file_id"
],
"tableTo": "dashboard_files",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "no action"
},
"metric_files_to_dashboard_files_created_by_fkey": {
"name": "metric_files_to_dashboard_files_created_by_fkey",
"tableFrom": "metric_files_to_dashboard_files",
"columnsFrom": [
"created_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {
"metric_files_to_dashboard_files_pkey": {
"name": "metric_files_to_dashboard_files_pkey",
"columns": [
"metric_file_id",
"dashboard_file_id"
]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.metric_files_to_datasets": {
"name": "metric_files_to_datasets",
"schema": "",
"columns": {
"metric_file_id": {
"name": "metric_file_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"dataset_id": {
"name": "dataset_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"metric_version_number": {
"name": "metric_version_number",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"fk_metric_file": {
"name": "fk_metric_file",
"tableFrom": "metric_files_to_datasets",
"columnsFrom": [
"metric_file_id"
],
"tableTo": "metric_files",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"fk_dataset": {
"name": "fk_dataset",
"tableFrom": "metric_files_to_datasets",
"columnsFrom": [
"dataset_id"
],
"tableTo": "datasets",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
}
},
"compositePrimaryKeys": {
"metric_files_to_datasets_pkey": {
"name": "metric_files_to_datasets_pkey",
"columns": [
"metric_file_id",
"dataset_id",
"metric_version_number"
]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.organizations": {
"name": "organizations",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"domain": {
"name": "domain",
"type": "text",
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"payment_required": {
"name": "payment_required",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"domains": {
"name": "domains",
"type": "text[]",
"primaryKey": false,
"notNull": false
},
"restrict_new_user_invitations": {
"name": "restrict_new_user_invitations",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"defaultRole": {
"name": "defaultRole",
"type": "user_organization_role_enum",
"typeSchema": "public",
"primaryKey": false,
"notNull": true,
"default": "'restricted_querier'"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"organizations_name_key": {
"name": "organizations_name_key",
"columns": [
"name"
],
"nullsNotDistinct": false
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.permission_groups": {
"name": "permission_groups",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"organization_id": {
"name": "organization_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"created_by": {
"name": "created_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"updated_by": {
"name": "updated_by",
"type": "uuid",
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"permission_groups_organization_id_fkey": {
"name": "permission_groups_organization_id_fkey",
"tableFrom": "permission_groups",
"columnsFrom": [
"organization_id"
],
"tableTo": "organizations",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"permission_groups_created_by_fkey": {
"name": "permission_groups_created_by_fkey",
"tableFrom": "permission_groups",
"columnsFrom": [
"created_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
},
"permission_groups_updated_by_fkey": {
"name": "permission_groups_updated_by_fkey",
"tableFrom": "permission_groups",
"columnsFrom": [
"updated_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.permission_groups_to_identities": {
"name": "permission_groups_to_identities",
"schema": "",
"columns": {
"permission_group_id": {
"name": "permission_group_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"identity_id": {
"name": "identity_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"identity_type": {
"name": "identity_type",
"type": "identity_type_enum",
"typeSchema": "public",
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"created_by": {
"name": "created_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"updated_by": {
"name": "updated_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {
"permission_groups_to_identities_created_by_fkey": {
"name": "permission_groups_to_identities_created_by_fkey",
"tableFrom": "permission_groups_to_identities",
"columnsFrom": [
"created_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
},
"permission_groups_to_identities_updated_by_fkey": {
"name": "permission_groups_to_identities_updated_by_fkey",
"tableFrom": "permission_groups_to_identities",
"columnsFrom": [
"updated_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {
"permission_groups_to_identities_pkey": {
"name": "permission_groups_to_identities_pkey",
"columns": [
"permission_group_id",
"identity_id",
"identity_type"
]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.permission_groups_to_users": {
"name": "permission_groups_to_users",
"schema": "",
"columns": {
"permission_group_id": {
"name": "permission_group_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"user_id": {
"name": "user_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {
"permission_groups_to_users_user_id_idx": {
"name": "permission_groups_to_users_user_id_idx",
"columns": [
{
"expression": "user_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"permission_groups_to_users_permission_group_id_fkey": {
"name": "permission_groups_to_users_permission_group_id_fkey",
"tableFrom": "permission_groups_to_users",
"columnsFrom": [
"permission_group_id"
],
"tableTo": "permission_groups",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"permission_groups_to_users_user_id_fkey": {
"name": "permission_groups_to_users_user_id_fkey",
"tableFrom": "permission_groups_to_users",
"columnsFrom": [
"user_id"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {
"permission_groups_to_users_pkey": {
"name": "permission_groups_to_users_pkey",
"columns": [
"permission_group_id",
"user_id"
]
}
},
"uniqueConstraints": {},
"policies": {
"permission_groups_to_users_policy": {
"name": "permission_groups_to_users_policy",
"as": "PERMISSIVE",
"for": "ALL",
"to": [
"authenticated"
],
"using": "true"
}
},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.schema_metadata": {
"name": "schema_metadata",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"data_source_id": {
"name": "data_source_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"database_id": {
"name": "database_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"database_name": {
"name": "database_name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"owner": {
"name": "owner",
"type": "text",
"primaryKey": false,
"notNull": false
},
"comment": {
"name": "comment",
"type": "text",
"primaryKey": false,
"notNull": false
},
"created": {
"name": "created",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"last_modified": {
"name": "last_modified",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"metadata": {
"name": "metadata",
"type": "jsonb",
"primaryKey": false,
"notNull": true,
"default": "'{}'::jsonb"
},
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
"schema_metadata_data_source_id_idx": {
"name": "schema_metadata_data_source_id_idx",
"columns": [
{
"expression": "data_source_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"schema_metadata_database_id_idx": {
"name": "schema_metadata_database_id_idx",
"columns": [
{
"expression": "database_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"schema_metadata_data_source_id_fkey": {
"name": "schema_metadata_data_source_id_fkey",
"tableFrom": "schema_metadata",
"columnsFrom": [
"data_source_id"
],
"tableTo": "data_sources",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"schema_metadata_database_id_fkey": {
"name": "schema_metadata_database_id_fkey",
"tableFrom": "schema_metadata",
"columnsFrom": [
"database_id"
],
"tableTo": "database_metadata",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"schema_metadata_data_source_id_database_id_name_key": {
"name": "schema_metadata_data_source_id_database_id_name_key",
"columns": [
"data_source_id",
"database_id",
"name"
],
"nullsNotDistinct": false
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.slack_integrations": {
"name": "slack_integrations",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"organization_id": {
"name": "organization_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"user_id": {
"name": "user_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"oauth_state": {
"name": "oauth_state",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false
},
"oauth_expires_at": {
"name": "oauth_expires_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"oauth_metadata": {
"name": "oauth_metadata",
"type": "jsonb",
"primaryKey": false,
"notNull": false,
"default": "'{}'::jsonb"
},
"team_id": {
"name": "team_id",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false
},
"team_name": {
"name": "team_name",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false
},
"team_domain": {
"name": "team_domain",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false
},
"enterprise_id": {
"name": "enterprise_id",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false
},
"bot_user_id": {
"name": "bot_user_id",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false
},
"scope": {
"name": "scope",
"type": "text",
"primaryKey": false,
"notNull": false
},
"token_vault_key": {
"name": "token_vault_key",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false
},
"installed_by_slack_user_id": {
"name": "installed_by_slack_user_id",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false
},
"installed_at": {
"name": "installed_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"last_used_at": {
"name": "last_used_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"status": {
"name": "status",
"type": "slack_integration_status_enum",
"typeSchema": "public",
"primaryKey": false,
"notNull": true,
"default": "'pending'"
},
"default_channel": {
"name": "default_channel",
"type": "jsonb",
"primaryKey": false,
"notNull": false,
"default": "'{}'::jsonb"
},
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
"idx_slack_integrations_org_id": {
"name": "idx_slack_integrations_org_id",
"columns": [
{
"expression": "organization_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"idx_slack_integrations_team_id": {
"name": "idx_slack_integrations_team_id",
"columns": [
{
"expression": "team_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "text_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"idx_slack_integrations_oauth_state": {
"name": "idx_slack_integrations_oauth_state",
"columns": [
{
"expression": "oauth_state",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "text_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"idx_slack_integrations_oauth_expires": {
"name": "idx_slack_integrations_oauth_expires",
"columns": [
{
"expression": "oauth_expires_at",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "timestamptz_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"slack_integrations_organization_id_fkey": {
"name": "slack_integrations_organization_id_fkey",
"tableFrom": "slack_integrations",
"columnsFrom": [
"organization_id"
],
"tableTo": "organizations",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"slack_integrations_user_id_fkey": {
"name": "slack_integrations_user_id_fkey",
"tableFrom": "slack_integrations",
"columnsFrom": [
"user_id"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"slack_integrations_oauth_state_unique": {
"name": "slack_integrations_oauth_state_unique",
"columns": [
"oauth_state"
],
"nullsNotDistinct": false
},
"slack_integrations_token_vault_key_unique": {
"name": "slack_integrations_token_vault_key_unique",
"columns": [
"token_vault_key"
],
"nullsNotDistinct": false
},
"slack_integrations_org_team_key": {
"name": "slack_integrations_org_team_key",
"columns": [
"organization_id",
"team_id"
],
"nullsNotDistinct": false
}
},
"policies": {},
"checkConstraints": {
"slack_integrations_status_check": {
"name": "slack_integrations_status_check",
"value": "(status = 'pending' AND oauth_state IS NOT NULL) OR (status != 'pending' AND team_id IS NOT NULL)"
}
},
"isRLSEnabled": false
},
"public.slack_message_tracking": {
"name": "slack_message_tracking",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"integration_id": {
"name": "integration_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"internal_message_id": {
"name": "internal_message_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"slack_channel_id": {
"name": "slack_channel_id",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
},
"slack_message_ts": {
"name": "slack_message_ts",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
},
"slack_thread_ts": {
"name": "slack_thread_ts",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false
},
"message_type": {
"name": "message_type",
"type": "varchar(50)",
"primaryKey": false,
"notNull": true
},
"content": {
"name": "content",
"type": "text",
"primaryKey": false,
"notNull": false
},
"sender_info": {
"name": "sender_info",
"type": "jsonb",
"primaryKey": false,
"notNull": false
},
"sent_at": {
"name": "sent_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {
"idx_message_tracking_integration": {
"name": "idx_message_tracking_integration",
"columns": [
{
"expression": "integration_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"idx_message_tracking_channel": {
"name": "idx_message_tracking_channel",
"columns": [
{
"expression": "slack_channel_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "text_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"idx_message_tracking_thread": {
"name": "idx_message_tracking_thread",
"columns": [
{
"expression": "slack_thread_ts",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "text_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"slack_message_tracking_integration_id_fkey": {
"name": "slack_message_tracking_integration_id_fkey",
"tableFrom": "slack_message_tracking",
"columnsFrom": [
"integration_id"
],
"tableTo": "slack_integrations",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"slack_message_tracking_internal_message_id_unique": {
"name": "slack_message_tracking_internal_message_id_unique",
"columns": [
"internal_message_id"
],
"nullsNotDistinct": false
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.sql_evaluations": {
"name": "sql_evaluations",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "uuid_generate_v4()"
},
"evaluation_obj": {
"name": "evaluation_obj",
"type": "jsonb",
"primaryKey": false,
"notNull": true
},
"evaluation_summary": {
"name": "evaluation_summary",
"type": "text",
"primaryKey": false,
"notNull": true
},
"score": {
"name": "score",
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.stored_values_sync_jobs": {
"name": "stored_values_sync_jobs",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"data_source_id": {
"name": "data_source_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"database_name": {
"name": "database_name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"schema_name": {
"name": "schema_name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"table_name": {
"name": "table_name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"column_name": {
"name": "column_name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"last_synced_at": {
"name": "last_synced_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()"
},
"status": {
"name": "status",
"type": "text",
"primaryKey": false,
"notNull": true
},
"error_message": {
"name": "error_message",
"type": "text",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
"idx_stored_values_sync_jobs_data_source_id": {
"name": "idx_stored_values_sync_jobs_data_source_id",
"columns": [
{
"expression": "data_source_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"idx_stored_values_sync_jobs_db_schema_table_column": {
"name": "idx_stored_values_sync_jobs_db_schema_table_column",
"columns": [
{
"expression": "database_name",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "text_ops"
},
{
"expression": "schema_name",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "text_ops"
},
{
"expression": "table_name",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "text_ops"
},
{
"expression": "column_name",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "text_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"idx_stored_values_sync_jobs_status": {
"name": "idx_stored_values_sync_jobs_status",
"columns": [
{
"expression": "status",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "text_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"stored_values_sync_jobs_data_source_id_fkey": {
"name": "stored_values_sync_jobs_data_source_id_fkey",
"tableFrom": "stored_values_sync_jobs",
"columnsFrom": [
"data_source_id"
],
"tableTo": "data_sources",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.table_metadata": {
"name": "table_metadata",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"data_source_id": {
"name": "data_source_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"database_id": {
"name": "database_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"schema_id": {
"name": "schema_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"schema_name": {
"name": "schema_name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"database_name": {
"name": "database_name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"type": {
"name": "type",
"type": "table_type_enum",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"row_count": {
"name": "row_count",
"type": "bigint",
"primaryKey": false,
"notNull": false
},
"size_bytes": {
"name": "size_bytes",
"type": "bigint",
"primaryKey": false,
"notNull": false
},
"comment": {
"name": "comment",
"type": "text",
"primaryKey": false,
"notNull": false
},
"created": {
"name": "created",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"last_modified": {
"name": "last_modified",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"clustering_keys": {
"name": "clustering_keys",
"type": "jsonb",
"primaryKey": false,
"notNull": true,
"default": "'[]'::jsonb"
},
"columns": {
"name": "columns",
"type": "jsonb",
"primaryKey": false,
"notNull": true,
"default": "'[]'::jsonb"
},
"metadata": {
"name": "metadata",
"type": "jsonb",
"primaryKey": false,
"notNull": true,
"default": "'{}'::jsonb"
},
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
"table_metadata_data_source_id_idx": {
"name": "table_metadata_data_source_id_idx",
"columns": [
{
"expression": "data_source_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"table_metadata_database_id_idx": {
"name": "table_metadata_database_id_idx",
"columns": [
{
"expression": "database_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"table_metadata_schema_id_idx": {
"name": "table_metadata_schema_id_idx",
"columns": [
{
"expression": "schema_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "uuid_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"table_metadata_data_source_id_fkey": {
"name": "table_metadata_data_source_id_fkey",
"tableFrom": "table_metadata",
"columnsFrom": [
"data_source_id"
],
"tableTo": "data_sources",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"table_metadata_database_id_fkey": {
"name": "table_metadata_database_id_fkey",
"tableFrom": "table_metadata",
"columnsFrom": [
"database_id"
],
"tableTo": "database_metadata",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"table_metadata_schema_id_fkey": {
"name": "table_metadata_schema_id_fkey",
"tableFrom": "table_metadata",
"columnsFrom": [
"schema_id"
],
"tableTo": "schema_metadata",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"table_metadata_data_source_id_schema_id_name_key": {
"name": "table_metadata_data_source_id_schema_id_name_key",
"columns": [
"data_source_id",
"schema_id",
"name"
],
"nullsNotDistinct": false
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.teams": {
"name": "teams",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"organization_id": {
"name": "organization_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"sharing_setting": {
"name": "sharing_setting",
"type": "sharing_setting_enum",
"typeSchema": "public",
"primaryKey": false,
"notNull": true,
"default": "'none'"
},
"edit_sql": {
"name": "edit_sql",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"upload_csv": {
"name": "upload_csv",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"export_assets": {
"name": "export_assets",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"email_slack_enabled": {
"name": "email_slack_enabled",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"created_by": {
"name": "created_by",
"type": "uuid",
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"teams_organization_id_fkey": {
"name": "teams_organization_id_fkey",
"tableFrom": "teams",
"columnsFrom": [
"organization_id"
],
"tableTo": "organizations",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"teams_created_by_fkey": {
"name": "teams_created_by_fkey",
"tableFrom": "teams",
"columnsFrom": [
"created_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"teams_name_key": {
"name": "teams_name_key",
"columns": [
"name"
],
"nullsNotDistinct": false
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.teams_to_users": {
"name": "teams_to_users",
"schema": "",
"columns": {
"team_id": {
"name": "team_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"user_id": {
"name": "user_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"role": {
"name": "role",
"type": "team_role_enum",
"typeSchema": "public",
"primaryKey": false,
"notNull": true,
"default": "'member'"
},
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"teams_to_users_team_id_fkey": {
"name": "teams_to_users_team_id_fkey",
"tableFrom": "teams_to_users",
"columnsFrom": [
"team_id"
],
"tableTo": "teams",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"teams_to_users_user_id_fkey": {
"name": "teams_to_users_user_id_fkey",
"tableFrom": "teams_to_users",
"columnsFrom": [
"user_id"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {
"teams_to_users_pkey": {
"name": "teams_to_users_pkey",
"columns": [
"team_id",
"user_id"
]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.terms": {
"name": "terms",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"definition": {
"name": "definition",
"type": "text",
"primaryKey": false,
"notNull": false
},
"sql_snippet": {
"name": "sql_snippet",
"type": "text",
"primaryKey": false,
"notNull": false
},
"organization_id": {
"name": "organization_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"created_by": {
"name": "created_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"updated_by": {
"name": "updated_by",
"type": "uuid",
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"terms_organization_id_fkey": {
"name": "terms_organization_id_fkey",
"tableFrom": "terms",
"columnsFrom": [
"organization_id"
],
"tableTo": "organizations",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"terms_created_by_fkey": {
"name": "terms_created_by_fkey",
"tableFrom": "terms",
"columnsFrom": [
"created_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
},
"terms_updated_by_fkey": {
"name": "terms_updated_by_fkey",
"tableFrom": "terms",
"columnsFrom": [
"updated_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.terms_to_datasets": {
"name": "terms_to_datasets",
"schema": "",
"columns": {
"term_id": {
"name": "term_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"dataset_id": {
"name": "dataset_id",
"type": "uuid",
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"terms_to_datasets_term_id_fkey": {
"name": "terms_to_datasets_term_id_fkey",
"tableFrom": "terms_to_datasets",
"columnsFrom": [
"term_id"
],
"tableTo": "terms",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"terms_to_datasets_dataset_id_fkey": {
"name": "terms_to_datasets_dataset_id_fkey",
"tableFrom": "terms_to_datasets",
"columnsFrom": [
"dataset_id"
],
"tableTo": "datasets",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
}
},
"compositePrimaryKeys": {
"terms_to_datasets_pkey": {
"name": "terms_to_datasets_pkey",
"columns": [
"term_id",
"dataset_id"
]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.threads_deprecated": {
"name": "threads_deprecated",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"created_by": {
"name": "created_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"updated_by": {
"name": "updated_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"publicly_accessible": {
"name": "publicly_accessible",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"publicly_enabled_by": {
"name": "publicly_enabled_by",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"public_expiry_date": {
"name": "public_expiry_date",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"password_secret_id": {
"name": "password_secret_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"state_message_id": {
"name": "state_message_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"parent_thread_id": {
"name": "parent_thread_id",
"type": "uuid",
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"organization_id": {
"name": "organization_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {
"threads_created_by_fkey": {
"name": "threads_created_by_fkey",
"tableFrom": "threads_deprecated",
"columnsFrom": [
"created_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
},
"threads_updated_by_fkey": {
"name": "threads_updated_by_fkey",
"tableFrom": "threads_deprecated",
"columnsFrom": [
"updated_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
},
"threads_publicly_enabled_by_fkey": {
"name": "threads_publicly_enabled_by_fkey",
"tableFrom": "threads_deprecated",
"columnsFrom": [
"publicly_enabled_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
},
"threads_parent_thread_id_fkey": {
"name": "threads_parent_thread_id_fkey",
"tableFrom": "threads_deprecated",
"columnsFrom": [
"parent_thread_id"
],
"tableTo": "threads_deprecated",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
},
"threads_organization_id_fkey": {
"name": "threads_organization_id_fkey",
"tableFrom": "threads_deprecated",
"columnsFrom": [
"organization_id"
],
"tableTo": "organizations",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "no action"
},
"threads_deprecated_created_by_fkey": {
"name": "threads_deprecated_created_by_fkey",
"tableFrom": "threads_deprecated",
"columnsFrom": [
"created_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
},
"threads_deprecated_updated_by_fkey": {
"name": "threads_deprecated_updated_by_fkey",
"tableFrom": "threads_deprecated",
"columnsFrom": [
"updated_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
},
"threads_deprecated_publicly_enabled_by_fkey": {
"name": "threads_deprecated_publicly_enabled_by_fkey",
"tableFrom": "threads_deprecated",
"columnsFrom": [
"publicly_enabled_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.threads_to_dashboards": {
"name": "threads_to_dashboards",
"schema": "",
"columns": {
"thread_id": {
"name": "thread_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"dashboard_id": {
"name": "dashboard_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"added_by": {
"name": "added_by",
"type": "uuid",
"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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"threads_to_dashboards_thread_id_fkey": {
"name": "threads_to_dashboards_thread_id_fkey",
"tableFrom": "threads_to_dashboards",
"columnsFrom": [
"thread_id"
],
"tableTo": "threads_deprecated",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"threads_to_dashboards_dashboard_id_fkey": {
"name": "threads_to_dashboards_dashboard_id_fkey",
"tableFrom": "threads_to_dashboards",
"columnsFrom": [
"dashboard_id"
],
"tableTo": "dashboards",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"threads_to_dashboards_added_by_fkey": {
"name": "threads_to_dashboards_added_by_fkey",
"tableFrom": "threads_to_dashboards",
"columnsFrom": [
"added_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {
"threads_to_dashboards_pkey": {
"name": "threads_to_dashboards_pkey",
"columns": [
"thread_id",
"dashboard_id"
]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.user_favorites": {
"name": "user_favorites",
"schema": "",
"columns": {
"user_id": {
"name": "user_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"asset_id": {
"name": "asset_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"asset_type": {
"name": "asset_type",
"type": "asset_type_enum",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"order_index": {
"name": "order_index",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"user_favorites_user_id_fkey": {
"name": "user_favorites_user_id_fkey",
"tableFrom": "user_favorites",
"columnsFrom": [
"user_id"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {
"user_favorites_pkey": {
"name": "user_favorites_pkey",
"columns": [
"user_id",
"asset_id",
"asset_type"
]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.users": {
"name": "users",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"email": {
"name": "email",
"type": "text",
"primaryKey": false,
"notNull": true
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": false
},
"config": {
"name": "config",
"type": "jsonb",
"primaryKey": false,
"notNull": true,
"default": "'{}'::jsonb"
},
"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()"
},
"attributes": {
"name": "attributes",
"type": "jsonb",
"primaryKey": false,
"notNull": true,
"default": "'{}'::jsonb"
},
"avatar_url": {
"name": "avatar_url",
"type": "text",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"users_email_key": {
"name": "users_email_key",
"columns": [
"email"
],
"nullsNotDistinct": false
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.users_to_organizations": {
"name": "users_to_organizations",
"schema": "",
"columns": {
"user_id": {
"name": "user_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"organization_id": {
"name": "organization_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"role": {
"name": "role",
"type": "user_organization_role_enum",
"typeSchema": "public",
"primaryKey": false,
"notNull": true,
"default": "'querier'"
},
"sharing_setting": {
"name": "sharing_setting",
"type": "sharing_setting_enum",
"typeSchema": "public",
"primaryKey": false,
"notNull": true,
"default": "'none'"
},
"edit_sql": {
"name": "edit_sql",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"upload_csv": {
"name": "upload_csv",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"export_assets": {
"name": "export_assets",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"email_slack_enabled": {
"name": "email_slack_enabled",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": 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()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"created_by": {
"name": "created_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"updated_by": {
"name": "updated_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"deleted_by": {
"name": "deleted_by",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"status": {
"name": "status",
"type": "user_organization_status_enum",
"typeSchema": "public",
"primaryKey": false,
"notNull": true,
"default": "'active'"
}
},
"indexes": {},
"foreignKeys": {
"users_to_organizations_organization_id_fkey": {
"name": "users_to_organizations_organization_id_fkey",
"tableFrom": "users_to_organizations",
"columnsFrom": [
"organization_id"
],
"tableTo": "organizations",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"users_to_organizations_user_id_fkey": {
"name": "users_to_organizations_user_id_fkey",
"tableFrom": "users_to_organizations",
"columnsFrom": [
"user_id"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
},
"users_to_organizations_created_by_fkey": {
"name": "users_to_organizations_created_by_fkey",
"tableFrom": "users_to_organizations",
"columnsFrom": [
"created_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
},
"users_to_organizations_updated_by_fkey": {
"name": "users_to_organizations_updated_by_fkey",
"tableFrom": "users_to_organizations",
"columnsFrom": [
"updated_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
},
"users_to_organizations_deleted_by_fkey": {
"name": "users_to_organizations_deleted_by_fkey",
"tableFrom": "users_to_organizations",
"columnsFrom": [
"deleted_by"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "cascade",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {
"users_to_organizations_pkey": {
"name": "users_to_organizations_pkey",
"columns": [
"user_id",
"organization_id"
]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
}
},
"enums": {
"public.asset_permission_role_enum": {
"name": "asset_permission_role_enum",
"schema": "public",
"values": [
"owner",
"viewer",
"full_access",
"can_edit",
"can_filter",
"can_view"
]
},
"public.asset_type_enum": {
"name": "asset_type_enum",
"schema": "public",
"values": [
"dashboard",
"thread",
"collection",
"chat",
"metric_file",
"dashboard_file"
]
},
"public.data_source_onboarding_status_enum": {
"name": "data_source_onboarding_status_enum",
"schema": "public",
"values": [
"notStarted",
"inProgress",
"completed",
"failed"
]
},
"public.dataset_type_enum": {
"name": "dataset_type_enum",
"schema": "public",
"values": [
"table",
"view",
"materializedView"
]
},
"public.identity_type_enum": {
"name": "identity_type_enum",
"schema": "public",
"values": [
"user",
"team",
"organization"
]
},
"public.message_feedback_enum": {
"name": "message_feedback_enum",
"schema": "public",
"values": [
"positive",
"negative"
]
},
"public.sharing_setting_enum": {
"name": "sharing_setting_enum",
"schema": "public",
"values": [
"none",
"team",
"organization",
"public"
]
},
"public.slack_integration_status_enum": {
"name": "slack_integration_status_enum",
"schema": "public",
"values": [
"pending",
"active",
"failed",
"revoked"
]
},
"public.stored_values_status_enum": {
"name": "stored_values_status_enum",
"schema": "public",
"values": [
"syncing",
"success",
"failed"
]
},
"public.table_type_enum": {
"name": "table_type_enum",
"schema": "public",
"values": [
"TABLE",
"VIEW",
"MATERIALIZED_VIEW",
"EXTERNAL_TABLE",
"TEMPORARY_TABLE"
]
},
"public.team_role_enum": {
"name": "team_role_enum",
"schema": "public",
"values": [
"manager",
"member"
]
},
"public.user_organization_role_enum": {
"name": "user_organization_role_enum",
"schema": "public",
"values": [
"workspace_admin",
"data_admin",
"querier",
"restricted_querier",
"viewer"
]
},
"public.user_organization_status_enum": {
"name": "user_organization_status_enum",
"schema": "public",
"values": [
"active",
"inactive",
"pending",
"guest"
]
},
"public.verification_enum": {
"name": "verification_enum",
"schema": "public",
"values": [
"verified",
"backlogged",
"inReview",
"requested",
"notRequested"
]
}
},
"schemas": {},
"views": {},
"sequences": {},
"roles": {},
"policies": {},
"_meta": {
"columns": {},
"schemas": {},
"tables": {}
}
}