@onequery/cli 0.1.64-win32-x64 → 0.1.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/bin/onequery.js +266 -0
  2. package/bin/package-constants.d.ts +75 -0
  3. package/bin/package-constants.js +160 -0
  4. package/package.json +24 -17
  5. package/runtime-bundle.json +55 -0
  6. package/vendor/x86_64-pc-windows-msvc/onequery/onequery.exe +0 -0
  7. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/CompositeItem-BB408Cyb.js +0 -1
  8. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/CompositeList-DbbDW_rT.js +0 -1
  9. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/DialogTitle-ChNkcIa6.js +0 -1
  10. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/IconArrowRight-DsOD7mDl.js +0 -1
  11. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/IconCheck-Gc24xPT2.js +0 -1
  12. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/IconChevronDown-B-39MA7-.js +0 -1
  13. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/IconChevronRight-DD16tNHZ.js +0 -1
  14. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/IconCoins-C7Nn0L6R.js +0 -1
  15. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/IconHistory-DuLS8PKF.js +0 -1
  16. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/IconLoader2-BpZcTuHV.js +0 -1
  17. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/IconPlus-CZiRiEUF.js +0 -1
  18. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/IconTerminal2-PxNqcz3d.js +0 -1
  19. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/IconX-rRpRFwc5.js +0 -1
  20. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/Separator-M05FshHx.js +0 -1
  21. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/_authenticated-CcSc_Pt7.js +0 -1
  22. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/_org_slug-BvJDit6U.js +0 -1
  23. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/alert-BIGxI3XN.js +0 -1
  24. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/api-base-url-DIb6qukm.js +0 -1
  25. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/api-client-tp8XTpAa.js +0 -1
  26. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/api-paths-DcYkf-C_.js +0 -1
  27. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/app-routes-CMyon6Em.js +0 -1
  28. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/audit-CdPU9Jf2.js +0 -2
  29. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/auth-bootstrap-query-B1MHd_NV.js +0 -1
  30. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/auth-client-D-YHMy0G.js +0 -3
  31. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/avatar-SaFoLofF.js +0 -1
  32. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/badge-BFPkSrVD.js +0 -1
  33. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/budget-CX5MplAP.js +0 -1
  34. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/callback-BWQ3ETBy.js +0 -1
  35. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/card-Dllm2lhp.js +0 -1
  36. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/checkbox-Bii9Pcrx.js +0 -1
  37. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/compiler-runtime-DCc3R3Xn.js +0 -1
  38. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/connect-database-C1Jb2l53.js +0 -1
  39. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/copy-button-BO1KBdf9.js +0 -1
  40. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/create-org-BSzKv5ue.js +0 -1
  41. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/createReactComponent-_L2mp4Ui.js +0 -1
  42. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/data-source-connection-form-CbDL0cgG.js +0 -273
  43. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/device-Bbz7apAX.js +0 -1
  44. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/dist-BNi06Dzx.js +0 -3
  45. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/dropdown-menu-Cw2MW0pD.js +0 -1
  46. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/empty-DjRo5ytz.js +0 -1
  47. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/format-date-Rg05aHXh.js +0 -1
  48. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/getDisabledMountTransitionStyles-C0uz3iMh.js +0 -1
  49. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/getPseudoElementBounds-CRlxTrfr.js +0 -12
  50. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/home-BNjpNKdt.js +0 -1
  51. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/index-B4OsjuJp.css +0 -2
  52. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/index-CXR0dKJj.js +0 -10
  53. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/input-BRu0b1Tq.js +0 -1
  54. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/integrations-BWC7iPQ5.js +0 -1
  55. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
  56. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
  57. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
  58. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
  59. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
  60. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
  61. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
  62. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/invite._invitationId-DmJnR4R5.js +0 -1
  63. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/jsx-runtime-DG_AJzB_.js +0 -1
  64. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/label-f2wVZcni.js +0 -1
  65. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/link-Cgvqhh5w.js +0 -1
  66. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/matchContext-CDajBC0L.js +0 -1
  67. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/organization-permissions-BXV_ess0.js +0 -1
  68. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/organization-query-keys-ieaSNxMR.js +0 -1
  69. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/query-CY--GYXb.js +0 -1
  70. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/query-timing-YBkSOxxF.js +0 -1
  71. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/queryOptions-bXtOUR_h.js +0 -1
  72. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/routes-CxJ2aoMf.js +0 -1
  73. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/schemas-EcBBwCo1.js +0 -64
  74. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/select-yNaL0SXM.js +0 -1
  75. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/separator-BH7Gsum-.js +0 -1
  76. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/settings-C8us2bWX.js +0 -1
  77. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/signin-BgfqB9QB.js +0 -1
  78. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/src-C5F1uEDb.js +0 -1
  79. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/team-CYPsHFTt.js +0 -1
  80. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/textarea-CnA77PLS.js +0 -1
  81. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/theme-toggle-CRaDbyxE.js +0 -1
  82. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/use-optimistic-mutation-3PPnMc-O.js +0 -1
  83. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/useBaseQuery-CO5Q8xm4.js +0 -1
  84. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/useBaseUiId-CtNp109T.js +0 -1
  85. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/useCompositeItem-D243hyne.js +0 -1
  86. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/useControlled-C-85HRFr.js +0 -1
  87. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/useQuery-DyOxsY45.js +0 -1
  88. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/useRender-CzpKCg11.js +0 -1
  89. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/useRouterState-DpT8luFk.js +0 -1
  90. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/useSuspenseQuery-CBFRU4At.js +0 -1
  91. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/useValueChanged-BNrgSVVM.js +0 -1
  92. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/utils-C8DGLIgm.js +0 -1
  93. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/xstate-react.esm-Bo3CCIRt.js +0 -1
  94. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/assets/zod-D0PWrP9q.js +0 -1
  95. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/favicon.ico +0 -0
  96. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/amplitude/step1_settings_sidebar.png +0 -0
  97. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/amplitude/step2_projects.png +0 -0
  98. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/amplitude/step3_project_keys.png +0 -0
  99. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/amplitude/step4_api_keys.png +0 -0
  100. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/bigquery/step1_service_accounts.png +0 -0
  101. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/bigquery/step2_bigquery_roles.png +0 -0
  102. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/bigquery/step3_add_key_menu.png +0 -0
  103. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/bigquery/step4_create_json_key.png +0 -0
  104. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/cloudflare-workers-observability/step2_enable_workers_logs.png +0 -0
  105. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/cloudflare-workers-observability/step3_user_api_tokens.png +0 -0
  106. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/cloudflare-workers-observability/step4_create_api_token.png +0 -0
  107. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/cloudflare-workers-observability/step5_workers_pages_account_id.png +0 -0
  108. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/cloudflare-workers-observability/step6_workers_observability_permission.png +0 -0
  109. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/ga4/step1_service_accounts.png +0 -0
  110. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/ga4/step2_create_json_key.png +0 -0
  111. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/ga4/step3_add_user_viewer.png +0 -0
  112. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/ga4/step4_property_details.png +0 -0
  113. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/github-token-guide/step1_signin.png +0 -0
  114. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/github-token-guide/step2_new_fine_grained_token_sanitized.png +0 -0
  115. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/github-token-guide/step3_permissions_configured_sanitized.png +0 -0
  116. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/github-token-guide/step4_token_created_sanitized.png +0 -0
  117. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/google-search-console/step1_confirm_property.png +0 -0
  118. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/google-search-console/step2_scope_selected.png +0 -0
  119. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/google-search-console/step3_copy_access_token.png +0 -0
  120. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/mixpanel/step1_service_accounts.png +0 -0
  121. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/mixpanel/step2_create_service_account.png +0 -0
  122. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/mixpanel/step3_credentials.png +0 -0
  123. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/mixpanel/step4_project_settings.png +0 -0
  124. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/postgresql/step1_create_user.png +0 -0
  125. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/postgresql/step2_connection.png +0 -0
  126. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/posthog/step1_project_settings.png +0 -0
  127. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/posthog/step2_personal_api_keys.png +0 -0
  128. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/posthog/step3_create_key_modal.png +0 -0
  129. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/rds/step1_connect.png +0 -0
  130. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/rds/step2_create_user.png +0 -0
  131. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/rds/step3_grant.png +0 -0
  132. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/rds/step4_info.png +0 -0
  133. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/sentry/step1_personal_tokens.png +0 -0
  134. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/sentry/step2_create_token_permissions.png +0 -0
  135. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/sentry/step3_organization_slug.png +0 -0
  136. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/sentry/step4_project_slug.png +0 -0
  137. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/vercel/step1_tokens_page.png +0 -0
  138. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/images/vercel/step2_configure_token.png +0 -0
  139. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/index.html +0 -47
  140. package/vendor/x86_64-pc-windows-msvc/runtime/dashboard/onequery.svg +0 -44
  141. package/vendor/x86_64-pc-windows-msvc/runtime/migrations/20260327065242_curious_nightmare.sql +0 -403
  142. package/vendor/x86_64-pc-windows-msvc/runtime/migrations/20260403103652_slippery_hellfire_club.sql +0 -8
  143. package/vendor/x86_64-pc-windows-msvc/runtime/migrations/20260403112219_gigantic_namora.sql +0 -1
  144. package/vendor/x86_64-pc-windows-msvc/runtime/migrations/20260420071232_previous_justin_hammer.sql +0 -141
  145. package/vendor/x86_64-pc-windows-msvc/runtime/migrations/20260420093157_spooky_cassandra_nova.sql +0 -29
  146. package/vendor/x86_64-pc-windows-msvc/runtime/migrations/20260420101631_even_ogun.sql +0 -5
  147. package/vendor/x86_64-pc-windows-msvc/runtime/migrations/20260425110519_smart_amazoness.sql +0 -8
  148. package/vendor/x86_64-pc-windows-msvc/runtime/migrations/20260428033542_rename_source_query_interface_missing.sql +0 -36
  149. package/vendor/x86_64-pc-windows-msvc/runtime/migrations/20260430114113_jittery_scorpion.sql +0 -28
  150. package/vendor/x86_64-pc-windows-msvc/runtime/migrations/20260430135906_flippant_timeslip.sql +0 -4
  151. package/vendor/x86_64-pc-windows-msvc/runtime/migrations/20260502000100_drop_old_workflow_audit_tables.sql +0 -15
  152. package/vendor/x86_64-pc-windows-msvc/runtime/migrations/20260503011110_moaning_jack_flag.sql +0 -22
  153. package/vendor/x86_64-pc-windows-msvc/runtime/migrations/20260514143216_reset_workflow_audit_history.sql +0 -20
  154. package/vendor/x86_64-pc-windows-msvc/runtime/migrations/20260524081943_colorful_firelord.sql +0 -1
  155. package/vendor/x86_64-pc-windows-msvc/runtime/migrations/meta/20260327065242_snapshot.json +0 -2817
  156. package/vendor/x86_64-pc-windows-msvc/runtime/migrations/meta/20260403103652_snapshot.json +0 -2864
  157. package/vendor/x86_64-pc-windows-msvc/runtime/migrations/meta/20260403112219_snapshot.json +0 -2870
  158. package/vendor/x86_64-pc-windows-msvc/runtime/migrations/meta/20260420071232_snapshot.json +0 -3879
  159. package/vendor/x86_64-pc-windows-msvc/runtime/migrations/meta/20260420093157_snapshot.json +0 -4088
  160. package/vendor/x86_64-pc-windows-msvc/runtime/migrations/meta/20260420101631_snapshot.json +0 -3250
  161. package/vendor/x86_64-pc-windows-msvc/runtime/migrations/meta/20260425110519_snapshot.json +0 -3250
  162. package/vendor/x86_64-pc-windows-msvc/runtime/migrations/meta/20260428033542_snapshot.json +0 -3250
  163. package/vendor/x86_64-pc-windows-msvc/runtime/migrations/meta/20260430114113_snapshot.json +0 -3507
  164. package/vendor/x86_64-pc-windows-msvc/runtime/migrations/meta/20260430135906_snapshot.json +0 -3531
  165. package/vendor/x86_64-pc-windows-msvc/runtime/migrations/meta/20260503011110_snapshot.json +0 -3089
  166. package/vendor/x86_64-pc-windows-msvc/runtime/migrations/meta/20260524081943_snapshot.json +0 -3082
  167. package/vendor/x86_64-pc-windows-msvc/runtime/migrations/meta/_journal.json +0 -104
  168. package/vendor/x86_64-pc-windows-msvc/runtime/pglite/initdb.wasm +0 -0
  169. package/vendor/x86_64-pc-windows-msvc/runtime/pglite/pglite.data +0 -0
  170. package/vendor/x86_64-pc-windows-msvc/runtime/pglite/pglite.wasm +0 -0
  171. package/vendor/x86_64-pc-windows-msvc/server/onequery-server.mjs +0 -447932
  172. package/vendor/x86_64-pc-windows-msvc/server/polyglot_sql_wasm_bg.wasm +0 -0
