Files
Neon-Desk/drizzle/meta/0014_snapshot.json

4113 lines
106 KiB
JSON

{
"version": "6",
"dialect": "sqlite",
"id": "a2e1568e-76a0-4317-be02-d5db28855703",
"prevId": "cf403080-e012-41c0-93a2-52333bb44df1",
"tables": {
"account": {
"name": "account",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"accountId": {
"name": "accountId",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"providerId": {
"name": "providerId",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"userId": {
"name": "userId",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"accessToken": {
"name": "accessToken",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"refreshToken": {
"name": "refreshToken",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"idToken": {
"name": "idToken",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"accessTokenExpiresAt": {
"name": "accessTokenExpiresAt",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"refreshTokenExpiresAt": {
"name": "refreshTokenExpiresAt",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"scope": {
"name": "scope",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"password": {
"name": "password",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"createdAt": {
"name": "createdAt",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"updatedAt": {
"name": "updatedAt",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"account_userId_idx": {
"name": "account_userId_idx",
"columns": [
"userId"
],
"isUnique": false
}
},
"foreignKeys": {
"account_userId_user_id_fk": {
"name": "account_userId_user_id_fk",
"tableFrom": "account",
"tableTo": "user",
"columnsFrom": [
"userId"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"company_financial_bundle": {
"name": "company_financial_bundle",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"ticker": {
"name": "ticker",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"surface_kind": {
"name": "surface_kind",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"cadence": {
"name": "cadence",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"bundle_version": {
"name": "bundle_version",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"source_snapshot_ids": {
"name": "source_snapshot_ids",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"source_signature": {
"name": "source_signature",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"payload": {
"name": "payload",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"updated_at": {
"name": "updated_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"company_financial_bundle_uidx": {
"name": "company_financial_bundle_uidx",
"columns": [
"ticker",
"surface_kind",
"cadence"
],
"isUnique": true
},
"company_financial_bundle_ticker_idx": {
"name": "company_financial_bundle_ticker_idx",
"columns": [
"ticker",
"updated_at"
],
"isUnique": false
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"company_overview_cache": {
"name": "company_overview_cache",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"user_id": {
"name": "user_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"ticker": {
"name": "ticker",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"cache_version": {
"name": "cache_version",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"source_signature": {
"name": "source_signature",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"payload": {
"name": "payload",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"updated_at": {
"name": "updated_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"company_overview_cache_uidx": {
"name": "company_overview_cache_uidx",
"columns": [
"user_id",
"ticker"
],
"isUnique": true
},
"company_overview_cache_lookup_idx": {
"name": "company_overview_cache_lookup_idx",
"columns": [
"user_id",
"ticker",
"updated_at"
],
"isUnique": false
}
},
"foreignKeys": {
"company_overview_cache_user_id_user_id_fk": {
"name": "company_overview_cache_user_id_user_id_fk",
"tableFrom": "company_overview_cache",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"filing": {
"name": "filing",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"ticker": {
"name": "ticker",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"filing_type": {
"name": "filing_type",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"filing_date": {
"name": "filing_date",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"accession_number": {
"name": "accession_number",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"cik": {
"name": "cik",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"company_name": {
"name": "company_name",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"filing_url": {
"name": "filing_url",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"submission_url": {
"name": "submission_url",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"primary_document": {
"name": "primary_document",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"metrics": {
"name": "metrics",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"analysis": {
"name": "analysis",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"updated_at": {
"name": "updated_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"filing_accession_uidx": {
"name": "filing_accession_uidx",
"columns": [
"accession_number"
],
"isUnique": true
},
"filing_ticker_date_idx": {
"name": "filing_ticker_date_idx",
"columns": [
"ticker",
"filing_date"
],
"isUnique": false
},
"filing_date_idx": {
"name": "filing_date_idx",
"columns": [
"filing_date"
],
"isUnique": false
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"filing_link": {
"name": "filing_link",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"filing_id": {
"name": "filing_id",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"link_type": {
"name": "link_type",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"url": {
"name": "url",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"source": {
"name": "source",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'sec'"
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"filing_link_unique_uidx": {
"name": "filing_link_unique_uidx",
"columns": [
"filing_id",
"url"
],
"isUnique": true
},
"filing_link_filing_idx": {
"name": "filing_link_filing_idx",
"columns": [
"filing_id"
],
"isUnique": false
}
},
"foreignKeys": {
"filing_link_filing_id_filing_id_fk": {
"name": "filing_link_filing_id_filing_id_fk",
"tableFrom": "filing_link",
"tableTo": "filing",
"columnsFrom": [
"filing_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"filing_statement_snapshot": {
"name": "filing_statement_snapshot",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"filing_id": {
"name": "filing_id",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"ticker": {
"name": "ticker",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"filing_date": {
"name": "filing_date",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"filing_type": {
"name": "filing_type",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"period_end": {
"name": "period_end",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"statement_bundle": {
"name": "statement_bundle",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"standardized_bundle": {
"name": "standardized_bundle",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"dimension_bundle": {
"name": "dimension_bundle",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"parse_status": {
"name": "parse_status",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"parse_error": {
"name": "parse_error",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"source": {
"name": "source",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"updated_at": {
"name": "updated_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"filing_stmt_filing_uidx": {
"name": "filing_stmt_filing_uidx",
"columns": [
"filing_id"
],
"isUnique": true
},
"filing_stmt_ticker_date_idx": {
"name": "filing_stmt_ticker_date_idx",
"columns": [
"ticker",
"filing_date"
],
"isUnique": false
},
"filing_stmt_date_idx": {
"name": "filing_stmt_date_idx",
"columns": [
"filing_date"
],
"isUnique": false
},
"filing_stmt_status_idx": {
"name": "filing_stmt_status_idx",
"columns": [
"parse_status"
],
"isUnique": false
}
},
"foreignKeys": {
"filing_statement_snapshot_filing_id_filing_id_fk": {
"name": "filing_statement_snapshot_filing_id_filing_id_fk",
"tableFrom": "filing_statement_snapshot",
"tableTo": "filing",
"columnsFrom": [
"filing_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"filing_taxonomy_asset": {
"name": "filing_taxonomy_asset",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"snapshot_id": {
"name": "snapshot_id",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"asset_type": {
"name": "asset_type",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"url": {
"name": "url",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"size_bytes": {
"name": "size_bytes",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"score": {
"name": "score",
"type": "numeric",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"is_selected": {
"name": "is_selected",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": false
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"filing_taxonomy_asset_snapshot_idx": {
"name": "filing_taxonomy_asset_snapshot_idx",
"columns": [
"snapshot_id"
],
"isUnique": false
},
"filing_taxonomy_asset_type_idx": {
"name": "filing_taxonomy_asset_type_idx",
"columns": [
"snapshot_id",
"asset_type"
],
"isUnique": false
}
},
"foreignKeys": {
"filing_taxonomy_asset_snapshot_id_filing_taxonomy_snapshot_id_fk": {
"name": "filing_taxonomy_asset_snapshot_id_filing_taxonomy_snapshot_id_fk",
"tableFrom": "filing_taxonomy_asset",
"tableTo": "filing_taxonomy_snapshot",
"columnsFrom": [
"snapshot_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"filing_taxonomy_concept": {
"name": "filing_taxonomy_concept",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"snapshot_id": {
"name": "snapshot_id",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"concept_key": {
"name": "concept_key",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"qname": {
"name": "qname",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"namespace_uri": {
"name": "namespace_uri",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"local_name": {
"name": "local_name",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"label": {
"name": "label",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"is_extension": {
"name": "is_extension",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": false
},
"balance": {
"name": "balance",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"period_type": {
"name": "period_type",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"data_type": {
"name": "data_type",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"statement_kind": {
"name": "statement_kind",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"role_uri": {
"name": "role_uri",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"authoritative_concept_key": {
"name": "authoritative_concept_key",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"mapping_method": {
"name": "mapping_method",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"surface_key": {
"name": "surface_key",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"detail_parent_surface_key": {
"name": "detail_parent_surface_key",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"kpi_key": {
"name": "kpi_key",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"residual_flag": {
"name": "residual_flag",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": false
},
"presentation_order": {
"name": "presentation_order",
"type": "numeric",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"presentation_depth": {
"name": "presentation_depth",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"parent_concept_key": {
"name": "parent_concept_key",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"is_abstract": {
"name": "is_abstract",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": false
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"filing_taxonomy_concept_snapshot_idx": {
"name": "filing_taxonomy_concept_snapshot_idx",
"columns": [
"snapshot_id"
],
"isUnique": false
},
"filing_taxonomy_concept_statement_idx": {
"name": "filing_taxonomy_concept_statement_idx",
"columns": [
"snapshot_id",
"statement_kind"
],
"isUnique": false
},
"filing_taxonomy_concept_uidx": {
"name": "filing_taxonomy_concept_uidx",
"columns": [
"snapshot_id",
"concept_key",
"role_uri",
"presentation_order"
],
"isUnique": true
}
},
"foreignKeys": {
"filing_taxonomy_concept_snapshot_id_filing_taxonomy_snapshot_id_fk": {
"name": "filing_taxonomy_concept_snapshot_id_filing_taxonomy_snapshot_id_fk",
"tableFrom": "filing_taxonomy_concept",
"tableTo": "filing_taxonomy_snapshot",
"columnsFrom": [
"snapshot_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"filing_taxonomy_context": {
"name": "filing_taxonomy_context",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"snapshot_id": {
"name": "snapshot_id",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"context_id": {
"name": "context_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"entity_identifier": {
"name": "entity_identifier",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"entity_scheme": {
"name": "entity_scheme",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"period_start": {
"name": "period_start",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"period_end": {
"name": "period_end",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"period_instant": {
"name": "period_instant",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"segment_json": {
"name": "segment_json",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"scenario_json": {
"name": "scenario_json",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"filing_taxonomy_context_snapshot_idx": {
"name": "filing_taxonomy_context_snapshot_idx",
"columns": [
"snapshot_id"
],
"isUnique": false
},
"filing_taxonomy_context_uidx": {
"name": "filing_taxonomy_context_uidx",
"columns": [
"snapshot_id",
"context_id"
],
"isUnique": true
}
},
"foreignKeys": {
"filing_taxonomy_context_snapshot_id_filing_taxonomy_snapshot_id_fk": {
"name": "filing_taxonomy_context_snapshot_id_filing_taxonomy_snapshot_id_fk",
"tableFrom": "filing_taxonomy_context",
"tableTo": "filing_taxonomy_snapshot",
"columnsFrom": [
"snapshot_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"filing_taxonomy_fact": {
"name": "filing_taxonomy_fact",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"snapshot_id": {
"name": "snapshot_id",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"concept_key": {
"name": "concept_key",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"qname": {
"name": "qname",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"namespace_uri": {
"name": "namespace_uri",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"local_name": {
"name": "local_name",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"data_type": {
"name": "data_type",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"statement_kind": {
"name": "statement_kind",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"role_uri": {
"name": "role_uri",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"authoritative_concept_key": {
"name": "authoritative_concept_key",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"mapping_method": {
"name": "mapping_method",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"surface_key": {
"name": "surface_key",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"detail_parent_surface_key": {
"name": "detail_parent_surface_key",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"kpi_key": {
"name": "kpi_key",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"residual_flag": {
"name": "residual_flag",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": false
},
"context_id": {
"name": "context_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"unit": {
"name": "unit",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"decimals": {
"name": "decimals",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"precision": {
"name": "precision",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"nil": {
"name": "nil",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": false
},
"value_num": {
"name": "value_num",
"type": "numeric",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"period_start": {
"name": "period_start",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"period_end": {
"name": "period_end",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"period_instant": {
"name": "period_instant",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"dimensions": {
"name": "dimensions",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"is_dimensionless": {
"name": "is_dimensionless",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": true
},
"source_file": {
"name": "source_file",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"filing_taxonomy_fact_snapshot_idx": {
"name": "filing_taxonomy_fact_snapshot_idx",
"columns": [
"snapshot_id"
],
"isUnique": false
},
"filing_taxonomy_fact_concept_idx": {
"name": "filing_taxonomy_fact_concept_idx",
"columns": [
"snapshot_id",
"concept_key"
],
"isUnique": false
},
"filing_taxonomy_fact_period_idx": {
"name": "filing_taxonomy_fact_period_idx",
"columns": [
"snapshot_id",
"period_end",
"period_instant"
],
"isUnique": false
},
"filing_taxonomy_fact_statement_idx": {
"name": "filing_taxonomy_fact_statement_idx",
"columns": [
"snapshot_id",
"statement_kind"
],
"isUnique": false
}
},
"foreignKeys": {
"filing_taxonomy_fact_snapshot_id_filing_taxonomy_snapshot_id_fk": {
"name": "filing_taxonomy_fact_snapshot_id_filing_taxonomy_snapshot_id_fk",
"tableFrom": "filing_taxonomy_fact",
"tableTo": "filing_taxonomy_snapshot",
"columnsFrom": [
"snapshot_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"filing_taxonomy_metric_validation": {
"name": "filing_taxonomy_metric_validation",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"snapshot_id": {
"name": "snapshot_id",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"metric_key": {
"name": "metric_key",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"taxonomy_value": {
"name": "taxonomy_value",
"type": "numeric",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"llm_value": {
"name": "llm_value",
"type": "numeric",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"absolute_diff": {
"name": "absolute_diff",
"type": "numeric",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"relative_diff": {
"name": "relative_diff",
"type": "numeric",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"status": {
"name": "status",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"evidence_pages": {
"name": "evidence_pages",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"pdf_url": {
"name": "pdf_url",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"provider": {
"name": "provider",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"model": {
"name": "model",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"error": {
"name": "error",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"updated_at": {
"name": "updated_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"filing_taxonomy_metric_validation_snapshot_idx": {
"name": "filing_taxonomy_metric_validation_snapshot_idx",
"columns": [
"snapshot_id"
],
"isUnique": false
},
"filing_taxonomy_metric_validation_status_idx": {
"name": "filing_taxonomy_metric_validation_status_idx",
"columns": [
"snapshot_id",
"status"
],
"isUnique": false
},
"filing_taxonomy_metric_validation_uidx": {
"name": "filing_taxonomy_metric_validation_uidx",
"columns": [
"snapshot_id",
"metric_key"
],
"isUnique": true
}
},
"foreignKeys": {
"filing_taxonomy_metric_validation_snapshot_id_filing_taxonomy_snapshot_id_fk": {
"name": "filing_taxonomy_metric_validation_snapshot_id_filing_taxonomy_snapshot_id_fk",
"tableFrom": "filing_taxonomy_metric_validation",
"tableTo": "filing_taxonomy_snapshot",
"columnsFrom": [
"snapshot_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"filing_taxonomy_snapshot": {
"name": "filing_taxonomy_snapshot",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"filing_id": {
"name": "filing_id",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"ticker": {
"name": "ticker",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"filing_date": {
"name": "filing_date",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"filing_type": {
"name": "filing_type",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"parse_status": {
"name": "parse_status",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"parse_error": {
"name": "parse_error",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"source": {
"name": "source",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"parser_engine": {
"name": "parser_engine",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'fiscal-xbrl'"
},
"parser_version": {
"name": "parser_version",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'unknown'"
},
"taxonomy_regime": {
"name": "taxonomy_regime",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'unknown'"
},
"fiscal_pack": {
"name": "fiscal_pack",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"periods": {
"name": "periods",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"faithful_rows": {
"name": "faithful_rows",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"statement_rows": {
"name": "statement_rows",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"surface_rows": {
"name": "surface_rows",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"detail_rows": {
"name": "detail_rows",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"kpi_rows": {
"name": "kpi_rows",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"derived_metrics": {
"name": "derived_metrics",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"validation_result": {
"name": "validation_result",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"normalization_summary": {
"name": "normalization_summary",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"facts_count": {
"name": "facts_count",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 0
},
"concepts_count": {
"name": "concepts_count",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 0
},
"dimensions_count": {
"name": "dimensions_count",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 0
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"updated_at": {
"name": "updated_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"filing_taxonomy_snapshot_filing_uidx": {
"name": "filing_taxonomy_snapshot_filing_uidx",
"columns": [
"filing_id"
],
"isUnique": true
},
"filing_taxonomy_snapshot_ticker_date_idx": {
"name": "filing_taxonomy_snapshot_ticker_date_idx",
"columns": [
"ticker",
"filing_date"
],
"isUnique": false
},
"filing_taxonomy_snapshot_status_idx": {
"name": "filing_taxonomy_snapshot_status_idx",
"columns": [
"parse_status"
],
"isUnique": false
}
},
"foreignKeys": {
"filing_taxonomy_snapshot_filing_id_filing_id_fk": {
"name": "filing_taxonomy_snapshot_filing_id_filing_id_fk",
"tableFrom": "filing_taxonomy_snapshot",
"tableTo": "filing",
"columnsFrom": [
"filing_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"holding": {
"name": "holding",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"user_id": {
"name": "user_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"ticker": {
"name": "ticker",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"company_name": {
"name": "company_name",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"shares": {
"name": "shares",
"type": "numeric",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"avg_cost": {
"name": "avg_cost",
"type": "numeric",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"current_price": {
"name": "current_price",
"type": "numeric",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"market_value": {
"name": "market_value",
"type": "numeric",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"gain_loss": {
"name": "gain_loss",
"type": "numeric",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"gain_loss_pct": {
"name": "gain_loss_pct",
"type": "numeric",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"last_price_at": {
"name": "last_price_at",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"updated_at": {
"name": "updated_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"holding_user_ticker_uidx": {
"name": "holding_user_ticker_uidx",
"columns": [
"user_id",
"ticker"
],
"isUnique": true
},
"holding_user_idx": {
"name": "holding_user_idx",
"columns": [
"user_id"
],
"isUnique": false
}
},
"foreignKeys": {
"holding_user_id_user_id_fk": {
"name": "holding_user_id_user_id_fk",
"tableFrom": "holding",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"invitation": {
"name": "invitation",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"organizationId": {
"name": "organizationId",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"email": {
"name": "email",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"role": {
"name": "role",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"status": {
"name": "status",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'pending'"
},
"expiresAt": {
"name": "expiresAt",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"createdAt": {
"name": "createdAt",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"inviterId": {
"name": "inviterId",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"invitation_organizationId_idx": {
"name": "invitation_organizationId_idx",
"columns": [
"organizationId"
],
"isUnique": false
},
"invitation_email_idx": {
"name": "invitation_email_idx",
"columns": [
"email"
],
"isUnique": false
}
},
"foreignKeys": {
"invitation_organizationId_organization_id_fk": {
"name": "invitation_organizationId_organization_id_fk",
"tableFrom": "invitation",
"tableTo": "organization",
"columnsFrom": [
"organizationId"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"invitation_inviterId_user_id_fk": {
"name": "invitation_inviterId_user_id_fk",
"tableFrom": "invitation",
"tableTo": "user",
"columnsFrom": [
"inviterId"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"member": {
"name": "member",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"organizationId": {
"name": "organizationId",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"userId": {
"name": "userId",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"role": {
"name": "role",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'member'"
},
"createdAt": {
"name": "createdAt",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"member_organizationId_idx": {
"name": "member_organizationId_idx",
"columns": [
"organizationId"
],
"isUnique": false
},
"member_userId_idx": {
"name": "member_userId_idx",
"columns": [
"userId"
],
"isUnique": false
}
},
"foreignKeys": {
"member_organizationId_organization_id_fk": {
"name": "member_organizationId_organization_id_fk",
"tableFrom": "member",
"tableTo": "organization",
"columnsFrom": [
"organizationId"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"member_userId_user_id_fk": {
"name": "member_userId_user_id_fk",
"tableFrom": "member",
"tableTo": "user",
"columnsFrom": [
"userId"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"organization": {
"name": "organization",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"slug": {
"name": "slug",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"logo": {
"name": "logo",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"createdAt": {
"name": "createdAt",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"metadata": {
"name": "metadata",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {
"organization_slug_uidx": {
"name": "organization_slug_uidx",
"columns": [
"slug"
],
"isUnique": true
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"portfolio_insight": {
"name": "portfolio_insight",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"user_id": {
"name": "user_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"provider": {
"name": "provider",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"model": {
"name": "model",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"content": {
"name": "content",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"insight_user_created_idx": {
"name": "insight_user_created_idx",
"columns": [
"user_id",
"created_at"
],
"isUnique": false
}
},
"foreignKeys": {
"portfolio_insight_user_id_user_id_fk": {
"name": "portfolio_insight_user_id_user_id_fk",
"tableFrom": "portfolio_insight",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"research_artifact": {
"name": "research_artifact",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"user_id": {
"name": "user_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"organization_id": {
"name": "organization_id",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"ticker": {
"name": "ticker",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"accession_number": {
"name": "accession_number",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"kind": {
"name": "kind",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"source": {
"name": "source",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'user'"
},
"subtype": {
"name": "subtype",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"summary": {
"name": "summary",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"body_markdown": {
"name": "body_markdown",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"search_text": {
"name": "search_text",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"visibility_scope": {
"name": "visibility_scope",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'private'"
},
"tags": {
"name": "tags",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"metadata": {
"name": "metadata",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"file_name": {
"name": "file_name",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"mime_type": {
"name": "mime_type",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"file_size_bytes": {
"name": "file_size_bytes",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"storage_path": {
"name": "storage_path",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"updated_at": {
"name": "updated_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"research_artifact_ticker_idx": {
"name": "research_artifact_ticker_idx",
"columns": [
"user_id",
"ticker",
"updated_at"
],
"isUnique": false
},
"research_artifact_kind_idx": {
"name": "research_artifact_kind_idx",
"columns": [
"user_id",
"kind",
"updated_at"
],
"isUnique": false
},
"research_artifact_accession_idx": {
"name": "research_artifact_accession_idx",
"columns": [
"user_id",
"accession_number"
],
"isUnique": false
},
"research_artifact_source_idx": {
"name": "research_artifact_source_idx",
"columns": [
"user_id",
"source",
"updated_at"
],
"isUnique": false
}
},
"foreignKeys": {
"research_artifact_user_id_user_id_fk": {
"name": "research_artifact_user_id_user_id_fk",
"tableFrom": "research_artifact",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"research_artifact_organization_id_organization_id_fk": {
"name": "research_artifact_organization_id_organization_id_fk",
"tableFrom": "research_artifact",
"tableTo": "organization",
"columnsFrom": [
"organization_id"
],
"columnsTo": [
"id"
],
"onDelete": "set null",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"research_copilot_message": {
"name": "research_copilot_message",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"session_id": {
"name": "session_id",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"user_id": {
"name": "user_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"role": {
"name": "role",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"content_markdown": {
"name": "content_markdown",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"citations": {
"name": "citations",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"follow_ups": {
"name": "follow_ups",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"suggested_actions": {
"name": "suggested_actions",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"selected_sources": {
"name": "selected_sources",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"pinned_artifact_ids": {
"name": "pinned_artifact_ids",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"memo_section": {
"name": "memo_section",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"research_copilot_message_session_idx": {
"name": "research_copilot_message_session_idx",
"columns": [
"session_id",
"created_at"
],
"isUnique": false
},
"research_copilot_message_user_idx": {
"name": "research_copilot_message_user_idx",
"columns": [
"user_id",
"created_at"
],
"isUnique": false
}
},
"foreignKeys": {
"research_copilot_message_session_id_research_copilot_session_id_fk": {
"name": "research_copilot_message_session_id_research_copilot_session_id_fk",
"tableFrom": "research_copilot_message",
"tableTo": "research_copilot_session",
"columnsFrom": [
"session_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"research_copilot_message_user_id_user_id_fk": {
"name": "research_copilot_message_user_id_user_id_fk",
"tableFrom": "research_copilot_message",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"research_copilot_session": {
"name": "research_copilot_session",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"user_id": {
"name": "user_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"ticker": {
"name": "ticker",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"selected_sources": {
"name": "selected_sources",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"pinned_artifact_ids": {
"name": "pinned_artifact_ids",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"updated_at": {
"name": "updated_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"research_copilot_session_ticker_uidx": {
"name": "research_copilot_session_ticker_uidx",
"columns": [
"user_id",
"ticker"
],
"isUnique": true
},
"research_copilot_session_updated_idx": {
"name": "research_copilot_session_updated_idx",
"columns": [
"user_id",
"updated_at"
],
"isUnique": false
}
},
"foreignKeys": {
"research_copilot_session_user_id_user_id_fk": {
"name": "research_copilot_session_user_id_user_id_fk",
"tableFrom": "research_copilot_session",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"research_journal_entry": {
"name": "research_journal_entry",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"user_id": {
"name": "user_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"ticker": {
"name": "ticker",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"accession_number": {
"name": "accession_number",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"entry_type": {
"name": "entry_type",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"body_markdown": {
"name": "body_markdown",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"metadata": {
"name": "metadata",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"updated_at": {
"name": "updated_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"research_journal_ticker_idx": {
"name": "research_journal_ticker_idx",
"columns": [
"user_id",
"ticker",
"created_at"
],
"isUnique": false
},
"research_journal_accession_idx": {
"name": "research_journal_accession_idx",
"columns": [
"user_id",
"accession_number"
],
"isUnique": false
}
},
"foreignKeys": {
"research_journal_entry_user_id_user_id_fk": {
"name": "research_journal_entry_user_id_user_id_fk",
"tableFrom": "research_journal_entry",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"research_memo": {
"name": "research_memo",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"user_id": {
"name": "user_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"organization_id": {
"name": "organization_id",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"ticker": {
"name": "ticker",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"rating": {
"name": "rating",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"conviction": {
"name": "conviction",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"time_horizon_months": {
"name": "time_horizon_months",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"packet_title": {
"name": "packet_title",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"packet_subtitle": {
"name": "packet_subtitle",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"thesis_markdown": {
"name": "thesis_markdown",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "''"
},
"variant_view_markdown": {
"name": "variant_view_markdown",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "''"
},
"catalysts_markdown": {
"name": "catalysts_markdown",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "''"
},
"risks_markdown": {
"name": "risks_markdown",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "''"
},
"disconfirming_evidence_markdown": {
"name": "disconfirming_evidence_markdown",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "''"
},
"next_actions_markdown": {
"name": "next_actions_markdown",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "''"
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"updated_at": {
"name": "updated_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"research_memo_ticker_uidx": {
"name": "research_memo_ticker_uidx",
"columns": [
"user_id",
"ticker"
],
"isUnique": true
},
"research_memo_updated_idx": {
"name": "research_memo_updated_idx",
"columns": [
"user_id",
"updated_at"
],
"isUnique": false
}
},
"foreignKeys": {
"research_memo_user_id_user_id_fk": {
"name": "research_memo_user_id_user_id_fk",
"tableFrom": "research_memo",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"research_memo_organization_id_organization_id_fk": {
"name": "research_memo_organization_id_organization_id_fk",
"tableFrom": "research_memo",
"tableTo": "organization",
"columnsFrom": [
"organization_id"
],
"columnsTo": [
"id"
],
"onDelete": "set null",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"research_memo_evidence": {
"name": "research_memo_evidence",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"memo_id": {
"name": "memo_id",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"artifact_id": {
"name": "artifact_id",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"section": {
"name": "section",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"annotation": {
"name": "annotation",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"sort_order": {
"name": "sort_order",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 0
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"research_memo_evidence_memo_idx": {
"name": "research_memo_evidence_memo_idx",
"columns": [
"memo_id",
"section",
"sort_order"
],
"isUnique": false
},
"research_memo_evidence_artifact_idx": {
"name": "research_memo_evidence_artifact_idx",
"columns": [
"artifact_id"
],
"isUnique": false
},
"research_memo_evidence_unique_uidx": {
"name": "research_memo_evidence_unique_uidx",
"columns": [
"memo_id",
"artifact_id",
"section"
],
"isUnique": true
}
},
"foreignKeys": {
"research_memo_evidence_memo_id_research_memo_id_fk": {
"name": "research_memo_evidence_memo_id_research_memo_id_fk",
"tableFrom": "research_memo_evidence",
"tableTo": "research_memo",
"columnsFrom": [
"memo_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"research_memo_evidence_artifact_id_research_artifact_id_fk": {
"name": "research_memo_evidence_artifact_id_research_artifact_id_fk",
"tableFrom": "research_memo_evidence",
"tableTo": "research_artifact",
"columnsFrom": [
"artifact_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"search_chunk": {
"name": "search_chunk",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"document_id": {
"name": "document_id",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"chunk_index": {
"name": "chunk_index",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"chunk_text": {
"name": "chunk_text",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"char_count": {
"name": "char_count",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"start_offset": {
"name": "start_offset",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"end_offset": {
"name": "end_offset",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"heading_path": {
"name": "heading_path",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"citation_label": {
"name": "citation_label",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"search_chunk_document_chunk_uidx": {
"name": "search_chunk_document_chunk_uidx",
"columns": [
"document_id",
"chunk_index"
],
"isUnique": true
},
"search_chunk_document_idx": {
"name": "search_chunk_document_idx",
"columns": [
"document_id"
],
"isUnique": false
}
},
"foreignKeys": {
"search_chunk_document_id_search_document_id_fk": {
"name": "search_chunk_document_id_search_document_id_fk",
"tableFrom": "search_chunk",
"tableTo": "search_document",
"columnsFrom": [
"document_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"search_document": {
"name": "search_document",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"source_kind": {
"name": "source_kind",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"source_ref": {
"name": "source_ref",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"scope": {
"name": "scope",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"user_id": {
"name": "user_id",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"ticker": {
"name": "ticker",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"accession_number": {
"name": "accession_number",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"content_text": {
"name": "content_text",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"content_hash": {
"name": "content_hash",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"metadata": {
"name": "metadata",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"index_status": {
"name": "index_status",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"indexed_at": {
"name": "indexed_at",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"last_error": {
"name": "last_error",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"updated_at": {
"name": "updated_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"search_document_source_uidx": {
"name": "search_document_source_uidx",
"columns": [
"scope",
"ifnull(\"user_id\", '')",
"source_kind",
"source_ref"
],
"isUnique": true
},
"search_document_scope_idx": {
"name": "search_document_scope_idx",
"columns": [
"scope",
"source_kind",
"ticker",
"updated_at"
],
"isUnique": false
},
"search_document_accession_idx": {
"name": "search_document_accession_idx",
"columns": [
"accession_number",
"source_kind"
],
"isUnique": false
}
},
"foreignKeys": {
"search_document_user_id_user_id_fk": {
"name": "search_document_user_id_user_id_fk",
"tableFrom": "search_document",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"session": {
"name": "session",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"expiresAt": {
"name": "expiresAt",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"token": {
"name": "token",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"createdAt": {
"name": "createdAt",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"updatedAt": {
"name": "updatedAt",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"ipAddress": {
"name": "ipAddress",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"userAgent": {
"name": "userAgent",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"userId": {
"name": "userId",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"impersonatedBy": {
"name": "impersonatedBy",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"activeOrganizationId": {
"name": "activeOrganizationId",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {
"session_token_uidx": {
"name": "session_token_uidx",
"columns": [
"token"
],
"isUnique": true
},
"session_userId_idx": {
"name": "session_userId_idx",
"columns": [
"userId"
],
"isUnique": false
}
},
"foreignKeys": {
"session_userId_user_id_fk": {
"name": "session_userId_user_id_fk",
"tableFrom": "session",
"tableTo": "user",
"columnsFrom": [
"userId"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"task_run": {
"name": "task_run",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"user_id": {
"name": "user_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"task_type": {
"name": "task_type",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"status": {
"name": "status",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"stage": {
"name": "stage",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"stage_detail": {
"name": "stage_detail",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"stage_context": {
"name": "stage_context",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"resource_key": {
"name": "resource_key",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"notification_read_at": {
"name": "notification_read_at",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"notification_silenced_at": {
"name": "notification_silenced_at",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"priority": {
"name": "priority",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"payload": {
"name": "payload",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"result": {
"name": "result",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"error": {
"name": "error",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"attempts": {
"name": "attempts",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"max_attempts": {
"name": "max_attempts",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"workflow_run_id": {
"name": "workflow_run_id",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"updated_at": {
"name": "updated_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"finished_at": {
"name": "finished_at",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {
"task_user_created_idx": {
"name": "task_user_created_idx",
"columns": [
"user_id",
"created_at"
],
"isUnique": false
},
"task_user_updated_idx": {
"name": "task_user_updated_idx",
"columns": [
"user_id",
"updated_at"
],
"isUnique": false
},
"task_status_idx": {
"name": "task_status_idx",
"columns": [
"status"
],
"isUnique": false
},
"task_user_resource_status_idx": {
"name": "task_user_resource_status_idx",
"columns": [
"user_id",
"task_type",
"resource_key",
"status",
"created_at"
],
"isUnique": false
},
"task_workflow_run_uidx": {
"name": "task_workflow_run_uidx",
"columns": [
"workflow_run_id"
],
"isUnique": true
}
},
"foreignKeys": {
"task_run_user_id_user_id_fk": {
"name": "task_run_user_id_user_id_fk",
"tableFrom": "task_run",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"task_stage_event": {
"name": "task_stage_event",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"task_id": {
"name": "task_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"user_id": {
"name": "user_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"stage": {
"name": "stage",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"stage_detail": {
"name": "stage_detail",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"stage_context": {
"name": "stage_context",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"status": {
"name": "status",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"task_stage_event_task_created_idx": {
"name": "task_stage_event_task_created_idx",
"columns": [
"task_id",
"created_at"
],
"isUnique": false
},
"task_stage_event_user_created_idx": {
"name": "task_stage_event_user_created_idx",
"columns": [
"user_id",
"created_at"
],
"isUnique": false
}
},
"foreignKeys": {
"task_stage_event_task_id_task_run_id_fk": {
"name": "task_stage_event_task_id_task_run_id_fk",
"tableFrom": "task_stage_event",
"tableTo": "task_run",
"columnsFrom": [
"task_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"task_stage_event_user_id_user_id_fk": {
"name": "task_stage_event_user_id_user_id_fk",
"tableFrom": "task_stage_event",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"user": {
"name": "user",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"email": {
"name": "email",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"emailVerified": {
"name": "emailVerified",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": false
},
"image": {
"name": "image",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"createdAt": {
"name": "createdAt",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"updatedAt": {
"name": "updatedAt",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"role": {
"name": "role",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"banned": {
"name": "banned",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": false
},
"banReason": {
"name": "banReason",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"banExpires": {
"name": "banExpires",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {
"user_email_uidx": {
"name": "user_email_uidx",
"columns": [
"email"
],
"isUnique": true
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"verification": {
"name": "verification",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"identifier": {
"name": "identifier",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"value": {
"name": "value",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"expiresAt": {
"name": "expiresAt",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"createdAt": {
"name": "createdAt",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"updatedAt": {
"name": "updatedAt",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"verification_identifier_idx": {
"name": "verification_identifier_idx",
"columns": [
"identifier"
],
"isUnique": false
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"watchlist_item": {
"name": "watchlist_item",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"user_id": {
"name": "user_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"ticker": {
"name": "ticker",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"company_name": {
"name": "company_name",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"sector": {
"name": "sector",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"category": {
"name": "category",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"tags": {
"name": "tags",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"status": {
"name": "status",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'backlog'"
},
"priority": {
"name": "priority",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'medium'"
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"updated_at": {
"name": "updated_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"last_reviewed_at": {
"name": "last_reviewed_at",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {
"watchlist_user_ticker_uidx": {
"name": "watchlist_user_ticker_uidx",
"columns": [
"user_id",
"ticker"
],
"isUnique": true
},
"watchlist_user_created_idx": {
"name": "watchlist_user_created_idx",
"columns": [
"user_id",
"created_at"
],
"isUnique": false
},
"watchlist_user_updated_idx": {
"name": "watchlist_user_updated_idx",
"columns": [
"user_id",
"updated_at"
],
"isUnique": false
}
},
"foreignKeys": {
"watchlist_item_user_id_user_id_fk": {
"name": "watchlist_item_user_id_user_id_fk",
"tableFrom": "watchlist_item",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
}
},
"views": {},
"enums": {},
"_meta": {
"schemas": {},
"tables": {},
"columns": {}
},
"internal": {
"indexes": {
"search_document_source_uidx": {
"columns": {
"ifnull(\"user_id\", '')": {
"isExpression": true
}
}
}
}
}
}