@@ -1,3879 +0,0 @@
1
- {
2
- "id": "6f3a7916-dc40-473c-a7b7-b15dee0c81f0",
3
- "prevId": "b6246d17-72f4-48ed-b2d3-d5bca3ca432a",
4
- "version": "7",
5
- "dialect": "postgresql",
6
- "tables": {
7
- "public.audit_projection_checkpoints": {
8
- "name": "audit_projection_checkpoints",
9
- "schema": "",
10
- "columns": {
11
- "family": {
12
- "name": "family",
13
- "type": "text",
14
- "primaryKey": false,
15
- "notNull": true
16
- },
17
- "last_commit_position": {
18
- "name": "last_commit_position",
19
- "type": "bigint",
20
- "primaryKey": false,
21
- "notNull": true,
22
- "default": 0
23
- },
24
- "projection_name": {
25
- "name": "projection_name",
26
- "type": "text",
27
- "primaryKey": false,
28
- "notNull": true
29
- },
30
- "updated_at": {
31
- "name": "updated_at",
32
- "type": "timestamp with time zone",
33
- "primaryKey": false,
34
- "notNull": true,
35
- "default": "now()"
36
- }
37
- },
38
- "indexes": {
39
- "idx_audit_projection_checkpoints_projection_family_unique": {
40
- "name": "idx_audit_projection_checkpoints_projection_family_unique",
41
- "columns": [
42
- {
43
- "expression": "projection_name",
44
- "isExpression": false,
45
- "asc": true,
46
- "nulls": "last"
47
- },
48
- {
49
- "expression": "family",
50
- "isExpression": false,
51
- "asc": true,
52
- "nulls": "last"
53
- }
54
- ],
55
- "isUnique": true,
56
- "concurrently": false,
57
- "method": "btree",
58
- "with": {}
59
- }
60
- },
61
- "foreignKeys": {},
62
- "compositePrimaryKeys": {},
63
- "uniqueConstraints": {},
64
- "policies": {},
65
- "checkConstraints": {},
66
- "isRLSEnabled": true
67
- },
68
- "public.account": {
69
- "name": "account",
70
- "schema": "",
71
- "columns": {
72
- "access_token": {
73
- "name": "access_token",
74
- "type": "text",
75
- "primaryKey": false,
76
- "notNull": false
77
- },
78
- "access_token_expires_at": {
79
- "name": "access_token_expires_at",
80
- "type": "timestamp",
81
- "primaryKey": false,
82
- "notNull": false
83
- },
84
- "account_id": {
85
- "name": "account_id",
86
- "type": "text",
87
- "primaryKey": false,
88
- "notNull": true
89
- },
90
- "created_at": {
91
- "name": "created_at",
92
- "type": "timestamp",
93
- "primaryKey": false,
94
- "notNull": true,
95
- "default": "now()"
96
- },
97
- "id": {
98
- "name": "id",
99
- "type": "text",
100
- "primaryKey": true,
101
- "notNull": true
102
- },
103
- "id_token": {
104
- "name": "id_token",
105
- "type": "text",
106
- "primaryKey": false,
107
- "notNull": false
108
- },
109
- "password": {
110
- "name": "password",
111
- "type": "text",
112
- "primaryKey": false,
113
- "notNull": false
114
- },
115
- "provider_id": {
116
- "name": "provider_id",
117
- "type": "text",
118
- "primaryKey": false,
119
- "notNull": true
120
- },
121
- "refresh_token": {
122
- "name": "refresh_token",
123
- "type": "text",
124
- "primaryKey": false,
125
- "notNull": false
126
- },
127
- "refresh_token_expires_at": {
128
- "name": "refresh_token_expires_at",
129
- "type": "timestamp",
130
- "primaryKey": false,
131
- "notNull": false
132
- },
133
- "scope": {
134
- "name": "scope",
135
- "type": "text",
136
- "primaryKey": false,
137
- "notNull": false
138
- },
139
- "updated_at": {
140
- "name": "updated_at",
141
- "type": "timestamp",
142
- "primaryKey": false,
143
- "notNull": true,
144
- "default": "now()"
145
- },
146
- "user_id": {
147
- "name": "user_id",
148
- "type": "text",
149
- "primaryKey": false,
150
- "notNull": true
151
- }
152
- },
153
- "indexes": {
154
- "account_userId_idx": {
155
- "name": "account_userId_idx",
156
- "columns": [
157
- {
158
- "expression": "user_id",
159
- "isExpression": false,
160
- "asc": true,
161
- "nulls": "last"
162
- }
163
- ],
164
- "isUnique": false,
165
- "concurrently": false,
166
- "method": "btree",
167
- "with": {}
168
- }
169
- },
170
- "foreignKeys": {
171
- "account_user_id_user_id_fk": {
172
- "name": "account_user_id_user_id_fk",
173
- "tableFrom": "account",
174
- "tableTo": "user",
175
- "columnsFrom": ["user_id"],
176
- "columnsTo": ["id"],
177
- "onDelete": "cascade",
178
- "onUpdate": "no action"
179
- }
180
- },
181
- "compositePrimaryKeys": {},
182
- "uniqueConstraints": {},
183
- "policies": {},
184
- "checkConstraints": {},
185
- "isRLSEnabled": true
186
- },
187
- "public.device_code": {
188
- "name": "device_code",
189
- "schema": "",
190
- "columns": {
191
- "client_id": {
192
- "name": "client_id",
193
- "type": "text",
194
- "primaryKey": false,
195
- "notNull": false
196
- },
197
- "device_code": {
198
- "name": "device_code",
199
- "type": "text",
200
- "primaryKey": false,
201
- "notNull": true
202
- },
203
- "expires_at": {
204
- "name": "expires_at",
205
- "type": "timestamp",
206
- "primaryKey": false,
207
- "notNull": true
208
- },
209
- "id": {
210
- "name": "id",
211
- "type": "text",
212
- "primaryKey": true,
213
- "notNull": true
214
- },
215
- "last_polled_at": {
216
- "name": "last_polled_at",
217
- "type": "timestamp",
218
- "primaryKey": false,
219
- "notNull": false
220
- },
221
- "polling_interval": {
222
- "name": "polling_interval",
223
- "type": "integer",
224
- "primaryKey": false,
225
- "notNull": false
226
- },
227
- "scope": {
228
- "name": "scope",
229
- "type": "text",
230
- "primaryKey": false,
231
- "notNull": false
232
- },
233
- "status": {
234
- "name": "status",
235
- "type": "text",
236
- "primaryKey": false,
237
- "notNull": true
238
- },
239
- "user_code": {
240
- "name": "user_code",
241
- "type": "text",
242
- "primaryKey": false,
243
- "notNull": true
244
- },
245
- "user_id": {
246
- "name": "user_id",
247
- "type": "text",
248
- "primaryKey": false,
249
- "notNull": false
250
- }
251
- },
252
- "indexes": {
253
- "device_code_device_code_key": {
254
- "name": "device_code_device_code_key",
255
- "columns": [
256
- {
257
- "expression": "device_code",
258
- "isExpression": false,
259
- "asc": true,
260
- "nulls": "last"
261
- }
262
- ],
263
- "isUnique": true,
264
- "concurrently": false,
265
- "method": "btree",
266
- "with": {}
267
- },
268
- "device_code_user_code_key": {
269
- "name": "device_code_user_code_key",
270
- "columns": [
271
- {
272
- "expression": "user_code",
273
- "isExpression": false,
274
- "asc": true,
275
- "nulls": "last"
276
- }
277
- ],
278
- "isUnique": true,
279
- "concurrently": false,
280
- "method": "btree",
281
- "with": {}
282
- },
283
- "device_code_user_id_idx": {
284
- "name": "device_code_user_id_idx",
285
- "columns": [
286
- {
287
- "expression": "user_id",
288
- "isExpression": false,
289
- "asc": true,
290
- "nulls": "last"
291
- }
292
- ],
293
- "isUnique": false,
294
- "concurrently": false,
295
- "method": "btree",
296
- "with": {}
297
- },
298
- "device_code_expires_at_idx": {
299
- "name": "device_code_expires_at_idx",
300
- "columns": [
301
- {
302
- "expression": "expires_at",
303
- "isExpression": false,
304
- "asc": true,
305
- "nulls": "last"
306
- }
307
- ],
308
- "isUnique": false,
309
- "concurrently": false,
310
- "method": "btree",
311
- "with": {}
312
- }
313
- },
314
- "foreignKeys": {
315
- "device_code_user_id_user_id_fk": {
316
- "name": "device_code_user_id_user_id_fk",
317
- "tableFrom": "device_code",
318
- "tableTo": "user",
319
- "columnsFrom": ["user_id"],
320
- "columnsTo": ["id"],
321
- "onDelete": "cascade",
322
- "onUpdate": "no action"
323
- }
324
- },
325
- "compositePrimaryKeys": {},
326
- "uniqueConstraints": {},
327
- "policies": {},
328
- "checkConstraints": {},
329
- "isRLSEnabled": true
330
- },
331
- "public.invitation": {
332
- "name": "invitation",
333
- "schema": "",
334
- "columns": {
335
- "created_at": {
336
- "name": "created_at",
337
- "type": "timestamp",
338
- "primaryKey": false,
339
- "notNull": true,
340
- "default": "now()"
341
- },
342
- "email": {
343
- "name": "email",
344
- "type": "text",
345
- "primaryKey": false,
346
- "notNull": true
347
- },
348
- "expires_at": {
349
- "name": "expires_at",
350
- "type": "timestamp",
351
- "primaryKey": false,
352
- "notNull": true
353
- },
354
- "id": {
355
- "name": "id",
356
- "type": "text",
357
- "primaryKey": true,
358
- "notNull": true
359
- },
360
- "inviter_id": {
361
- "name": "inviter_id",
362
- "type": "text",
363
- "primaryKey": false,
364
- "notNull": true
365
- },
366
- "organization_id": {
367
- "name": "organization_id",
368
- "type": "text",
369
- "primaryKey": false,
370
- "notNull": true
371
- },
372
- "role": {
373
- "name": "role",
374
- "type": "text",
375
- "primaryKey": false,
376
- "notNull": false
377
- },
378
- "status": {
379
- "name": "status",
380
- "type": "text",
381
- "primaryKey": false,
382
- "notNull": true
383
- }
384
- },
385
- "indexes": {
386
- "invitation_organizationId_idx": {
387
- "name": "invitation_organizationId_idx",
388
- "columns": [
389
- {
390
- "expression": "organization_id",
391
- "isExpression": false,
392
- "asc": true,
393
- "nulls": "last"
394
- }
395
- ],
396
- "isUnique": false,
397
- "concurrently": false,
398
- "method": "btree",
399
- "with": {}
400
- },
401
- "invitation_email_idx": {
402
- "name": "invitation_email_idx",
403
- "columns": [
404
- {
405
- "expression": "email",
406
- "isExpression": false,
407
- "asc": true,
408
- "nulls": "last"
409
- }
410
- ],
411
- "isUnique": false,
412
- "concurrently": false,
413
- "method": "btree",
414
- "with": {}
415
- }
416
- },
417
- "foreignKeys": {
418
- "invitation_inviter_id_user_id_fk": {
419
- "name": "invitation_inviter_id_user_id_fk",
420
- "tableFrom": "invitation",
421
- "tableTo": "user",
422
- "columnsFrom": ["inviter_id"],
423
- "columnsTo": ["id"],
424
- "onDelete": "cascade",
425
- "onUpdate": "no action"
426
- },
427
- "invitation_organization_id_organization_id_fk": {
428
- "name": "invitation_organization_id_organization_id_fk",
429
- "tableFrom": "invitation",
430
- "tableTo": "organization",
431
- "columnsFrom": ["organization_id"],
432
- "columnsTo": ["id"],
433
- "onDelete": "cascade",
434
- "onUpdate": "no action"
435
- }
436
- },
437
- "compositePrimaryKeys": {},
438
- "uniqueConstraints": {},
439
- "policies": {},
440
- "checkConstraints": {},
441
- "isRLSEnabled": true
442
- },
443
- "public.member": {
444
- "name": "member",
445
- "schema": "",
446
- "columns": {
447
- "created_at": {
448
- "name": "created_at",
449
- "type": "timestamp",
450
- "primaryKey": false,
451
- "notNull": true,
452
- "default": "now()"
453
- },
454
- "id": {
455
- "name": "id",
456
- "type": "text",
457
- "primaryKey": true,
458
- "notNull": true
459
- },
460
- "organization_id": {
461
- "name": "organization_id",
462
- "type": "text",
463
- "primaryKey": false,
464
- "notNull": true
465
- },
466
- "role": {
467
- "name": "role",
468
- "type": "text",
469
- "primaryKey": false,
470
- "notNull": true
471
- },
472
- "user_id": {
473
- "name": "user_id",
474
- "type": "text",
475
- "primaryKey": false,
476
- "notNull": true
477
- }
478
- },
479
- "indexes": {
480
- "member_organizationId_idx": {
481
- "name": "member_organizationId_idx",
482
- "columns": [
483
- {
484
- "expression": "organization_id",
485
- "isExpression": false,
486
- "asc": true,
487
- "nulls": "last"
488
- }
489
- ],
490
- "isUnique": false,
491
- "concurrently": false,
492
- "method": "btree",
493
- "with": {}
494
- },
495
- "member_userId_idx": {
496
- "name": "member_userId_idx",
497
- "columns": [
498
- {
499
- "expression": "user_id",
500
- "isExpression": false,
501
- "asc": true,
502
- "nulls": "last"
503
- }
504
- ],
505
- "isUnique": false,
506
- "concurrently": false,
507
- "method": "btree",
508
- "with": {}
509
- }
510
- },
511
- "foreignKeys": {
512
- "member_organization_id_organization_id_fk": {
513
- "name": "member_organization_id_organization_id_fk",
514
- "tableFrom": "member",
515
- "tableTo": "organization",
516
- "columnsFrom": ["organization_id"],
517
- "columnsTo": ["id"],
518
- "onDelete": "cascade",
519
- "onUpdate": "no action"
520
- },
521
- "member_user_id_user_id_fk": {
522
- "name": "member_user_id_user_id_fk",
523
- "tableFrom": "member",
524
- "tableTo": "user",
525
- "columnsFrom": ["user_id"],
526
- "columnsTo": ["id"],
527
- "onDelete": "cascade",
528
- "onUpdate": "no action"
529
- }
530
- },
531
- "compositePrimaryKeys": {},
532
- "uniqueConstraints": {},
533
- "policies": {},
534
- "checkConstraints": {},
535
- "isRLSEnabled": true
536
- },
537
- "public.organization": {
538
- "name": "organization",
539
- "schema": "",
540
- "columns": {
541
- "created_at": {
542
- "name": "created_at",
543
- "type": "timestamp",
544
- "primaryKey": false,
545
- "notNull": true,
546
- "default": "now()"
547
- },
548
- "id": {
549
- "name": "id",
550
- "type": "text",
551
- "primaryKey": true,
552
- "notNull": true
553
- },
554
- "logo": {
555
- "name": "logo",
556
- "type": "text",
557
- "primaryKey": false,
558
- "notNull": false
559
- },
560
- "metadata": {
561
- "name": "metadata",
562
- "type": "text",
563
- "primaryKey": false,
564
- "notNull": false
565
- },
566
- "name": {
567
- "name": "name",
568
- "type": "text",
569
- "primaryKey": false,
570
- "notNull": true
571
- },
572
- "slug": {
573
- "name": "slug",
574
- "type": "text",
575
- "primaryKey": false,
576
- "notNull": false
577
- }
578
- },
579
- "indexes": {},
580
- "foreignKeys": {},
581
- "compositePrimaryKeys": {},
582
- "uniqueConstraints": {
583
- "organization_slug_unique": {
584
- "name": "organization_slug_unique",
585
- "nullsNotDistinct": false,
586
- "columns": ["slug"]
587
- }
588
- },
589
- "policies": {},
590
- "checkConstraints": {},
591
- "isRLSEnabled": true
592
- },
593
- "public.rate_limit": {
594
- "name": "rate_limit",
595
- "schema": "",
596
- "columns": {
597
- "id": {
598
- "name": "id",
599
- "type": "text",
600
- "primaryKey": true,
601
- "notNull": true
602
- },
603
- "count": {
604
- "name": "count",
605
- "type": "integer",
606
- "primaryKey": false,
607
- "notNull": true
608
- },
609
- "key": {
610
- "name": "key",
611
- "type": "text",
612
- "primaryKey": false,
613
- "notNull": true
614
- },
615
- "last_request": {
616
- "name": "last_request",
617
- "type": "bigint",
618
- "primaryKey": false,
619
- "notNull": true
620
- }
621
- },
622
- "indexes": {
623
- "rate_limit_key_key": {
624
- "name": "rate_limit_key_key",
625
- "columns": [
626
- {
627
- "expression": "key",
628
- "isExpression": false,
629
- "asc": true,
630
- "nulls": "last"
631
- }
632
- ],
633
- "isUnique": true,
634
- "concurrently": false,
635
- "method": "btree",
636
- "with": {}
637
- }
638
- },
639
- "foreignKeys": {},
640
- "compositePrimaryKeys": {},
641
- "uniqueConstraints": {},
642
- "policies": {},
643
- "checkConstraints": {},
644
- "isRLSEnabled": true
645
- },
646
- "public.session": {
647
- "name": "session",
648
- "schema": "",
649
- "columns": {
650
- "active_organization_id": {
651
- "name": "active_organization_id",
652
- "type": "text",
653
- "primaryKey": false,
654
- "notNull": false
655
- },
656
- "created_at": {
657
- "name": "created_at",
658
- "type": "timestamp",
659
- "primaryKey": false,
660
- "notNull": true,
661
- "default": "now()"
662
- },
663
- "expires_at": {
664
- "name": "expires_at",
665
- "type": "timestamp",
666
- "primaryKey": false,
667
- "notNull": true
668
- },
669
- "id": {
670
- "name": "id",
671
- "type": "text",
672
- "primaryKey": true,
673
- "notNull": true
674
- },
675
- "ip_address": {
676
- "name": "ip_address",
677
- "type": "text",
678
- "primaryKey": false,
679
- "notNull": false
680
- },
681
- "token": {
682
- "name": "token",
683
- "type": "text",
684
- "primaryKey": false,
685
- "notNull": true
686
- },
687
- "updated_at": {
688
- "name": "updated_at",
689
- "type": "timestamp",
690
- "primaryKey": false,
691
- "notNull": true,
692
- "default": "now()"
693
- },
694
- "user_agent": {
695
- "name": "user_agent",
696
- "type": "text",
697
- "primaryKey": false,
698
- "notNull": false
699
- },
700
- "user_id": {
701
- "name": "user_id",
702
- "type": "text",
703
- "primaryKey": false,
704
- "notNull": true
705
- }
706
- },
707
- "indexes": {
708
- "session_userId_idx": {
709
- "name": "session_userId_idx",
710
- "columns": [
711
- {
712
- "expression": "user_id",
713
- "isExpression": false,
714
- "asc": true,
715
- "nulls": "last"
716
- }
717
- ],
718
- "isUnique": false,
719
- "concurrently": false,
720
- "method": "btree",
721
- "with": {}
722
- }
723
- },
724
- "foreignKeys": {
725
- "session_active_organization_id_organization_id_fk": {
726
- "name": "session_active_organization_id_organization_id_fk",
727
- "tableFrom": "session",
728
- "tableTo": "organization",
729
- "columnsFrom": ["active_organization_id"],
730
- "columnsTo": ["id"],
731
- "onDelete": "set null",
732
- "onUpdate": "no action"
733
- },
734
- "session_user_id_user_id_fk": {
735
- "name": "session_user_id_user_id_fk",
736
- "tableFrom": "session",
737
- "tableTo": "user",
738
- "columnsFrom": ["user_id"],
739
- "columnsTo": ["id"],
740
- "onDelete": "cascade",
741
- "onUpdate": "no action"
742
- }
743
- },
744
- "compositePrimaryKeys": {},
745
- "uniqueConstraints": {
746
- "session_token_unique": {
747
- "name": "session_token_unique",
748
- "nullsNotDistinct": false,
749
- "columns": ["token"]
750
- }
751
- },
752
- "policies": {},
753
- "checkConstraints": {},
754
- "isRLSEnabled": true
755
- },
756
- "public.user": {
757
- "name": "user",
758
- "schema": "",
759
- "columns": {
760
- "created_at": {
761
- "name": "created_at",
762
- "type": "timestamp",
763
- "primaryKey": false,
764
- "notNull": true,
765
- "default": "now()"
766
- },
767
- "email": {
768
- "name": "email",
769
- "type": "text",
770
- "primaryKey": false,
771
- "notNull": true
772
- },
773
- "email_verified": {
774
- "name": "email_verified",
775
- "type": "boolean",
776
- "primaryKey": false,
777
- "notNull": true,
778
- "default": false
779
- },
780
- "id": {
781
- "name": "id",
782
- "type": "text",
783
- "primaryKey": true,
784
- "notNull": true
785
- },
786
- "image": {
787
- "name": "image",
788
- "type": "text",
789
- "primaryKey": false,
790
- "notNull": false
791
- },
792
- "name": {
793
- "name": "name",
794
- "type": "text",
795
- "primaryKey": false,
796
- "notNull": true
797
- },
798
- "updated_at": {
799
- "name": "updated_at",
800
- "type": "timestamp",
801
- "primaryKey": false,
802
- "notNull": true,
803
- "default": "now()"
804
- }
805
- },
806
- "indexes": {},
807
- "foreignKeys": {},
808
- "compositePrimaryKeys": {},
809
- "uniqueConstraints": {
810
- "user_email_unique": {
811
- "name": "user_email_unique",
812
- "nullsNotDistinct": false,
813
- "columns": ["email"]
814
- }
815
- },
816
- "policies": {},
817
- "checkConstraints": {},
818
- "isRLSEnabled": true
819
- },
820
- "public.verification": {
821
- "name": "verification",
822
- "schema": "",
823
- "columns": {
824
- "created_at": {
825
- "name": "created_at",
826
- "type": "timestamp",
827
- "primaryKey": false,
828
- "notNull": true,
829
- "default": "now()"
830
- },
831
- "expires_at": {
832
- "name": "expires_at",
833
- "type": "timestamp",
834
- "primaryKey": false,
835
- "notNull": true
836
- },
837
- "id": {
838
- "name": "id",
839
- "type": "text",
840
- "primaryKey": true,
841
- "notNull": true
842
- },
843
- "identifier": {
844
- "name": "identifier",
845
- "type": "text",
846
- "primaryKey": false,
847
- "notNull": true
848
- },
849
- "updated_at": {
850
- "name": "updated_at",
851
- "type": "timestamp",
852
- "primaryKey": false,
853
- "notNull": true,
854
- "default": "now()"
855
- },
856
- "value": {
857
- "name": "value",
858
- "type": "text",
859
- "primaryKey": false,
860
- "notNull": true
861
- }
862
- },
863
- "indexes": {
864
- "verification_identifier_idx": {
865
- "name": "verification_identifier_idx",
866
- "columns": [
867
- {
868
- "expression": "identifier",
869
- "isExpression": false,
870
- "asc": true,
871
- "nulls": "last"
872
- }
873
- ],
874
- "isUnique": false,
875
- "concurrently": false,
876
- "method": "btree",
877
- "with": {}
878
- }
879
- },
880
- "foreignKeys": {},
881
- "compositePrimaryKeys": {},
882
- "uniqueConstraints": {},
883
- "policies": {},
884
- "checkConstraints": {},
885
- "isRLSEnabled": true
886
- },
887
- "public.bigquery_query_costs": {
888
- "name": "bigquery_query_costs",
889
- "schema": "",
890
- "columns": {
891
- "actual_bytes_billed": {
892
- "name": "actual_bytes_billed",
893
- "type": "bigint",
894
- "primaryKey": false,
895
- "notNull": false
896
- },
897
- "actual_bytes_processed": {
898
- "name": "actual_bytes_processed",
899
- "type": "bigint",
900
- "primaryKey": false,
901
- "notNull": false
902
- },
903
- "actual_cost_usd": {
904
- "name": "actual_cost_usd",
905
- "type": "double precision",
906
- "primaryKey": false,
907
- "notNull": false
908
- },
909
- "cache_hit": {
910
- "name": "cache_hit",
911
- "type": "boolean",
912
- "primaryKey": false,
913
- "notNull": false
914
- },
915
- "connection_name": {
916
- "name": "connection_name",
917
- "type": "text",
918
- "primaryKey": false,
919
- "notNull": true
920
- },
921
- "created_at": {
922
- "name": "created_at",
923
- "type": "timestamp with time zone",
924
- "primaryKey": false,
925
- "notNull": true,
926
- "default": "now()"
927
- },
928
- "currency": {
929
- "name": "currency",
930
- "type": "text",
931
- "primaryKey": false,
932
- "notNull": true,
933
- "default": "'USD'"
934
- },
935
- "estimated_bytes_processed": {
936
- "name": "estimated_bytes_processed",
937
- "type": "bigint",
938
- "primaryKey": false,
939
- "notNull": false
940
- },
941
- "estimated_cost_usd": {
942
- "name": "estimated_cost_usd",
943
- "type": "double precision",
944
- "primaryKey": false,
945
- "notNull": false
946
- },
947
- "executed_at": {
948
- "name": "executed_at",
949
- "type": "timestamp with time zone",
950
- "primaryKey": false,
951
- "notNull": true
952
- },
953
- "id": {
954
- "name": "id",
955
- "type": "text",
956
- "primaryKey": true,
957
- "notNull": true
958
- },
959
- "job_id": {
960
- "name": "job_id",
961
- "type": "text",
962
- "primaryKey": false,
963
- "notNull": false
964
- },
965
- "location": {
966
- "name": "location",
967
- "type": "text",
968
- "primaryKey": false,
969
- "notNull": false
970
- },
971
- "organization_id": {
972
- "name": "organization_id",
973
- "type": "text",
974
- "primaryKey": false,
975
- "notNull": true
976
- },
977
- "pricing_model": {
978
- "name": "pricing_model",
979
- "type": "text",
980
- "primaryKey": false,
981
- "notNull": true,
982
- "default": "'unknown'"
983
- },
984
- "query_id": {
985
- "name": "query_id",
986
- "type": "text",
987
- "primaryKey": false,
988
- "notNull": true
989
- },
990
- "tool_call_id": {
991
- "name": "tool_call_id",
992
- "type": "text",
993
- "primaryKey": false,
994
- "notNull": true
995
- }
996
- },
997
- "indexes": {
998
- "idx_bigquery_query_costs_org": {
999
- "name": "idx_bigquery_query_costs_org",
1000
- "columns": [
1001
- {
1002
- "expression": "organization_id",
1003
- "isExpression": false,
1004
- "asc": true,
1005
- "nulls": "last"
1006
- }
1007
- ],
1008
- "isUnique": false,
1009
- "concurrently": false,
1010
- "method": "btree",
1011
- "with": {}
1012
- },
1013
- "idx_bigquery_query_costs_executed_at": {
1014
- "name": "idx_bigquery_query_costs_executed_at",
1015
- "columns": [
1016
- {
1017
- "expression": "executed_at",
1018
- "isExpression": false,
1019
- "asc": true,
1020
- "nulls": "last"
1021
- }
1022
- ],
1023
- "isUnique": false,
1024
- "concurrently": false,
1025
- "method": "btree",
1026
- "with": {}
1027
- }
1028
- },
1029
- "foreignKeys": {
1030
- "bigquery_query_costs_organization_id_organization_id_fk": {
1031
- "name": "bigquery_query_costs_organization_id_organization_id_fk",
1032
- "tableFrom": "bigquery_query_costs",
1033
- "tableTo": "organization",
1034
- "columnsFrom": ["organization_id"],
1035
- "columnsTo": ["id"],
1036
- "onDelete": "cascade",
1037
- "onUpdate": "no action"
1038
- }
1039
- },
1040
- "compositePrimaryKeys": {},
1041
- "uniqueConstraints": {},
1042
- "policies": {},
1043
- "checkConstraints": {},
1044
- "isRLSEnabled": true
1045
- },
1046
- "public.cli_query_actions": {
1047
- "name": "cli_query_actions",
1048
- "schema": "",
1049
- "columns": {
1050
- "id": {
1051
- "name": "id",
1052
- "type": "text",
1053
- "primaryKey": true,
1054
- "notNull": true
1055
- },
1056
- "organization_id": {
1057
- "name": "organization_id",
1058
- "type": "text",
1059
- "primaryKey": false,
1060
- "notNull": true
1061
- },
1062
- "actor_user_id": {
1063
- "name": "actor_user_id",
1064
- "type": "text",
1065
- "primaryKey": false,
1066
- "notNull": true
1067
- },
1068
- "actor_email": {
1069
- "name": "actor_email",
1070
- "type": "text",
1071
- "primaryKey": false,
1072
- "notNull": true
1073
- },
1074
- "actor_auth_mode": {
1075
- "name": "actor_auth_mode",
1076
- "type": "text",
1077
- "primaryKey": false,
1078
- "notNull": true
1079
- },
1080
- "actor_membership_roles": {
1081
- "name": "actor_membership_roles",
1082
- "type": "jsonb",
1083
- "primaryKey": false,
1084
- "notNull": true
1085
- },
1086
- "request_id": {
1087
- "name": "request_id",
1088
- "type": "text",
1089
- "primaryKey": false,
1090
- "notNull": true
1091
- },
1092
- "action_type": {
1093
- "name": "action_type",
1094
- "type": "text",
1095
- "primaryKey": false,
1096
- "notNull": true
1097
- },
1098
- "stage": {
1099
- "name": "stage",
1100
- "type": "text",
1101
- "primaryKey": false,
1102
- "notNull": true,
1103
- "default": "'received'"
1104
- },
1105
- "status": {
1106
- "name": "status",
1107
- "type": "text",
1108
- "primaryKey": false,
1109
- "notNull": true,
1110
- "default": "'pending'"
1111
- },
1112
- "usage_persistence_status": {
1113
- "name": "usage_persistence_status",
1114
- "type": "text",
1115
- "primaryKey": false,
1116
- "notNull": true,
1117
- "default": "'not_started'"
1118
- },
1119
- "source_key": {
1120
- "name": "source_key",
1121
- "type": "text",
1122
- "primaryKey": false,
1123
- "notNull": true
1124
- },
1125
- "source_id": {
1126
- "name": "source_id",
1127
- "type": "text",
1128
- "primaryKey": false,
1129
- "notNull": false
1130
- },
1131
- "provider": {
1132
- "name": "provider",
1133
- "type": "text",
1134
- "primaryKey": false,
1135
- "notNull": false
1136
- },
1137
- "source_status": {
1138
- "name": "source_status",
1139
- "type": "text",
1140
- "primaryKey": false,
1141
- "notNull": false
1142
- },
1143
- "sql": {
1144
- "name": "sql",
1145
- "type": "text",
1146
- "primaryKey": false,
1147
- "notNull": true
1148
- },
1149
- "normalized_sql": {
1150
- "name": "normalized_sql",
1151
- "type": "text",
1152
- "primaryKey": false,
1153
- "notNull": false
1154
- },
1155
- "max_rows": {
1156
- "name": "max_rows",
1157
- "type": "integer",
1158
- "primaryKey": false,
1159
- "notNull": false
1160
- },
1161
- "max_bytes": {
1162
- "name": "max_bytes",
1163
- "type": "integer",
1164
- "primaryKey": false,
1165
- "notNull": false
1166
- },
1167
- "cell_max_chars": {
1168
- "name": "cell_max_chars",
1169
- "type": "integer",
1170
- "primaryKey": false,
1171
- "notNull": false
1172
- },
1173
- "timeout_ms": {
1174
- "name": "timeout_ms",
1175
- "type": "integer",
1176
- "primaryKey": false,
1177
- "notNull": false
1178
- },
1179
- "normalized_sql_changed": {
1180
- "name": "normalized_sql_changed",
1181
- "type": "boolean",
1182
- "primaryKey": false,
1183
- "notNull": true,
1184
- "default": false
1185
- },
1186
- "row_count": {
1187
- "name": "row_count",
1188
- "type": "integer",
1189
- "primaryKey": false,
1190
- "notNull": false
1191
- },
1192
- "elapsed_ms": {
1193
- "name": "elapsed_ms",
1194
- "type": "integer",
1195
- "primaryKey": false,
1196
- "notNull": false
1197
- },
1198
- "error_detail": {
1199
- "name": "error_detail",
1200
- "type": "text",
1201
- "primaryKey": false,
1202
- "notNull": false
1203
- },
1204
- "error_hint": {
1205
- "name": "error_hint",
1206
- "type": "text",
1207
- "primaryKey": false,
1208
- "notNull": false
1209
- },
1210
- "retryable": {
1211
- "name": "retryable",
1212
- "type": "boolean",
1213
- "primaryKey": false,
1214
- "notNull": false
1215
- },
1216
- "last_event_id": {
1217
- "name": "last_event_id",
1218
- "type": "text",
1219
- "primaryKey": false,
1220
- "notNull": false
1221
- },
1222
- "last_event_at": {
1223
- "name": "last_event_at",
1224
- "type": "timestamp with time zone",
1225
- "primaryKey": false,
1226
- "notNull": true,
1227
- "default": "now()"
1228
- },
1229
- "completed_at": {
1230
- "name": "completed_at",
1231
- "type": "timestamp with time zone",
1232
- "primaryKey": false,
1233
- "notNull": false
1234
- },
1235
- "created_at": {
1236
- "name": "created_at",
1237
- "type": "timestamp with time zone",
1238
- "primaryKey": false,
1239
- "notNull": true,
1240
- "default": "now()"
1241
- },
1242
- "updated_at": {
1243
- "name": "updated_at",
1244
- "type": "timestamp with time zone",
1245
- "primaryKey": false,
1246
- "notNull": true,
1247
- "default": "now()"
1248
- },
1249
- "version": {
1250
- "name": "version",
1251
- "type": "integer",
1252
- "primaryKey": false,
1253
- "notNull": true,
1254
- "default": 1
1255
- }
1256
- },
1257
- "indexes": {
1258
- "idx_cli_query_actions_org_created": {
1259
- "name": "idx_cli_query_actions_org_created",
1260
- "columns": [
1261
- {
1262
- "expression": "organization_id",
1263
- "isExpression": false,
1264
- "asc": true,
1265
- "nulls": "last"
1266
- },
1267
- {
1268
- "expression": "created_at",
1269
- "isExpression": false,
1270
- "asc": true,
1271
- "nulls": "last"
1272
- }
1273
- ],
1274
- "isUnique": false,
1275
- "concurrently": false,
1276
- "method": "btree",
1277
- "with": {}
1278
- },
1279
- "idx_cli_query_actions_actor_user_id": {
1280
- "name": "idx_cli_query_actions_actor_user_id",
1281
- "columns": [
1282
- {
1283
- "expression": "actor_user_id",
1284
- "isExpression": false,
1285
- "asc": true,
1286
- "nulls": "last"
1287
- }
1288
- ],
1289
- "isUnique": false,
1290
- "concurrently": false,
1291
- "method": "btree",
1292
- "with": {}
1293
- },
1294
- "idx_cli_query_actions_request_id": {
1295
- "name": "idx_cli_query_actions_request_id",
1296
- "columns": [
1297
- {
1298
- "expression": "request_id",
1299
- "isExpression": false,
1300
- "asc": true,
1301
- "nulls": "last"
1302
- }
1303
- ],
1304
- "isUnique": false,
1305
- "concurrently": false,
1306
- "method": "btree",
1307
- "with": {}
1308
- },
1309
- "idx_cli_query_actions_source_id": {
1310
- "name": "idx_cli_query_actions_source_id",
1311
- "columns": [
1312
- {
1313
- "expression": "source_id",
1314
- "isExpression": false,
1315
- "asc": true,
1316
- "nulls": "last"
1317
- }
1318
- ],
1319
- "isUnique": false,
1320
- "concurrently": false,
1321
- "method": "btree",
1322
- "with": {}
1323
- },
1324
- "idx_cli_query_actions_status": {
1325
- "name": "idx_cli_query_actions_status",
1326
- "columns": [
1327
- {
1328
- "expression": "status",
1329
- "isExpression": false,
1330
- "asc": true,
1331
- "nulls": "last"
1332
- }
1333
- ],
1334
- "isUnique": false,
1335
- "concurrently": false,
1336
- "method": "btree",
1337
- "with": {}
1338
- }
1339
- },
1340
- "foreignKeys": {
1341
- "cli_query_actions_organization_id_organization_id_fk": {
1342
- "name": "cli_query_actions_organization_id_organization_id_fk",
1343
- "tableFrom": "cli_query_actions",
1344
- "tableTo": "organization",
1345
- "columnsFrom": ["organization_id"],
1346
- "columnsTo": ["id"],
1347
- "onDelete": "cascade",
1348
- "onUpdate": "no action"
1349
- },
1350
- "cli_query_actions_source_id_data_sources_id_fk": {
1351
- "name": "cli_query_actions_source_id_data_sources_id_fk",
1352
- "tableFrom": "cli_query_actions",
1353
- "tableTo": "data_sources",
1354
- "columnsFrom": ["source_id"],
1355
- "columnsTo": ["id"],
1356
- "onDelete": "set null",
1357
- "onUpdate": "no action"
1358
- },
1359
- "cli_query_actions_same_action_last_event_fk": {
1360
- "name": "cli_query_actions_same_action_last_event_fk",
1361
- "tableFrom": "cli_query_actions",
1362
- "tableTo": "cli_query_action_events",
1363
- "columnsFrom": ["id", "last_event_id"],
1364
- "columnsTo": ["query_action_id", "id"],
1365
- "onDelete": "no action",
1366
- "onUpdate": "no action"
1367
- }
1368
- },
1369
- "compositePrimaryKeys": {},
1370
- "uniqueConstraints": {
1371
- "cli_query_actions_identity_unique": {
1372
- "name": "cli_query_actions_identity_unique",
1373
- "nullsNotDistinct": false,
1374
- "columns": [
1375
- "id",
1376
- "organization_id",
1377
- "request_id",
1378
- "action_type",
1379
- "source_key"
1380
- ]
1381
- }
1382
- },
1383
- "policies": {},
1384
- "checkConstraints": {
1385
- "cli_query_actions_action_type_check": {
1386
- "name": "cli_query_actions_action_type_check",
1387
- "value": "\"cli_query_actions\".\"action_type\" in ('validate', 'execute')"
1388
- },
1389
- "cli_query_actions_actor_auth_mode_check": {
1390
- "name": "cli_query_actions_actor_auth_mode_check",
1391
- "value": "\"cli_query_actions\".\"actor_auth_mode\" in ('browser_session', 'bearer_token')"
1392
- },
1393
- "cli_query_actions_stage_check": {
1394
- "name": "cli_query_actions_stage_check",
1395
- "value": "\"cli_query_actions\".\"stage\" in ('received', 'load_source', 'validate_query', 'load_credentials', 'execute_query', 'persist_usage', 'completed')"
1396
- },
1397
- "cli_query_actions_status_check": {
1398
- "name": "cli_query_actions_status_check",
1399
- "value": "\"cli_query_actions\".\"status\" in ('pending', 'succeeded', 'source_not_found', 'source_not_queryable', 'query_rejected', 'query_preparation_failed', 'query_unavailable', 'query_timed_out', 'query_execution_failed')"
1400
- },
1401
- "cli_query_actions_usage_persistence_status_check": {
1402
- "name": "cli_query_actions_usage_persistence_status_check",
1403
- "value": "\"cli_query_actions\".\"usage_persistence_status\" in ('not_started', 'succeeded', 'failed')"
1404
- },
1405
- "cli_query_actions_completed_stage_check": {
1406
- "name": "cli_query_actions_completed_stage_check",
1407
- "value": "( (stage = 'completed' and completed_at is not null) or (stage <> 'completed' and completed_at is null) )"
1408
- },
1409
- "cli_query_actions_stage_status_alignment_check": {
1410
- "name": "cli_query_actions_stage_status_alignment_check",
1411
- "value": "( (stage = 'completed' and status <> 'pending') or (stage <> 'completed' and status = 'pending') )"
1412
- },
1413
- "cli_query_actions_pre_completion_usage_check": {
1414
- "name": "cli_query_actions_pre_completion_usage_check",
1415
- "value": "( stage = 'completed' or usage_persistence_status = 'not_started' )"
1416
- }
1417
- },
1418
- "isRLSEnabled": true
1419
- },
1420
- "public.cli_query_action_events": {
1421
- "name": "cli_query_action_events",
1422
- "schema": "",
1423
- "columns": {
1424
- "id": {
1425
- "name": "id",
1426
- "type": "text",
1427
- "primaryKey": true,
1428
- "notNull": true
1429
- },
1430
- "query_action_id": {
1431
- "name": "query_action_id",
1432
- "type": "text",
1433
- "primaryKey": false,
1434
- "notNull": true
1435
- },
1436
- "organization_id": {
1437
- "name": "organization_id",
1438
- "type": "text",
1439
- "primaryKey": false,
1440
- "notNull": true
1441
- },
1442
- "actor_user_id": {
1443
- "name": "actor_user_id",
1444
- "type": "text",
1445
- "primaryKey": false,
1446
- "notNull": true
1447
- },
1448
- "actor_email": {
1449
- "name": "actor_email",
1450
- "type": "text",
1451
- "primaryKey": false,
1452
- "notNull": true
1453
- },
1454
- "actor_auth_mode": {
1455
- "name": "actor_auth_mode",
1456
- "type": "text",
1457
- "primaryKey": false,
1458
- "notNull": true
1459
- },
1460
- "actor_membership_roles": {
1461
- "name": "actor_membership_roles",
1462
- "type": "jsonb",
1463
- "primaryKey": false,
1464
- "notNull": true
1465
- },
1466
- "request_id": {
1467
- "name": "request_id",
1468
- "type": "text",
1469
- "primaryKey": false,
1470
- "notNull": true
1471
- },
1472
- "action_type": {
1473
- "name": "action_type",
1474
- "type": "text",
1475
- "primaryKey": false,
1476
- "notNull": true
1477
- },
1478
- "event_type": {
1479
- "name": "event_type",
1480
- "type": "text",
1481
- "primaryKey": false,
1482
- "notNull": true
1483
- },
1484
- "stage": {
1485
- "name": "stage",
1486
- "type": "text",
1487
- "primaryKey": false,
1488
- "notNull": true
1489
- },
1490
- "status": {
1491
- "name": "status",
1492
- "type": "text",
1493
- "primaryKey": false,
1494
- "notNull": true
1495
- },
1496
- "usage_persistence_status": {
1497
- "name": "usage_persistence_status",
1498
- "type": "text",
1499
- "primaryKey": false,
1500
- "notNull": true
1501
- },
1502
- "source_key": {
1503
- "name": "source_key",
1504
- "type": "text",
1505
- "primaryKey": false,
1506
- "notNull": true
1507
- },
1508
- "source_id": {
1509
- "name": "source_id",
1510
- "type": "text",
1511
- "primaryKey": false,
1512
- "notNull": false
1513
- },
1514
- "provider": {
1515
- "name": "provider",
1516
- "type": "text",
1517
- "primaryKey": false,
1518
- "notNull": false
1519
- },
1520
- "source_status": {
1521
- "name": "source_status",
1522
- "type": "text",
1523
- "primaryKey": false,
1524
- "notNull": false
1525
- },
1526
- "sql": {
1527
- "name": "sql",
1528
- "type": "text",
1529
- "primaryKey": false,
1530
- "notNull": false
1531
- },
1532
- "normalized_sql": {
1533
- "name": "normalized_sql",
1534
- "type": "text",
1535
- "primaryKey": false,
1536
- "notNull": false
1537
- },
1538
- "max_rows": {
1539
- "name": "max_rows",
1540
- "type": "integer",
1541
- "primaryKey": false,
1542
- "notNull": false
1543
- },
1544
- "max_bytes": {
1545
- "name": "max_bytes",
1546
- "type": "integer",
1547
- "primaryKey": false,
1548
- "notNull": false
1549
- },
1550
- "cell_max_chars": {
1551
- "name": "cell_max_chars",
1552
- "type": "integer",
1553
- "primaryKey": false,
1554
- "notNull": false
1555
- },
1556
- "timeout_ms": {
1557
- "name": "timeout_ms",
1558
- "type": "integer",
1559
- "primaryKey": false,
1560
- "notNull": false
1561
- },
1562
- "normalized_sql_changed": {
1563
- "name": "normalized_sql_changed",
1564
- "type": "boolean",
1565
- "primaryKey": false,
1566
- "notNull": true,
1567
- "default": false
1568
- },
1569
- "row_count": {
1570
- "name": "row_count",
1571
- "type": "integer",
1572
- "primaryKey": false,
1573
- "notNull": false
1574
- },
1575
- "elapsed_ms": {
1576
- "name": "elapsed_ms",
1577
- "type": "integer",
1578
- "primaryKey": false,
1579
- "notNull": false
1580
- },
1581
- "error_detail": {
1582
- "name": "error_detail",
1583
- "type": "text",
1584
- "primaryKey": false,
1585
- "notNull": false
1586
- },
1587
- "error_hint": {
1588
- "name": "error_hint",
1589
- "type": "text",
1590
- "primaryKey": false,
1591
- "notNull": false
1592
- },
1593
- "retryable": {
1594
- "name": "retryable",
1595
- "type": "boolean",
1596
- "primaryKey": false,
1597
- "notNull": false
1598
- },
1599
- "occurred_at": {
1600
- "name": "occurred_at",
1601
- "type": "timestamp with time zone",
1602
- "primaryKey": false,
1603
- "notNull": true
1604
- },
1605
- "causation_event_id": {
1606
- "name": "causation_event_id",
1607
- "type": "text",
1608
- "primaryKey": false,
1609
- "notNull": false
1610
- },
1611
- "org_slug": {
1612
- "name": "org_slug",
1613
- "type": "text",
1614
- "primaryKey": false,
1615
- "notNull": false
1616
- },
1617
- "created_at": {
1618
- "name": "created_at",
1619
- "type": "timestamp with time zone",
1620
- "primaryKey": false,
1621
- "notNull": true,
1622
- "default": "now()"
1623
- }
1624
- },
1625
- "indexes": {
1626
- "idx_cli_query_action_events_action_occurred": {
1627
- "name": "idx_cli_query_action_events_action_occurred",
1628
- "columns": [
1629
- {
1630
- "expression": "query_action_id",
1631
- "isExpression": false,
1632
- "asc": true,
1633
- "nulls": "last"
1634
- },
1635
- {
1636
- "expression": "occurred_at",
1637
- "isExpression": false,
1638
- "asc": true,
1639
- "nulls": "last"
1640
- },
1641
- {
1642
- "expression": "id",
1643
- "isExpression": false,
1644
- "asc": true,
1645
- "nulls": "last"
1646
- }
1647
- ],
1648
- "isUnique": false,
1649
- "concurrently": false,
1650
- "method": "btree",
1651
- "with": {}
1652
- },
1653
- "idx_cli_query_action_events_org_occurred": {
1654
- "name": "idx_cli_query_action_events_org_occurred",
1655
- "columns": [
1656
- {
1657
- "expression": "organization_id",
1658
- "isExpression": false,
1659
- "asc": true,
1660
- "nulls": "last"
1661
- },
1662
- {
1663
- "expression": "occurred_at",
1664
- "isExpression": false,
1665
- "asc": true,
1666
- "nulls": "last"
1667
- }
1668
- ],
1669
- "isUnique": false,
1670
- "concurrently": false,
1671
- "method": "btree",
1672
- "with": {}
1673
- },
1674
- "idx_cli_query_action_events_actor_user_id": {
1675
- "name": "idx_cli_query_action_events_actor_user_id",
1676
- "columns": [
1677
- {
1678
- "expression": "actor_user_id",
1679
- "isExpression": false,
1680
- "asc": true,
1681
- "nulls": "last"
1682
- }
1683
- ],
1684
- "isUnique": false,
1685
- "concurrently": false,
1686
- "method": "btree",
1687
- "with": {}
1688
- },
1689
- "idx_cli_query_action_events_request_id": {
1690
- "name": "idx_cli_query_action_events_request_id",
1691
- "columns": [
1692
- {
1693
- "expression": "request_id",
1694
- "isExpression": false,
1695
- "asc": true,
1696
- "nulls": "last"
1697
- }
1698
- ],
1699
- "isUnique": false,
1700
- "concurrently": false,
1701
- "method": "btree",
1702
- "with": {}
1703
- },
1704
- "idx_cli_query_action_events_causation": {
1705
- "name": "idx_cli_query_action_events_causation",
1706
- "columns": [
1707
- {
1708
- "expression": "causation_event_id",
1709
- "isExpression": false,
1710
- "asc": true,
1711
- "nulls": "last"
1712
- }
1713
- ],
1714
- "isUnique": false,
1715
- "concurrently": false,
1716
- "method": "btree",
1717
- "with": {}
1718
- },
1719
- "idx_cli_query_action_events_action_event_type_unique": {
1720
- "name": "idx_cli_query_action_events_action_event_type_unique",
1721
- "columns": [
1722
- {
1723
- "expression": "query_action_id",
1724
- "isExpression": false,
1725
- "asc": true,
1726
- "nulls": "last"
1727
- },
1728
- {
1729
- "expression": "event_type",
1730
- "isExpression": false,
1731
- "asc": true,
1732
- "nulls": "last"
1733
- }
1734
- ],
1735
- "isUnique": true,
1736
- "concurrently": false,
1737
- "method": "btree",
1738
- "with": {}
1739
- }
1740
- },
1741
- "foreignKeys": {
1742
- "cli_query_action_events_query_action_id_cli_query_actions_id_fk": {
1743
- "name": "cli_query_action_events_query_action_id_cli_query_actions_id_fk",
1744
- "tableFrom": "cli_query_action_events",
1745
- "tableTo": "cli_query_actions",
1746
- "columnsFrom": ["query_action_id"],
1747
- "columnsTo": ["id"],
1748
- "onDelete": "cascade",
1749
- "onUpdate": "no action"
1750
- },
1751
- "cli_query_action_events_organization_id_organization_id_fk": {
1752
- "name": "cli_query_action_events_organization_id_organization_id_fk",
1753
- "tableFrom": "cli_query_action_events",
1754
- "tableTo": "organization",
1755
- "columnsFrom": ["organization_id"],
1756
- "columnsTo": ["id"],
1757
- "onDelete": "cascade",
1758
- "onUpdate": "no action"
1759
- },
1760
- "cli_query_action_events_source_id_data_sources_id_fk": {
1761
- "name": "cli_query_action_events_source_id_data_sources_id_fk",
1762
- "tableFrom": "cli_query_action_events",
1763
- "tableTo": "data_sources",
1764
- "columnsFrom": ["source_id"],
1765
- "columnsTo": ["id"],
1766
- "onDelete": "set null",
1767
- "onUpdate": "no action"
1768
- },
1769
- "cli_query_action_events_action_identity_fk": {
1770
- "name": "cli_query_action_events_action_identity_fk",
1771
- "tableFrom": "cli_query_action_events",
1772
- "tableTo": "cli_query_actions",
1773
- "columnsFrom": [
1774
- "query_action_id",
1775
- "organization_id",
1776
- "request_id",
1777
- "action_type",
1778
- "source_key"
1779
- ],
1780
- "columnsTo": [
1781
- "id",
1782
- "organization_id",
1783
- "request_id",
1784
- "action_type",
1785
- "source_key"
1786
- ],
1787
- "onDelete": "no action",
1788
- "onUpdate": "no action"
1789
- },
1790
- "cli_query_action_events_same_action_causation_fk": {
1791
- "name": "cli_query_action_events_same_action_causation_fk",
1792
- "tableFrom": "cli_query_action_events",
1793
- "tableTo": "cli_query_action_events",
1794
- "columnsFrom": ["query_action_id", "causation_event_id"],
1795
- "columnsTo": ["query_action_id", "id"],
1796
- "onDelete": "no action",
1797
- "onUpdate": "no action"
1798
- },
1799
- "cli_query_action_events_causation_event_id_cli_query_action_events_id_fk": {
1800
- "name": "cli_query_action_events_causation_event_id_cli_query_action_events_id_fk",
1801
- "tableFrom": "cli_query_action_events",
1802
- "tableTo": "cli_query_action_events",
1803
- "columnsFrom": ["causation_event_id"],
1804
- "columnsTo": ["id"],
1805
- "onDelete": "set null",
1806
- "onUpdate": "no action"
1807
- }
1808
- },
1809
- "compositePrimaryKeys": {},
1810
- "uniqueConstraints": {
1811
- "cli_query_action_events_action_id_unique": {
1812
- "name": "cli_query_action_events_action_id_unique",
1813
- "nullsNotDistinct": false,
1814
- "columns": ["query_action_id", "id"]
1815
- }
1816
- },
1817
- "policies": {},
1818
- "checkConstraints": {
1819
- "cli_query_action_events_sql_payload_check": {
1820
- "name": "cli_query_action_events_sql_payload_check",
1821
- "value": "( (event_type = 'action_received' and sql is not null) or (event_type <> 'action_received' and sql is null) )"
1822
- },
1823
- "cli_query_action_events_causation_chain_check": {
1824
- "name": "cli_query_action_events_causation_chain_check",
1825
- "value": "( (event_type = 'action_received' and causation_event_id is null) or (event_type <> 'action_received' and causation_event_id is not null) )"
1826
- },
1827
- "cli_query_action_events_validated_normalized_sql_check": {
1828
- "name": "cli_query_action_events_validated_normalized_sql_check",
1829
- "value": "(event_type <> 'query_validated' or normalized_sql is not null)"
1830
- },
1831
- "cli_query_action_events_lifecycle_check": {
1832
- "name": "cli_query_action_events_lifecycle_check",
1833
- "value": "( (event_type = 'action_received' and stage = 'received' and status = 'pending' and usage_persistence_status = 'not_started') or (event_type = 'source_loaded' and stage = 'validate_query' and status = 'pending' and usage_persistence_status = 'not_started') or (event_type = 'source_not_found' and stage = 'completed' and status = 'source_not_found' and usage_persistence_status = 'not_started') or (event_type = 'source_not_queryable' and stage = 'completed' and status = 'source_not_queryable' and usage_persistence_status = 'not_started') or ( event_type = 'query_validated' and ( (action_type = 'validate' and stage = 'completed' and status = 'succeeded' and usage_persistence_status = 'not_started') or (action_type = 'execute' and stage = 'load_credentials' and status = 'pending' and usage_persistence_status = 'not_started') ) ) or (event_type = 'query_rejected' and stage = 'completed' and status = 'query_rejected' and usage_persistence_status = 'not_started') or (event_type = 'credentials_loaded' and stage = 'execute_query' and status = 'pending' and usage_persistence_status = 'not_started') or (event_type = 'query_preparation_failed' and stage = 'completed' and status = 'query_preparation_failed' and usage_persistence_status = 'not_started') or (event_type = 'query_executed' and stage = 'persist_usage' and status = 'pending' and usage_persistence_status = 'not_started') or (event_type = 'query_unavailable' and stage = 'completed' and status = 'query_unavailable' and usage_persistence_status = 'not_started') or (event_type = 'query_timed_out' and stage = 'completed' and status = 'query_timed_out' and usage_persistence_status = 'not_started') or (event_type = 'query_execution_failed' and stage = 'completed' and status = 'query_execution_failed' and usage_persistence_status = 'not_started') or (event_type = 'usage_persisted' and stage = 'completed' and status = 'succeeded' and usage_persistence_status = 'succeeded') or (event_type = 'usage_persist_failed' and stage = 'completed' and status = 'succeeded' and usage_persistence_status = 'failed') )"
1834
- },
1835
- "cli_query_action_events_action_type_check": {
1836
- "name": "cli_query_action_events_action_type_check",
1837
- "value": "\"cli_query_action_events\".\"action_type\" in ('validate', 'execute')"
1838
- },
1839
- "cli_query_action_events_actor_auth_mode_check": {
1840
- "name": "cli_query_action_events_actor_auth_mode_check",
1841
- "value": "\"cli_query_action_events\".\"actor_auth_mode\" in ('browser_session', 'bearer_token')"
1842
- },
1843
- "cli_query_action_events_event_type_check": {
1844
- "name": "cli_query_action_events_event_type_check",
1845
- "value": "\"cli_query_action_events\".\"event_type\" in ('action_received', 'source_loaded', 'source_not_found', 'source_not_queryable', 'query_validated', 'query_rejected', 'credentials_loaded', 'query_preparation_failed', 'query_executed', 'query_unavailable', 'query_timed_out', 'query_execution_failed', 'usage_persisted', 'usage_persist_failed')"
1846
- },
1847
- "cli_query_action_events_stage_check": {
1848
- "name": "cli_query_action_events_stage_check",
1849
- "value": "\"cli_query_action_events\".\"stage\" in ('received', 'load_source', 'validate_query', 'load_credentials', 'execute_query', 'persist_usage', 'completed')"
1850
- },
1851
- "cli_query_action_events_status_check": {
1852
- "name": "cli_query_action_events_status_check",
1853
- "value": "\"cli_query_action_events\".\"status\" in ('pending', 'succeeded', 'source_not_found', 'source_not_queryable', 'query_rejected', 'query_preparation_failed', 'query_unavailable', 'query_timed_out', 'query_execution_failed')"
1854
- },
1855
- "cli_query_action_events_usage_persistence_status_check": {
1856
- "name": "cli_query_action_events_usage_persistence_status_check",
1857
- "value": "\"cli_query_action_events\".\"usage_persistence_status\" in ('not_started', 'succeeded', 'failed')"
1858
- },
1859
- "cli_query_action_events_causation_not_self_check": {
1860
- "name": "cli_query_action_events_causation_not_self_check",
1861
- "value": "\"cli_query_action_events\".\"causation_event_id\" is null or \"cli_query_action_events\".\"causation_event_id\" <> \"cli_query_action_events\".\"id\""
1862
- }
1863
- },
1864
- "isRLSEnabled": true
1865
- },
1866
- "public.connector_jobs": {
1867
- "name": "connector_jobs",
1868
- "schema": "",
1869
- "columns": {
1870
- "completed_at": {
1871
- "name": "completed_at",
1872
- "type": "timestamp with time zone",
1873
- "primaryKey": false,
1874
- "notNull": false
1875
- },
1876
- "connector_id": {
1877
- "name": "connector_id",
1878
- "type": "text",
1879
- "primaryKey": false,
1880
- "notNull": true
1881
- },
1882
- "created_at": {
1883
- "name": "created_at",
1884
- "type": "timestamp with time zone",
1885
- "primaryKey": false,
1886
- "notNull": true,
1887
- "default": "now()"
1888
- },
1889
- "database": {
1890
- "name": "database",
1891
- "type": "text",
1892
- "primaryKey": false,
1893
- "notNull": true
1894
- },
1895
- "job_id": {
1896
- "name": "job_id",
1897
- "type": "text",
1898
- "primaryKey": true,
1899
- "notNull": true
1900
- },
1901
- "leased_at": {
1902
- "name": "leased_at",
1903
- "type": "timestamp with time zone",
1904
- "primaryKey": false,
1905
- "notNull": false
1906
- },
1907
- "max_rows": {
1908
- "name": "max_rows",
1909
- "type": "integer",
1910
- "primaryKey": false,
1911
- "notNull": false
1912
- },
1913
- "outcome": {
1914
- "name": "outcome",
1915
- "type": "jsonb",
1916
- "primaryKey": false,
1917
- "notNull": false
1918
- },
1919
- "sql": {
1920
- "name": "sql",
1921
- "type": "text",
1922
- "primaryKey": false,
1923
- "notNull": true
1924
- },
1925
- "status": {
1926
- "name": "status",
1927
- "type": "text",
1928
- "primaryKey": false,
1929
- "notNull": true
1930
- },
1931
- "timeout_ms": {
1932
- "name": "timeout_ms",
1933
- "type": "integer",
1934
- "primaryKey": false,
1935
- "notNull": false
1936
- },
1937
- "updated_at": {
1938
- "name": "updated_at",
1939
- "type": "timestamp with time zone",
1940
- "primaryKey": false,
1941
- "notNull": true,
1942
- "default": "now()"
1943
- },
1944
- "workgroup": {
1945
- "name": "workgroup",
1946
- "type": "text",
1947
- "primaryKey": false,
1948
- "notNull": false
1949
- }
1950
- },
1951
- "indexes": {
1952
- "idx_connector_jobs_connector_created": {
1953
- "name": "idx_connector_jobs_connector_created",
1954
- "columns": [
1955
- {
1956
- "expression": "connector_id",
1957
- "isExpression": false,
1958
- "asc": true,
1959
- "nulls": "last"
1960
- },
1961
- {
1962
- "expression": "created_at",
1963
- "isExpression": false,
1964
- "asc": true,
1965
- "nulls": "last"
1966
- }
1967
- ],
1968
- "isUnique": false,
1969
- "concurrently": false,
1970
- "method": "btree",
1971
- "with": {}
1972
- },
1973
- "idx_connector_jobs_status_created": {
1974
- "name": "idx_connector_jobs_status_created",
1975
- "columns": [
1976
- {
1977
- "expression": "status",
1978
- "isExpression": false,
1979
- "asc": true,
1980
- "nulls": "last"
1981
- },
1982
- {
1983
- "expression": "created_at",
1984
- "isExpression": false,
1985
- "asc": true,
1986
- "nulls": "last"
1987
- }
1988
- ],
1989
- "isUnique": false,
1990
- "concurrently": false,
1991
- "method": "btree",
1992
- "with": {}
1993
- }
1994
- },
1995
- "foreignKeys": {
1996
- "connector_jobs_connector_id_connectors_connector_id_fk": {
1997
- "name": "connector_jobs_connector_id_connectors_connector_id_fk",
1998
- "tableFrom": "connector_jobs",
1999
- "tableTo": "connectors",
2000
- "columnsFrom": ["connector_id"],
2001
- "columnsTo": ["connector_id"],
2002
- "onDelete": "cascade",
2003
- "onUpdate": "no action"
2004
- }
2005
- },
2006
- "compositePrimaryKeys": {},
2007
- "uniqueConstraints": {},
2008
- "policies": {},
2009
- "checkConstraints": {},
2010
- "isRLSEnabled": true
2011
- },
2012
- "public.connectors": {
2013
- "name": "connectors",
2014
- "schema": "",
2015
- "columns": {
2016
- "auth_token_hash": {
2017
- "name": "auth_token_hash",
2018
- "type": "text",
2019
- "primaryKey": false,
2020
- "notNull": true
2021
- },
2022
- "connector_id": {
2023
- "name": "connector_id",
2024
- "type": "text",
2025
- "primaryKey": true,
2026
- "notNull": true
2027
- },
2028
- "connector_name": {
2029
- "name": "connector_name",
2030
- "type": "text",
2031
- "primaryKey": false,
2032
- "notNull": true
2033
- },
2034
- "health_status": {
2035
- "name": "health_status",
2036
- "type": "text",
2037
- "primaryKey": false,
2038
- "notNull": false
2039
- },
2040
- "last_heartbeat_at": {
2041
- "name": "last_heartbeat_at",
2042
- "type": "timestamp with time zone",
2043
- "primaryKey": false,
2044
- "notNull": false
2045
- },
2046
- "last_seen_at": {
2047
- "name": "last_seen_at",
2048
- "type": "timestamp with time zone",
2049
- "primaryKey": false,
2050
- "notNull": false
2051
- },
2052
- "metadata": {
2053
- "name": "metadata",
2054
- "type": "jsonb",
2055
- "primaryKey": false,
2056
- "notNull": false
2057
- },
2058
- "organization_id": {
2059
- "name": "organization_id",
2060
- "type": "text",
2061
- "primaryKey": false,
2062
- "notNull": true
2063
- },
2064
- "registered_at": {
2065
- "name": "registered_at",
2066
- "type": "timestamp with time zone",
2067
- "primaryKey": false,
2068
- "notNull": true,
2069
- "default": "now()"
2070
- },
2071
- "updated_at": {
2072
- "name": "updated_at",
2073
- "type": "timestamp with time zone",
2074
- "primaryKey": false,
2075
- "notNull": true,
2076
- "default": "now()"
2077
- }
2078
- },
2079
- "indexes": {
2080
- "idx_connectors_organization": {
2081
- "name": "idx_connectors_organization",
2082
- "columns": [
2083
- {
2084
- "expression": "organization_id",
2085
- "isExpression": false,
2086
- "asc": true,
2087
- "nulls": "last"
2088
- }
2089
- ],
2090
- "isUnique": false,
2091
- "concurrently": false,
2092
- "method": "btree",
2093
- "with": {}
2094
- },
2095
- "idx_connectors_last_seen": {
2096
- "name": "idx_connectors_last_seen",
2097
- "columns": [
2098
- {
2099
- "expression": "last_seen_at",
2100
- "isExpression": false,
2101
- "asc": true,
2102
- "nulls": "last"
2103
- }
2104
- ],
2105
- "isUnique": false,
2106
- "concurrently": false,
2107
- "method": "btree",
2108
- "with": {}
2109
- },
2110
- "idx_connectors_auth_token_hash_unique": {
2111
- "name": "idx_connectors_auth_token_hash_unique",
2112
- "columns": [
2113
- {
2114
- "expression": "auth_token_hash",
2115
- "isExpression": false,
2116
- "asc": true,
2117
- "nulls": "last"
2118
- }
2119
- ],
2120
- "isUnique": true,
2121
- "concurrently": false,
2122
- "method": "btree",
2123
- "with": {}
2124
- }
2125
- },
2126
- "foreignKeys": {
2127
- "connectors_organization_id_organization_id_fk": {
2128
- "name": "connectors_organization_id_organization_id_fk",
2129
- "tableFrom": "connectors",
2130
- "tableTo": "organization",
2131
- "columnsFrom": ["organization_id"],
2132
- "columnsTo": ["id"],
2133
- "onDelete": "cascade",
2134
- "onUpdate": "no action"
2135
- }
2136
- },
2137
- "compositePrimaryKeys": {},
2138
- "uniqueConstraints": {},
2139
- "policies": {},
2140
- "checkConstraints": {},
2141
- "isRLSEnabled": true
2142
- },
2143
- "public.data_source_query_costs": {
2144
- "name": "data_source_query_costs",
2145
- "schema": "",
2146
- "columns": {
2147
- "actual_cost_usd": {
2148
- "name": "actual_cost_usd",
2149
- "type": "double precision",
2150
- "primaryKey": false,
2151
- "notNull": false
2152
- },
2153
- "actual_processed_bytes": {
2154
- "name": "actual_processed_bytes",
2155
- "type": "bigint",
2156
- "primaryKey": false,
2157
- "notNull": false
2158
- },
2159
- "billable_bytes": {
2160
- "name": "billable_bytes",
2161
- "type": "bigint",
2162
- "primaryKey": false,
2163
- "notNull": false
2164
- },
2165
- "cache_hit": {
2166
- "name": "cache_hit",
2167
- "type": "boolean",
2168
- "primaryKey": false,
2169
- "notNull": false
2170
- },
2171
- "connection_name": {
2172
- "name": "connection_name",
2173
- "type": "text",
2174
- "primaryKey": false,
2175
- "notNull": true
2176
- },
2177
- "connector_id": {
2178
- "name": "connector_id",
2179
- "type": "text",
2180
- "primaryKey": false,
2181
- "notNull": false
2182
- },
2183
- "created_at": {
2184
- "name": "created_at",
2185
- "type": "timestamp with time zone",
2186
- "primaryKey": false,
2187
- "notNull": true,
2188
- "default": "now()"
2189
- },
2190
- "currency": {
2191
- "name": "currency",
2192
- "type": "text",
2193
- "primaryKey": false,
2194
- "notNull": true,
2195
- "default": "'USD'"
2196
- },
2197
- "database": {
2198
- "name": "database",
2199
- "type": "text",
2200
- "primaryKey": false,
2201
- "notNull": false
2202
- },
2203
- "estimated_cost_usd": {
2204
- "name": "estimated_cost_usd",
2205
- "type": "double precision",
2206
- "primaryKey": false,
2207
- "notNull": false
2208
- },
2209
- "estimated_processed_bytes": {
2210
- "name": "estimated_processed_bytes",
2211
- "type": "bigint",
2212
- "primaryKey": false,
2213
- "notNull": false
2214
- },
2215
- "executed_at": {
2216
- "name": "executed_at",
2217
- "type": "timestamp with time zone",
2218
- "primaryKey": false,
2219
- "notNull": true
2220
- },
2221
- "execution_time_ms": {
2222
- "name": "execution_time_ms",
2223
- "type": "integer",
2224
- "primaryKey": false,
2225
- "notNull": false
2226
- },
2227
- "id": {
2228
- "name": "id",
2229
- "type": "text",
2230
- "primaryKey": true,
2231
- "notNull": true
2232
- },
2233
- "job_id": {
2234
- "name": "job_id",
2235
- "type": "text",
2236
- "primaryKey": false,
2237
- "notNull": false
2238
- },
2239
- "location": {
2240
- "name": "location",
2241
- "type": "text",
2242
- "primaryKey": false,
2243
- "notNull": false
2244
- },
2245
- "organization_id": {
2246
- "name": "organization_id",
2247
- "type": "text",
2248
- "primaryKey": false,
2249
- "notNull": true
2250
- },
2251
- "pricing_model": {
2252
- "name": "pricing_model",
2253
- "type": "text",
2254
- "primaryKey": false,
2255
- "notNull": true,
2256
- "default": "'unknown'"
2257
- },
2258
- "provider": {
2259
- "name": "provider",
2260
- "type": "text",
2261
- "primaryKey": false,
2262
- "notNull": true
2263
- },
2264
- "query_execution_id": {
2265
- "name": "query_execution_id",
2266
- "type": "text",
2267
- "primaryKey": false,
2268
- "notNull": false
2269
- },
2270
- "query_id": {
2271
- "name": "query_id",
2272
- "type": "text",
2273
- "primaryKey": false,
2274
- "notNull": true
2275
- },
2276
- "row_count": {
2277
- "name": "row_count",
2278
- "type": "integer",
2279
- "primaryKey": false,
2280
- "notNull": false
2281
- },
2282
- "tool_call_id": {
2283
- "name": "tool_call_id",
2284
- "type": "text",
2285
- "primaryKey": false,
2286
- "notNull": true
2287
- },
2288
- "workgroup": {
2289
- "name": "workgroup",
2290
- "type": "text",
2291
- "primaryKey": false,
2292
- "notNull": false
2293
- }
2294
- },
2295
- "indexes": {
2296
- "idx_data_source_query_costs_org": {
2297
- "name": "idx_data_source_query_costs_org",
2298
- "columns": [
2299
- {
2300
- "expression": "organization_id",
2301
- "isExpression": false,
2302
- "asc": true,
2303
- "nulls": "last"
2304
- }
2305
- ],
2306
- "isUnique": false,
2307
- "concurrently": false,
2308
- "method": "btree",
2309
- "with": {}
2310
- },
2311
- "idx_data_source_query_costs_provider": {
2312
- "name": "idx_data_source_query_costs_provider",
2313
- "columns": [
2314
- {
2315
- "expression": "provider",
2316
- "isExpression": false,
2317
- "asc": true,
2318
- "nulls": "last"
2319
- }
2320
- ],
2321
- "isUnique": false,
2322
- "concurrently": false,
2323
- "method": "btree",
2324
- "with": {}
2325
- },
2326
- "idx_data_source_query_costs_executed_at": {
2327
- "name": "idx_data_source_query_costs_executed_at",
2328
- "columns": [
2329
- {
2330
- "expression": "executed_at",
2331
- "isExpression": false,
2332
- "asc": true,
2333
- "nulls": "last"
2334
- }
2335
- ],
2336
- "isUnique": false,
2337
- "concurrently": false,
2338
- "method": "btree",
2339
- "with": {}
2340
- }
2341
- },
2342
- "foreignKeys": {
2343
- "data_source_query_costs_connector_id_connectors_connector_id_fk": {
2344
- "name": "data_source_query_costs_connector_id_connectors_connector_id_fk",
2345
- "tableFrom": "data_source_query_costs",
2346
- "tableTo": "connectors",
2347
- "columnsFrom": ["connector_id"],
2348
- "columnsTo": ["connector_id"],
2349
- "onDelete": "cascade",
2350
- "onUpdate": "no action"
2351
- },
2352
- "data_source_query_costs_organization_id_organization_id_fk": {
2353
- "name": "data_source_query_costs_organization_id_organization_id_fk",
2354
- "tableFrom": "data_source_query_costs",
2355
- "tableTo": "organization",
2356
- "columnsFrom": ["organization_id"],
2357
- "columnsTo": ["id"],
2358
- "onDelete": "cascade",
2359
- "onUpdate": "no action"
2360
- }
2361
- },
2362
- "compositePrimaryKeys": {},
2363
- "uniqueConstraints": {},
2364
- "policies": {},
2365
- "checkConstraints": {},
2366
- "isRLSEnabled": true
2367
- },
2368
- "public.data_sources": {
2369
- "name": "data_sources",
2370
- "schema": "",
2371
- "columns": {
2372
- "created_at": {
2373
- "name": "created_at",
2374
- "type": "timestamp with time zone",
2375
- "primaryKey": false,
2376
- "notNull": true,
2377
- "default": "now()"
2378
- },
2379
- "credentials_encrypted": {
2380
- "name": "credentials_encrypted",
2381
- "type": "text",
2382
- "primaryKey": false,
2383
- "notNull": true
2384
- },
2385
- "credentials_iv": {
2386
- "name": "credentials_iv",
2387
- "type": "text",
2388
- "primaryKey": false,
2389
- "notNull": true
2390
- },
2391
- "error_message": {
2392
- "name": "error_message",
2393
- "type": "text",
2394
- "primaryKey": false,
2395
- "notNull": false
2396
- },
2397
- "id": {
2398
- "name": "id",
2399
- "type": "text",
2400
- "primaryKey": true,
2401
- "notNull": true
2402
- },
2403
- "last_used_at": {
2404
- "name": "last_used_at",
2405
- "type": "timestamp with time zone",
2406
- "primaryKey": false,
2407
- "notNull": false
2408
- },
2409
- "name": {
2410
- "name": "name",
2411
- "type": "text",
2412
- "primaryKey": false,
2413
- "notNull": true
2414
- },
2415
- "organization_id": {
2416
- "name": "organization_id",
2417
- "type": "text",
2418
- "primaryKey": false,
2419
- "notNull": true
2420
- },
2421
- "provider": {
2422
- "name": "provider",
2423
- "type": "text",
2424
- "primaryKey": false,
2425
- "notNull": true
2426
- },
2427
- "provider_account_id": {
2428
- "name": "provider_account_id",
2429
- "type": "text",
2430
- "primaryKey": false,
2431
- "notNull": false
2432
- },
2433
- "scope": {
2434
- "name": "scope",
2435
- "type": "text",
2436
- "primaryKey": false,
2437
- "notNull": false
2438
- },
2439
- "status": {
2440
- "name": "status",
2441
- "type": "text",
2442
- "primaryKey": false,
2443
- "notNull": true,
2444
- "default": "'active'"
2445
- },
2446
- "updated_at": {
2447
- "name": "updated_at",
2448
- "type": "timestamp with time zone",
2449
- "primaryKey": false,
2450
- "notNull": true,
2451
- "default": "now()"
2452
- },
2453
- "use_as_data_source": {
2454
- "name": "use_as_data_source",
2455
- "type": "boolean",
2456
- "primaryKey": false,
2457
- "notNull": true,
2458
- "default": true
2459
- }
2460
- },
2461
- "indexes": {
2462
- "idx_data_sources_organization": {
2463
- "name": "idx_data_sources_organization",
2464
- "columns": [
2465
- {
2466
- "expression": "organization_id",
2467
- "isExpression": false,
2468
- "asc": true,
2469
- "nulls": "last"
2470
- }
2471
- ],
2472
- "isUnique": false,
2473
- "concurrently": false,
2474
- "method": "btree",
2475
- "with": {}
2476
- },
2477
- "idx_data_sources_provider": {
2478
- "name": "idx_data_sources_provider",
2479
- "columns": [
2480
- {
2481
- "expression": "provider",
2482
- "isExpression": false,
2483
- "asc": true,
2484
- "nulls": "last"
2485
- }
2486
- ],
2487
- "isUnique": false,
2488
- "concurrently": false,
2489
- "method": "btree",
2490
- "with": {}
2491
- },
2492
- "idx_data_sources_provider_account": {
2493
- "name": "idx_data_sources_provider_account",
2494
- "columns": [
2495
- {
2496
- "expression": "provider",
2497
- "isExpression": false,
2498
- "asc": true,
2499
- "nulls": "last"
2500
- },
2501
- {
2502
- "expression": "provider_account_id",
2503
- "isExpression": false,
2504
- "asc": true,
2505
- "nulls": "last"
2506
- }
2507
- ],
2508
- "isUnique": false,
2509
- "concurrently": false,
2510
- "method": "btree",
2511
- "with": {}
2512
- },
2513
- "idx_data_sources_status": {
2514
- "name": "idx_data_sources_status",
2515
- "columns": [
2516
- {
2517
- "expression": "status",
2518
- "isExpression": false,
2519
- "asc": true,
2520
- "nulls": "last"
2521
- }
2522
- ],
2523
- "isUnique": false,
2524
- "concurrently": false,
2525
- "method": "btree",
2526
- "with": {}
2527
- }
2528
- },
2529
- "foreignKeys": {
2530
- "data_sources_organization_id_organization_id_fk": {
2531
- "name": "data_sources_organization_id_organization_id_fk",
2532
- "tableFrom": "data_sources",
2533
- "tableTo": "organization",
2534
- "columnsFrom": ["organization_id"],
2535
- "columnsTo": ["id"],
2536
- "onDelete": "cascade",
2537
- "onUpdate": "no action"
2538
- }
2539
- },
2540
- "compositePrimaryKeys": {},
2541
- "uniqueConstraints": {
2542
- "data_sources_organization_name_unique": {
2543
- "name": "data_sources_organization_name_unique",
2544
- "nullsNotDistinct": false,
2545
- "columns": ["organization_id", "name"]
2546
- }
2547
- },
2548
- "policies": {},
2549
- "checkConstraints": {},
2550
- "isRLSEnabled": true
2551
- },
2552
- "public.data_source_table_usage": {
2553
- "name": "data_source_table_usage",
2554
- "schema": "",
2555
- "columns": {
2556
- "column_memos": {
2557
- "name": "column_memos",
2558
- "type": "jsonb",
2559
- "primaryKey": false,
2560
- "notNull": true,
2561
- "default": "'{}'::jsonb"
2562
- },
2563
- "created_at": {
2564
- "name": "created_at",
2565
- "type": "timestamp with time zone",
2566
- "primaryKey": false,
2567
- "notNull": true,
2568
- "default": "now()"
2569
- },
2570
- "data_source_id": {
2571
- "name": "data_source_id",
2572
- "type": "text",
2573
- "primaryKey": false,
2574
- "notNull": true
2575
- },
2576
- "formatted": {
2577
- "name": "formatted",
2578
- "type": "text",
2579
- "primaryKey": false,
2580
- "notNull": true
2581
- },
2582
- "generated_at": {
2583
- "name": "generated_at",
2584
- "type": "timestamp with time zone",
2585
- "primaryKey": false,
2586
- "notNull": true
2587
- },
2588
- "id": {
2589
- "name": "id",
2590
- "type": "text",
2591
- "primaryKey": true,
2592
- "notNull": true
2593
- },
2594
- "memo_updated_at": {
2595
- "name": "memo_updated_at",
2596
- "type": "timestamp with time zone",
2597
- "primaryKey": false,
2598
- "notNull": false
2599
- },
2600
- "memo_updated_by": {
2601
- "name": "memo_updated_by",
2602
- "type": "text",
2603
- "primaryKey": false,
2604
- "notNull": false
2605
- },
2606
- "organization_id": {
2607
- "name": "organization_id",
2608
- "type": "text",
2609
- "primaryKey": false,
2610
- "notNull": true
2611
- },
2612
- "provider": {
2613
- "name": "provider",
2614
- "type": "text",
2615
- "primaryKey": false,
2616
- "notNull": true
2617
- },
2618
- "schema_hash": {
2619
- "name": "schema_hash",
2620
- "type": "text",
2621
- "primaryKey": false,
2622
- "notNull": false
2623
- },
2624
- "table_lineage": {
2625
- "name": "table_lineage",
2626
- "type": "jsonb",
2627
- "primaryKey": false,
2628
- "notNull": true,
2629
- "default": "'{}'::jsonb"
2630
- },
2631
- "table_memos": {
2632
- "name": "table_memos",
2633
- "type": "jsonb",
2634
- "primaryKey": false,
2635
- "notNull": true,
2636
- "default": "'{}'::jsonb"
2637
- },
2638
- "tables": {
2639
- "name": "tables",
2640
- "type": "jsonb",
2641
- "primaryKey": false,
2642
- "notNull": true
2643
- },
2644
- "updated_at": {
2645
- "name": "updated_at",
2646
- "type": "timestamp with time zone",
2647
- "primaryKey": false,
2648
- "notNull": true,
2649
- "default": "now()"
2650
- }
2651
- },
2652
- "indexes": {
2653
- "idx_data_source_table_usage_source": {
2654
- "name": "idx_data_source_table_usage_source",
2655
- "columns": [
2656
- {
2657
- "expression": "data_source_id",
2658
- "isExpression": false,
2659
- "asc": true,
2660
- "nulls": "last"
2661
- }
2662
- ],
2663
- "isUnique": true,
2664
- "concurrently": false,
2665
- "method": "btree",
2666
- "with": {}
2667
- },
2668
- "idx_data_source_table_usage_org": {
2669
- "name": "idx_data_source_table_usage_org",
2670
- "columns": [
2671
- {
2672
- "expression": "organization_id",
2673
- "isExpression": false,
2674
- "asc": true,
2675
- "nulls": "last"
2676
- }
2677
- ],
2678
- "isUnique": false,
2679
- "concurrently": false,
2680
- "method": "btree",
2681
- "with": {}
2682
- },
2683
- "idx_data_source_table_usage_provider": {
2684
- "name": "idx_data_source_table_usage_provider",
2685
- "columns": [
2686
- {
2687
- "expression": "provider",
2688
- "isExpression": false,
2689
- "asc": true,
2690
- "nulls": "last"
2691
- }
2692
- ],
2693
- "isUnique": false,
2694
- "concurrently": false,
2695
- "method": "btree",
2696
- "with": {}
2697
- },
2698
- "idx_data_source_table_usage_generated_at": {
2699
- "name": "idx_data_source_table_usage_generated_at",
2700
- "columns": [
2701
- {
2702
- "expression": "generated_at",
2703
- "isExpression": false,
2704
- "asc": true,
2705
- "nulls": "last"
2706
- }
2707
- ],
2708
- "isUnique": false,
2709
- "concurrently": false,
2710
- "method": "btree",
2711
- "with": {}
2712
- }
2713
- },
2714
- "foreignKeys": {
2715
- "data_source_table_usage_data_source_id_data_sources_id_fk": {
2716
- "name": "data_source_table_usage_data_source_id_data_sources_id_fk",
2717
- "tableFrom": "data_source_table_usage",
2718
- "tableTo": "data_sources",
2719
- "columnsFrom": ["data_source_id"],
2720
- "columnsTo": ["id"],
2721
- "onDelete": "cascade",
2722
- "onUpdate": "no action"
2723
- },
2724
- "data_source_table_usage_memo_updated_by_user_id_fk": {
2725
- "name": "data_source_table_usage_memo_updated_by_user_id_fk",
2726
- "tableFrom": "data_source_table_usage",
2727
- "tableTo": "user",
2728
- "columnsFrom": ["memo_updated_by"],
2729
- "columnsTo": ["id"],
2730
- "onDelete": "set null",
2731
- "onUpdate": "no action"
2732
- },
2733
- "data_source_table_usage_organization_id_organization_id_fk": {
2734
- "name": "data_source_table_usage_organization_id_organization_id_fk",
2735
- "tableFrom": "data_source_table_usage",
2736
- "tableTo": "organization",
2737
- "columnsFrom": ["organization_id"],
2738
- "columnsTo": ["id"],
2739
- "onDelete": "cascade",
2740
- "onUpdate": "no action"
2741
- }
2742
- },
2743
- "compositePrimaryKeys": {},
2744
- "uniqueConstraints": {},
2745
- "policies": {},
2746
- "checkConstraints": {},
2747
- "isRLSEnabled": true
2748
- },
2749
- "public.organization_profiles": {
2750
- "name": "organization_profiles",
2751
- "schema": "",
2752
- "columns": {
2753
- "id": {
2754
- "name": "id",
2755
- "type": "text",
2756
- "primaryKey": true,
2757
- "notNull": true
2758
- },
2759
- "organization_id": {
2760
- "name": "organization_id",
2761
- "type": "text",
2762
- "primaryKey": false,
2763
- "notNull": true
2764
- },
2765
- "north_star_metric": {
2766
- "name": "north_star_metric",
2767
- "type": "text",
2768
- "primaryKey": false,
2769
- "notNull": false
2770
- },
2771
- "kpis": {
2772
- "name": "kpis",
2773
- "type": "jsonb",
2774
- "primaryKey": false,
2775
- "notNull": true,
2776
- "default": "'[]'::jsonb"
2777
- },
2778
- "website_url": {
2779
- "name": "website_url",
2780
- "type": "text",
2781
- "primaryKey": false,
2782
- "notNull": false
2783
- },
2784
- "monthly_budget_usd": {
2785
- "name": "monthly_budget_usd",
2786
- "type": "double precision",
2787
- "primaryKey": false,
2788
- "notNull": false
2789
- },
2790
- "created_at": {
2791
- "name": "created_at",
2792
- "type": "timestamp with time zone",
2793
- "primaryKey": false,
2794
- "notNull": true,
2795
- "default": "now()"
2796
- },
2797
- "updated_at": {
2798
- "name": "updated_at",
2799
- "type": "timestamp with time zone",
2800
- "primaryKey": false,
2801
- "notNull": true,
2802
- "default": "now()"
2803
- }
2804
- },
2805
- "indexes": {
2806
- "idx_org_profiles_org": {
2807
- "name": "idx_org_profiles_org",
2808
- "columns": [
2809
- {
2810
- "expression": "organization_id",
2811
- "isExpression": false,
2812
- "asc": true,
2813
- "nulls": "last"
2814
- }
2815
- ],
2816
- "isUnique": true,
2817
- "concurrently": false,
2818
- "method": "btree",
2819
- "with": {}
2820
- },
2821
- "idx_org_profiles_created": {
2822
- "name": "idx_org_profiles_created",
2823
- "columns": [
2824
- {
2825
- "expression": "created_at",
2826
- "isExpression": false,
2827
- "asc": true,
2828
- "nulls": "last"
2829
- }
2830
- ],
2831
- "isUnique": false,
2832
- "concurrently": false,
2833
- "method": "btree",
2834
- "with": {}
2835
- }
2836
- },
2837
- "foreignKeys": {
2838
- "organization_profiles_organization_id_organization_id_fk": {
2839
- "name": "organization_profiles_organization_id_organization_id_fk",
2840
- "tableFrom": "organization_profiles",
2841
- "tableTo": "organization",
2842
- "columnsFrom": ["organization_id"],
2843
- "columnsTo": ["id"],
2844
- "onDelete": "cascade",
2845
- "onUpdate": "no action"
2846
- }
2847
- },
2848
- "compositePrimaryKeys": {},
2849
- "uniqueConstraints": {},
2850
- "policies": {},
2851
- "checkConstraints": {},
2852
- "isRLSEnabled": true
2853
- },
2854
- "public.query_actions": {
2855
- "name": "query_actions",
2856
- "schema": "",
2857
- "columns": {
2858
- "completed_at": {
2859
- "name": "completed_at",
2860
- "type": "timestamp with time zone",
2861
- "primaryKey": false,
2862
- "notNull": false
2863
- },
2864
- "failure_code": {
2865
- "name": "failure_code",
2866
- "type": "text",
2867
- "primaryKey": false,
2868
- "notNull": false
2869
- },
2870
- "id": {
2871
- "name": "id",
2872
- "type": "text",
2873
- "primaryKey": true,
2874
- "notNull": true
2875
- },
2876
- "last_event_id": {
2877
- "name": "last_event_id",
2878
- "type": "text",
2879
- "primaryKey": false,
2880
- "notNull": true
2881
- },
2882
- "last_event_sequence": {
2883
- "name": "last_event_sequence",
2884
- "type": "integer",
2885
- "primaryKey": false,
2886
- "notNull": true
2887
- },
2888
- "organization_id": {
2889
- "name": "organization_id",
2890
- "type": "text",
2891
- "primaryKey": false,
2892
- "notNull": true
2893
- },
2894
- "outcome": {
2895
- "name": "outcome",
2896
- "type": "text",
2897
- "primaryKey": false,
2898
- "notNull": true
2899
- },
2900
- "phase": {
2901
- "name": "phase",
2902
- "type": "text",
2903
- "primaryKey": false,
2904
- "notNull": true
2905
- },
2906
- "query_mode": {
2907
- "name": "query_mode",
2908
- "type": "text",
2909
- "primaryKey": false,
2910
- "notNull": true
2911
- },
2912
- "query_text": {
2913
- "name": "query_text",
2914
- "type": "text",
2915
- "primaryKey": false,
2916
- "notNull": true
2917
- },
2918
- "source_descriptor_json": {
2919
- "name": "source_descriptor_json",
2920
- "type": "jsonb",
2921
- "primaryKey": false,
2922
- "notNull": false
2923
- },
2924
- "started_at": {
2925
- "name": "started_at",
2926
- "type": "timestamp with time zone",
2927
- "primaryKey": false,
2928
- "notNull": true
2929
- },
2930
- "usage_recording_status": {
2931
- "name": "usage_recording_status",
2932
- "type": "text",
2933
- "primaryKey": false,
2934
- "notNull": true
2935
- },
2936
- "validated_query": {
2937
- "name": "validated_query",
2938
- "type": "text",
2939
- "primaryKey": false,
2940
- "notNull": false
2941
- }
2942
- },
2943
- "indexes": {
2944
- "idx_query_actions_org_started": {
2945
- "name": "idx_query_actions_org_started",
2946
- "columns": [
2947
- {
2948
- "expression": "organization_id",
2949
- "isExpression": false,
2950
- "asc": true,
2951
- "nulls": "last"
2952
- },
2953
- {
2954
- "expression": "started_at",
2955
- "isExpression": false,
2956
- "asc": true,
2957
- "nulls": "last"
2958
- }
2959
- ],
2960
- "isUnique": false,
2961
- "concurrently": false,
2962
- "method": "btree",
2963
- "with": {}
2964
- }
2965
- },
2966
- "foreignKeys": {
2967
- "query_actions_organization_id_organization_id_fk": {
2968
- "name": "query_actions_organization_id_organization_id_fk",
2969
- "tableFrom": "query_actions",
2970
- "tableTo": "organization",
2971
- "columnsFrom": ["organization_id"],
2972
- "columnsTo": ["id"],
2973
- "onDelete": "cascade",
2974
- "onUpdate": "no action"
2975
- }
2976
- },
2977
- "compositePrimaryKeys": {},
2978
- "uniqueConstraints": {},
2979
- "policies": {},
2980
- "checkConstraints": {
2981
- "query_actions_completed_at_outcome_check": {
2982
- "name": "query_actions_completed_at_outcome_check",
2983
- "value": "((\"query_actions\".\"outcome\" = 'pending' and \"query_actions\".\"completed_at\" is null) or (\"query_actions\".\"outcome\" <> 'pending' and \"query_actions\".\"completed_at\" is not null))"
2984
- },
2985
- "query_actions_completed_phase_outcome_check": {
2986
- "name": "query_actions_completed_phase_outcome_check",
2987
- "value": "((\"query_actions\".\"outcome\" = 'pending' and \"query_actions\".\"phase\" <> 'completed') or (\"query_actions\".\"outcome\" <> 'pending' and \"query_actions\".\"phase\" = 'completed'))"
2988
- },
2989
- "query_actions_failure_code_outcome_check": {
2990
- "name": "query_actions_failure_code_outcome_check",
2991
- "value": "((\"query_actions\".\"outcome\" = 'failed' and \"query_actions\".\"failure_code\" is not null) or (\"query_actions\".\"outcome\" <> 'failed' and \"query_actions\".\"failure_code\" is null))"
2992
- },
2993
- "query_actions_last_event_sequence_positive_check": {
2994
- "name": "query_actions_last_event_sequence_positive_check",
2995
- "value": "\"query_actions\".\"last_event_sequence\" > 0"
2996
- }
2997
- },
2998
- "isRLSEnabled": true
2999
- },
3000
- "public.query_action_events": {
3001
- "name": "query_action_events",
3002
- "schema": "",
3003
- "columns": {
3004
- "action_id": {
3005
- "name": "action_id",
3006
- "type": "text",
3007
- "primaryKey": false,
3008
- "notNull": true
3009
- },
3010
- "command_id": {
3011
- "name": "command_id",
3012
- "type": "text",
3013
- "primaryKey": false,
3014
- "notNull": true
3015
- },
3016
- "commit_position": {
3017
- "name": "commit_position",
3018
- "type": "bigserial",
3019
- "primaryKey": false,
3020
- "notNull": true
3021
- },
3022
- "event_type": {
3023
- "name": "event_type",
3024
- "type": "text",
3025
- "primaryKey": false,
3026
- "notNull": true
3027
- },
3028
- "id": {
3029
- "name": "id",
3030
- "type": "text",
3031
- "primaryKey": true,
3032
- "notNull": true
3033
- },
3034
- "occurred_at": {
3035
- "name": "occurred_at",
3036
- "type": "timestamp with time zone",
3037
- "primaryKey": false,
3038
- "notNull": true
3039
- },
3040
- "payload_json": {
3041
- "name": "payload_json",
3042
- "type": "jsonb",
3043
- "primaryKey": false,
3044
- "notNull": true
3045
- },
3046
- "sequence": {
3047
- "name": "sequence",
3048
- "type": "integer",
3049
- "primaryKey": false,
3050
- "notNull": true
3051
- }
3052
- },
3053
- "indexes": {
3054
- "idx_query_action_events_action_sequence_unique": {
3055
- "name": "idx_query_action_events_action_sequence_unique",
3056
- "columns": [
3057
- {
3058
- "expression": "action_id",
3059
- "isExpression": false,
3060
- "asc": true,
3061
- "nulls": "last"
3062
- },
3063
- {
3064
- "expression": "sequence",
3065
- "isExpression": false,
3066
- "asc": true,
3067
- "nulls": "last"
3068
- }
3069
- ],
3070
- "isUnique": true,
3071
- "concurrently": false,
3072
- "method": "btree",
3073
- "with": {}
3074
- },
3075
- "idx_query_action_events_commit_position_unique": {
3076
- "name": "idx_query_action_events_commit_position_unique",
3077
- "columns": [
3078
- {
3079
- "expression": "commit_position",
3080
- "isExpression": false,
3081
- "asc": true,
3082
- "nulls": "last"
3083
- }
3084
- ],
3085
- "isUnique": true,
3086
- "concurrently": false,
3087
- "method": "btree",
3088
- "with": {}
3089
- },
3090
- "idx_query_action_events_command_sequence": {
3091
- "name": "idx_query_action_events_command_sequence",
3092
- "columns": [
3093
- {
3094
- "expression": "command_id",
3095
- "isExpression": false,
3096
- "asc": true,
3097
- "nulls": "last"
3098
- },
3099
- {
3100
- "expression": "sequence",
3101
- "isExpression": false,
3102
- "asc": true,
3103
- "nulls": "last"
3104
- }
3105
- ],
3106
- "isUnique": false,
3107
- "concurrently": false,
3108
- "method": "btree",
3109
- "with": {}
3110
- }
3111
- },
3112
- "foreignKeys": {
3113
- "query_action_events_action_id_query_actions_id_fk": {
3114
- "name": "query_action_events_action_id_query_actions_id_fk",
3115
- "tableFrom": "query_action_events",
3116
- "tableTo": "query_actions",
3117
- "columnsFrom": ["action_id"],
3118
- "columnsTo": ["id"],
3119
- "onDelete": "cascade",
3120
- "onUpdate": "no action"
3121
- },
3122
- "query_action_events_command_id_workflow_commands_id_fk": {
3123
- "name": "query_action_events_command_id_workflow_commands_id_fk",
3124
- "tableFrom": "query_action_events",
3125
- "tableTo": "workflow_commands",
3126
- "columnsFrom": ["command_id"],
3127
- "columnsTo": ["id"],
3128
- "onDelete": "cascade",
3129
- "onUpdate": "no action"
3130
- }
3131
- },
3132
- "compositePrimaryKeys": {},
3133
- "uniqueConstraints": {},
3134
- "policies": {},
3135
- "checkConstraints": {},
3136
- "isRLSEnabled": true
3137
- },
3138
- "public.user_profiles": {
3139
- "name": "user_profiles",
3140
- "schema": "",
3141
- "columns": {
3142
- "created_at": {
3143
- "name": "created_at",
3144
- "type": "timestamp with time zone",
3145
- "primaryKey": false,
3146
- "notNull": true,
3147
- "default": "now()"
3148
- },
3149
- "id": {
3150
- "name": "id",
3151
- "type": "text",
3152
- "primaryKey": true,
3153
- "notNull": true
3154
- },
3155
- "updated_at": {
3156
- "name": "updated_at",
3157
- "type": "timestamp with time zone",
3158
- "primaryKey": false,
3159
- "notNull": true,
3160
- "default": "now()"
3161
- },
3162
- "user_id": {
3163
- "name": "user_id",
3164
- "type": "text",
3165
- "primaryKey": false,
3166
- "notNull": true
3167
- }
3168
- },
3169
- "indexes": {
3170
- "idx_user_profiles_user": {
3171
- "name": "idx_user_profiles_user",
3172
- "columns": [
3173
- {
3174
- "expression": "user_id",
3175
- "isExpression": false,
3176
- "asc": true,
3177
- "nulls": "last"
3178
- }
3179
- ],
3180
- "isUnique": true,
3181
- "concurrently": false,
3182
- "method": "btree",
3183
- "with": {}
3184
- }
3185
- },
3186
- "foreignKeys": {
3187
- "user_profiles_user_id_user_id_fk": {
3188
- "name": "user_profiles_user_id_user_id_fk",
3189
- "tableFrom": "user_profiles",
3190
- "tableTo": "user",
3191
- "columnsFrom": ["user_id"],
3192
- "columnsTo": ["id"],
3193
- "onDelete": "cascade",
3194
- "onUpdate": "no action"
3195
- }
3196
- },
3197
- "compositePrimaryKeys": {},
3198
- "uniqueConstraints": {},
3199
- "policies": {},
3200
- "checkConstraints": {},
3201
- "isRLSEnabled": true
3202
- },
3203
- "public.source_api_actions": {
3204
- "name": "source_api_actions",
3205
- "schema": "",
3206
- "columns": {
3207
- "attempt_number": {
3208
- "name": "attempt_number",
3209
- "type": "integer",
3210
- "primaryKey": false,
3211
- "notNull": false
3212
- },
3213
- "completed_at": {
3214
- "name": "completed_at",
3215
- "type": "timestamp with time zone",
3216
- "primaryKey": false,
3217
- "notNull": false
3218
- },
3219
- "failure_code": {
3220
- "name": "failure_code",
3221
- "type": "text",
3222
- "primaryKey": false,
3223
- "notNull": false
3224
- },
3225
- "id": {
3226
- "name": "id",
3227
- "type": "text",
3228
- "primaryKey": true,
3229
- "notNull": true
3230
- },
3231
- "invoke_mode": {
3232
- "name": "invoke_mode",
3233
- "type": "text",
3234
- "primaryKey": false,
3235
- "notNull": false
3236
- },
3237
- "last_event_id": {
3238
- "name": "last_event_id",
3239
- "type": "text",
3240
- "primaryKey": false,
3241
- "notNull": true
3242
- },
3243
- "last_event_sequence": {
3244
- "name": "last_event_sequence",
3245
- "type": "integer",
3246
- "primaryKey": false,
3247
- "notNull": true
3248
- },
3249
- "organization_id": {
3250
- "name": "organization_id",
3251
- "type": "text",
3252
- "primaryKey": false,
3253
- "notNull": true
3254
- },
3255
- "outcome": {
3256
- "name": "outcome",
3257
- "type": "text",
3258
- "primaryKey": false,
3259
- "notNull": true
3260
- },
3261
- "page_progress_json": {
3262
- "name": "page_progress_json",
3263
- "type": "jsonb",
3264
- "primaryKey": false,
3265
- "notNull": false
3266
- },
3267
- "phase": {
3268
- "name": "phase",
3269
- "type": "text",
3270
- "primaryKey": false,
3271
- "notNull": true
3272
- },
3273
- "prepared_request_fingerprint": {
3274
- "name": "prepared_request_fingerprint",
3275
- "type": "text",
3276
- "primaryKey": false,
3277
- "notNull": false
3278
- },
3279
- "request_descriptor_json": {
3280
- "name": "request_descriptor_json",
3281
- "type": "jsonb",
3282
- "primaryKey": false,
3283
- "notNull": false
3284
- },
3285
- "request_kind": {
3286
- "name": "request_kind",
3287
- "type": "text",
3288
- "primaryKey": false,
3289
- "notNull": true
3290
- },
3291
- "source_descriptor_json": {
3292
- "name": "source_descriptor_json",
3293
- "type": "jsonb",
3294
- "primaryKey": false,
3295
- "notNull": false
3296
- },
3297
- "started_at": {
3298
- "name": "started_at",
3299
- "type": "timestamp with time zone",
3300
- "primaryKey": false,
3301
- "notNull": true
3302
- }
3303
- },
3304
- "indexes": {
3305
- "idx_source_api_actions_org_started": {
3306
- "name": "idx_source_api_actions_org_started",
3307
- "columns": [
3308
- {
3309
- "expression": "organization_id",
3310
- "isExpression": false,
3311
- "asc": true,
3312
- "nulls": "last"
3313
- },
3314
- {
3315
- "expression": "started_at",
3316
- "isExpression": false,
3317
- "asc": true,
3318
- "nulls": "last"
3319
- }
3320
- ],
3321
- "isUnique": false,
3322
- "concurrently": false,
3323
- "method": "btree",
3324
- "with": {}
3325
- }
3326
- },
3327
- "foreignKeys": {
3328
- "source_api_actions_organization_id_organization_id_fk": {
3329
- "name": "source_api_actions_organization_id_organization_id_fk",
3330
- "tableFrom": "source_api_actions",
3331
- "tableTo": "organization",
3332
- "columnsFrom": ["organization_id"],
3333
- "columnsTo": ["id"],
3334
- "onDelete": "cascade",
3335
- "onUpdate": "no action"
3336
- }
3337
- },
3338
- "compositePrimaryKeys": {},
3339
- "uniqueConstraints": {},
3340
- "policies": {},
3341
- "checkConstraints": {
3342
- "source_api_actions_completed_at_outcome_check": {
3343
- "name": "source_api_actions_completed_at_outcome_check",
3344
- "value": "((\"source_api_actions\".\"outcome\" = 'pending' and \"source_api_actions\".\"completed_at\" is null) or (\"source_api_actions\".\"outcome\" <> 'pending' and \"source_api_actions\".\"completed_at\" is not null))"
3345
- },
3346
- "source_api_actions_completed_phase_outcome_check": {
3347
- "name": "source_api_actions_completed_phase_outcome_check",
3348
- "value": "((\"source_api_actions\".\"outcome\" = 'pending' and \"source_api_actions\".\"phase\" <> 'completed') or (\"source_api_actions\".\"outcome\" <> 'pending' and \"source_api_actions\".\"phase\" = 'completed'))"
3349
- },
3350
- "source_api_actions_failure_code_outcome_check": {
3351
- "name": "source_api_actions_failure_code_outcome_check",
3352
- "value": "((\"source_api_actions\".\"outcome\" = 'failed' and \"source_api_actions\".\"failure_code\" is not null) or (\"source_api_actions\".\"outcome\" <> 'failed' and \"source_api_actions\".\"failure_code\" is null))"
3353
- },
3354
- "source_api_actions_last_event_sequence_positive_check": {
3355
- "name": "source_api_actions_last_event_sequence_positive_check",
3356
- "value": "\"source_api_actions\".\"last_event_sequence\" > 0"
3357
- }
3358
- },
3359
- "isRLSEnabled": true
3360
- },
3361
- "public.source_api_action_events": {
3362
- "name": "source_api_action_events",
3363
- "schema": "",
3364
- "columns": {
3365
- "action_id": {
3366
- "name": "action_id",
3367
- "type": "text",
3368
- "primaryKey": false,
3369
- "notNull": true
3370
- },
3371
- "command_id": {
3372
- "name": "command_id",
3373
- "type": "text",
3374
- "primaryKey": false,
3375
- "notNull": true
3376
- },
3377
- "commit_position": {
3378
- "name": "commit_position",
3379
- "type": "bigserial",
3380
- "primaryKey": false,
3381
- "notNull": true
3382
- },
3383
- "event_type": {
3384
- "name": "event_type",
3385
- "type": "text",
3386
- "primaryKey": false,
3387
- "notNull": true
3388
- },
3389
- "id": {
3390
- "name": "id",
3391
- "type": "text",
3392
- "primaryKey": true,
3393
- "notNull": true
3394
- },
3395
- "occurred_at": {
3396
- "name": "occurred_at",
3397
- "type": "timestamp with time zone",
3398
- "primaryKey": false,
3399
- "notNull": true
3400
- },
3401
- "payload_json": {
3402
- "name": "payload_json",
3403
- "type": "jsonb",
3404
- "primaryKey": false,
3405
- "notNull": true
3406
- },
3407
- "sequence": {
3408
- "name": "sequence",
3409
- "type": "integer",
3410
- "primaryKey": false,
3411
- "notNull": true
3412
- }
3413
- },
3414
- "indexes": {
3415
- "idx_source_api_action_events_action_sequence_unique": {
3416
- "name": "idx_source_api_action_events_action_sequence_unique",
3417
- "columns": [
3418
- {
3419
- "expression": "action_id",
3420
- "isExpression": false,
3421
- "asc": true,
3422
- "nulls": "last"
3423
- },
3424
- {
3425
- "expression": "sequence",
3426
- "isExpression": false,
3427
- "asc": true,
3428
- "nulls": "last"
3429
- }
3430
- ],
3431
- "isUnique": true,
3432
- "concurrently": false,
3433
- "method": "btree",
3434
- "with": {}
3435
- },
3436
- "idx_source_api_action_events_commit_position_unique": {
3437
- "name": "idx_source_api_action_events_commit_position_unique",
3438
- "columns": [
3439
- {
3440
- "expression": "commit_position",
3441
- "isExpression": false,
3442
- "asc": true,
3443
- "nulls": "last"
3444
- }
3445
- ],
3446
- "isUnique": true,
3447
- "concurrently": false,
3448
- "method": "btree",
3449
- "with": {}
3450
- },
3451
- "idx_source_api_action_events_command_sequence": {
3452
- "name": "idx_source_api_action_events_command_sequence",
3453
- "columns": [
3454
- {
3455
- "expression": "command_id",
3456
- "isExpression": false,
3457
- "asc": true,
3458
- "nulls": "last"
3459
- },
3460
- {
3461
- "expression": "sequence",
3462
- "isExpression": false,
3463
- "asc": true,
3464
- "nulls": "last"
3465
- }
3466
- ],
3467
- "isUnique": false,
3468
- "concurrently": false,
3469
- "method": "btree",
3470
- "with": {}
3471
- }
3472
- },
3473
- "foreignKeys": {
3474
- "source_api_action_events_action_id_source_api_actions_id_fk": {
3475
- "name": "source_api_action_events_action_id_source_api_actions_id_fk",
3476
- "tableFrom": "source_api_action_events",
3477
- "tableTo": "source_api_actions",
3478
- "columnsFrom": ["action_id"],
3479
- "columnsTo": ["id"],
3480
- "onDelete": "cascade",
3481
- "onUpdate": "no action"
3482
- },
3483
- "source_api_action_events_command_id_workflow_commands_id_fk": {
3484
- "name": "source_api_action_events_command_id_workflow_commands_id_fk",
3485
- "tableFrom": "source_api_action_events",
3486
- "tableTo": "workflow_commands",
3487
- "columnsFrom": ["command_id"],
3488
- "columnsTo": ["id"],
3489
- "onDelete": "cascade",
3490
- "onUpdate": "no action"
3491
- }
3492
- },
3493
- "compositePrimaryKeys": {},
3494
- "uniqueConstraints": {},
3495
- "policies": {},
3496
- "checkConstraints": {},
3497
- "isRLSEnabled": true
3498
- },
3499
- "public.workflow_commands": {
3500
- "name": "workflow_commands",
3501
- "schema": "",
3502
- "columns": {
3503
- "action_id": {
3504
- "name": "action_id",
3505
- "type": "text",
3506
- "primaryKey": false,
3507
- "notNull": false
3508
- },
3509
- "actor_snapshot_json": {
3510
- "name": "actor_snapshot_json",
3511
- "type": "jsonb",
3512
- "primaryKey": false,
3513
- "notNull": true
3514
- },
3515
- "caused_by_event_id": {
3516
- "name": "caused_by_event_id",
3517
- "type": "text",
3518
- "primaryKey": false,
3519
- "notNull": false
3520
- },
3521
- "command_invocation_id": {
3522
- "name": "command_invocation_id",
3523
- "type": "text",
3524
- "primaryKey": false,
3525
- "notNull": true
3526
- },
3527
- "command_payload_json": {
3528
- "name": "command_payload_json",
3529
- "type": "jsonb",
3530
- "primaryKey": false,
3531
- "notNull": true
3532
- },
3533
- "command_type": {
3534
- "name": "command_type",
3535
- "type": "text",
3536
- "primaryKey": false,
3537
- "notNull": true
3538
- },
3539
- "created_at": {
3540
- "name": "created_at",
3541
- "type": "timestamp with time zone",
3542
- "primaryKey": false,
3543
- "notNull": true
3544
- },
3545
- "decision_kind": {
3546
- "name": "decision_kind",
3547
- "type": "text",
3548
- "primaryKey": false,
3549
- "notNull": true
3550
- },
3551
- "family": {
3552
- "name": "family",
3553
- "type": "text",
3554
- "primaryKey": false,
3555
- "notNull": true
3556
- },
3557
- "id": {
3558
- "name": "id",
3559
- "type": "text",
3560
- "primaryKey": true,
3561
- "notNull": true
3562
- },
3563
- "organization_id": {
3564
- "name": "organization_id",
3565
- "type": "text",
3566
- "primaryKey": false,
3567
- "notNull": true
3568
- },
3569
- "reject_code": {
3570
- "name": "reject_code",
3571
- "type": "text",
3572
- "primaryKey": false,
3573
- "notNull": false
3574
- },
3575
- "reject_detail": {
3576
- "name": "reject_detail",
3577
- "type": "text",
3578
- "primaryKey": false,
3579
- "notNull": false
3580
- },
3581
- "request_id": {
3582
- "name": "request_id",
3583
- "type": "text",
3584
- "primaryKey": false,
3585
- "notNull": true
3586
- },
3587
- "surface": {
3588
- "name": "surface",
3589
- "type": "text",
3590
- "primaryKey": false,
3591
- "notNull": true
3592
- }
3593
- },
3594
- "indexes": {
3595
- "idx_workflow_commands_family_invocation_unique": {
3596
- "name": "idx_workflow_commands_family_invocation_unique",
3597
- "columns": [
3598
- {
3599
- "expression": "family",
3600
- "isExpression": false,
3601
- "asc": true,
3602
- "nulls": "last"
3603
- },
3604
- {
3605
- "expression": "command_invocation_id",
3606
- "isExpression": false,
3607
- "asc": true,
3608
- "nulls": "last"
3609
- }
3610
- ],
3611
- "isUnique": true,
3612
- "concurrently": false,
3613
- "method": "btree",
3614
- "with": {}
3615
- },
3616
- "idx_workflow_commands_action_created": {
3617
- "name": "idx_workflow_commands_action_created",
3618
- "columns": [
3619
- {
3620
- "expression": "family",
3621
- "isExpression": false,
3622
- "asc": true,
3623
- "nulls": "last"
3624
- },
3625
- {
3626
- "expression": "action_id",
3627
- "isExpression": false,
3628
- "asc": true,
3629
- "nulls": "last"
3630
- },
3631
- {
3632
- "expression": "created_at",
3633
- "isExpression": false,
3634
- "asc": true,
3635
- "nulls": "last"
3636
- }
3637
- ],
3638
- "isUnique": false,
3639
- "concurrently": false,
3640
- "method": "btree",
3641
- "with": {}
3642
- },
3643
- "idx_workflow_commands_org_created": {
3644
- "name": "idx_workflow_commands_org_created",
3645
- "columns": [
3646
- {
3647
- "expression": "organization_id",
3648
- "isExpression": false,
3649
- "asc": true,
3650
- "nulls": "last"
3651
- },
3652
- {
3653
- "expression": "created_at",
3654
- "isExpression": false,
3655
- "asc": true,
3656
- "nulls": "last"
3657
- }
3658
- ],
3659
- "isUnique": false,
3660
- "concurrently": false,
3661
- "method": "btree",
3662
- "with": {}
3663
- }
3664
- },
3665
- "foreignKeys": {
3666
- "workflow_commands_organization_id_organization_id_fk": {
3667
- "name": "workflow_commands_organization_id_organization_id_fk",
3668
- "tableFrom": "workflow_commands",
3669
- "tableTo": "organization",
3670
- "columnsFrom": ["organization_id"],
3671
- "columnsTo": ["id"],
3672
- "onDelete": "cascade",
3673
- "onUpdate": "no action"
3674
- }
3675
- },
3676
- "compositePrimaryKeys": {},
3677
- "uniqueConstraints": {},
3678
- "policies": {},
3679
- "checkConstraints": {
3680
- "workflow_commands_decision_reject_alignment_check": {
3681
- "name": "workflow_commands_decision_reject_alignment_check",
3682
- "value": "((\"workflow_commands\".\"decision_kind\" = 'rejected' and \"workflow_commands\".\"reject_code\" is not null) or (\"workflow_commands\".\"decision_kind\" = 'accepted' and \"workflow_commands\".\"reject_code\" is null))"
3683
- },
3684
- "workflow_commands_accepted_action_id_check": {
3685
- "name": "workflow_commands_accepted_action_id_check",
3686
- "value": "(\"workflow_commands\".\"decision_kind\" = 'rejected' or \"workflow_commands\".\"action_id\" is not null)"
3687
- }
3688
- },
3689
- "isRLSEnabled": true
3690
- },
3691
- "public.workflow_effect_dispatches": {
3692
- "name": "workflow_effect_dispatches",
3693
- "schema": "",
3694
- "columns": {
3695
- "action_id": {
3696
- "name": "action_id",
3697
- "type": "text",
3698
- "primaryKey": false,
3699
- "notNull": true
3700
- },
3701
- "attempt_count": {
3702
- "name": "attempt_count",
3703
- "type": "integer",
3704
- "primaryKey": false,
3705
- "notNull": true,
3706
- "default": 0
3707
- },
3708
- "available_at": {
3709
- "name": "available_at",
3710
- "type": "timestamp with time zone",
3711
- "primaryKey": false,
3712
- "notNull": true,
3713
- "default": "now()"
3714
- },
3715
- "completed_at": {
3716
- "name": "completed_at",
3717
- "type": "timestamp with time zone",
3718
- "primaryKey": false,
3719
- "notNull": false
3720
- },
3721
- "created_at": {
3722
- "name": "created_at",
3723
- "type": "timestamp with time zone",
3724
- "primaryKey": false,
3725
- "notNull": true,
3726
- "default": "now()"
3727
- },
3728
- "effect_key": {
3729
- "name": "effect_key",
3730
- "type": "text",
3731
- "primaryKey": false,
3732
- "notNull": true
3733
- },
3734
- "effect_type": {
3735
- "name": "effect_type",
3736
- "type": "text",
3737
- "primaryKey": false,
3738
- "notNull": true
3739
- },
3740
- "family": {
3741
- "name": "family",
3742
- "type": "text",
3743
- "primaryKey": false,
3744
- "notNull": true
3745
- },
3746
- "id": {
3747
- "name": "id",
3748
- "type": "text",
3749
- "primaryKey": true,
3750
- "notNull": true
3751
- },
3752
- "last_error_code": {
3753
- "name": "last_error_code",
3754
- "type": "text",
3755
- "primaryKey": false,
3756
- "notNull": false
3757
- },
3758
- "last_error_detail": {
3759
- "name": "last_error_detail",
3760
- "type": "text",
3761
- "primaryKey": false,
3762
- "notNull": false
3763
- },
3764
- "leased_until": {
3765
- "name": "leased_until",
3766
- "type": "timestamp with time zone",
3767
- "primaryKey": false,
3768
- "notNull": false
3769
- },
3770
- "origin_event_id": {
3771
- "name": "origin_event_id",
3772
- "type": "text",
3773
- "primaryKey": false,
3774
- "notNull": true
3775
- },
3776
- "payload_json": {
3777
- "name": "payload_json",
3778
- "type": "jsonb",
3779
- "primaryKey": false,
3780
- "notNull": true
3781
- },
3782
- "status": {
3783
- "name": "status",
3784
- "type": "text",
3785
- "primaryKey": false,
3786
- "notNull": true,
3787
- "default": "'pending'"
3788
- }
3789
- },
3790
- "indexes": {
3791
- "idx_workflow_effect_dispatches_effect_key_unique": {
3792
- "name": "idx_workflow_effect_dispatches_effect_key_unique",
3793
- "columns": [
3794
- {
3795
- "expression": "effect_key",
3796
- "isExpression": false,
3797
- "asc": true,
3798
- "nulls": "last"
3799
- }
3800
- ],
3801
- "isUnique": true,
3802
- "concurrently": false,
3803
- "method": "btree",
3804
- "with": {}
3805
- },
3806
- "idx_workflow_effect_dispatches_status_available": {
3807
- "name": "idx_workflow_effect_dispatches_status_available",
3808
- "columns": [
3809
- {
3810
- "expression": "status",
3811
- "isExpression": false,
3812
- "asc": true,
3813
- "nulls": "last"
3814
- },
3815
- {
3816
- "expression": "available_at",
3817
- "isExpression": false,
3818
- "asc": true,
3819
- "nulls": "last"
3820
- }
3821
- ],
3822
- "isUnique": false,
3823
- "concurrently": false,
3824
- "method": "btree",
3825
- "with": {}
3826
- },
3827
- "idx_workflow_effect_dispatches_family_action_created": {
3828
- "name": "idx_workflow_effect_dispatches_family_action_created",
3829
- "columns": [
3830
- {
3831
- "expression": "family",
3832
- "isExpression": false,
3833
- "asc": true,
3834
- "nulls": "last"
3835
- },
3836
- {
3837
- "expression": "action_id",
3838
- "isExpression": false,
3839
- "asc": true,
3840
- "nulls": "last"
3841
- },
3842
- {
3843
- "expression": "created_at",
3844
- "isExpression": false,
3845
- "asc": true,
3846
- "nulls": "last"
3847
- }
3848
- ],
3849
- "isUnique": false,
3850
- "concurrently": false,
3851
- "method": "btree",
3852
- "with": {}
3853
- }
3854
- },
3855
- "foreignKeys": {},
3856
- "compositePrimaryKeys": {},
3857
- "uniqueConstraints": {},
3858
- "policies": {},
3859
- "checkConstraints": {
3860
- "workflow_effect_dispatches_completion_status_check": {
3861
- "name": "workflow_effect_dispatches_completion_status_check",
3862
- "value": "((\"workflow_effect_dispatches\".\"status\" = 'completed' and \"workflow_effect_dispatches\".\"completed_at\" is not null) or (\"workflow_effect_dispatches\".\"status\" <> 'completed' and \"workflow_effect_dispatches\".\"completed_at\" is null))"
3863
- }
3864
- },
3865
- "isRLSEnabled": true
3866
- }
3867
- },
3868
- "enums": {},
3869
- "schemas": {},
3870
- "sequences": {},
3871
- "roles": {},
3872
- "policies": {},
3873
- "views": {},
3874
- "_meta": {
3875
- "columns": {},
3876
- "schemas": {},
3877
- "tables": {}
3878
- }
3879
- }