@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,2870 +0,0 @@
1
- {
2
- "id": "b6246d17-72f4-48ed-b2d3-d5bca3ca432a",
3
- "prevId": "844bfd84-7118-453f-927f-4c421a92dd05",
4
- "version": "7",
5
- "dialect": "postgresql",
6
- "tables": {
7
- "public.account": {
8
- "name": "account",
9
- "schema": "",
10
- "columns": {
11
- "access_token": {
12
- "name": "access_token",
13
- "type": "text",
14
- "primaryKey": false,
15
- "notNull": false
16
- },
17
- "access_token_expires_at": {
18
- "name": "access_token_expires_at",
19
- "type": "timestamp",
20
- "primaryKey": false,
21
- "notNull": false
22
- },
23
- "account_id": {
24
- "name": "account_id",
25
- "type": "text",
26
- "primaryKey": false,
27
- "notNull": true
28
- },
29
- "created_at": {
30
- "name": "created_at",
31
- "type": "timestamp",
32
- "primaryKey": false,
33
- "notNull": true,
34
- "default": "now()"
35
- },
36
- "id": {
37
- "name": "id",
38
- "type": "text",
39
- "primaryKey": true,
40
- "notNull": true
41
- },
42
- "id_token": {
43
- "name": "id_token",
44
- "type": "text",
45
- "primaryKey": false,
46
- "notNull": false
47
- },
48
- "password": {
49
- "name": "password",
50
- "type": "text",
51
- "primaryKey": false,
52
- "notNull": false
53
- },
54
- "provider_id": {
55
- "name": "provider_id",
56
- "type": "text",
57
- "primaryKey": false,
58
- "notNull": true
59
- },
60
- "refresh_token": {
61
- "name": "refresh_token",
62
- "type": "text",
63
- "primaryKey": false,
64
- "notNull": false
65
- },
66
- "refresh_token_expires_at": {
67
- "name": "refresh_token_expires_at",
68
- "type": "timestamp",
69
- "primaryKey": false,
70
- "notNull": false
71
- },
72
- "scope": {
73
- "name": "scope",
74
- "type": "text",
75
- "primaryKey": false,
76
- "notNull": false
77
- },
78
- "updated_at": {
79
- "name": "updated_at",
80
- "type": "timestamp",
81
- "primaryKey": false,
82
- "notNull": true,
83
- "default": "now()"
84
- },
85
- "user_id": {
86
- "name": "user_id",
87
- "type": "text",
88
- "primaryKey": false,
89
- "notNull": true
90
- }
91
- },
92
- "indexes": {
93
- "account_userId_idx": {
94
- "name": "account_userId_idx",
95
- "columns": [
96
- {
97
- "expression": "user_id",
98
- "isExpression": false,
99
- "asc": true,
100
- "nulls": "last"
101
- }
102
- ],
103
- "isUnique": false,
104
- "concurrently": false,
105
- "method": "btree",
106
- "with": {}
107
- }
108
- },
109
- "foreignKeys": {
110
- "account_user_id_user_id_fk": {
111
- "name": "account_user_id_user_id_fk",
112
- "tableFrom": "account",
113
- "tableTo": "user",
114
- "columnsFrom": ["user_id"],
115
- "columnsTo": ["id"],
116
- "onDelete": "cascade",
117
- "onUpdate": "no action"
118
- }
119
- },
120
- "compositePrimaryKeys": {},
121
- "uniqueConstraints": {},
122
- "policies": {},
123
- "checkConstraints": {},
124
- "isRLSEnabled": true
125
- },
126
- "public.device_code": {
127
- "name": "device_code",
128
- "schema": "",
129
- "columns": {
130
- "client_id": {
131
- "name": "client_id",
132
- "type": "text",
133
- "primaryKey": false,
134
- "notNull": false
135
- },
136
- "device_code": {
137
- "name": "device_code",
138
- "type": "text",
139
- "primaryKey": false,
140
- "notNull": true
141
- },
142
- "expires_at": {
143
- "name": "expires_at",
144
- "type": "timestamp",
145
- "primaryKey": false,
146
- "notNull": true
147
- },
148
- "id": {
149
- "name": "id",
150
- "type": "text",
151
- "primaryKey": true,
152
- "notNull": true
153
- },
154
- "last_polled_at": {
155
- "name": "last_polled_at",
156
- "type": "timestamp",
157
- "primaryKey": false,
158
- "notNull": false
159
- },
160
- "polling_interval": {
161
- "name": "polling_interval",
162
- "type": "integer",
163
- "primaryKey": false,
164
- "notNull": false
165
- },
166
- "scope": {
167
- "name": "scope",
168
- "type": "text",
169
- "primaryKey": false,
170
- "notNull": false
171
- },
172
- "status": {
173
- "name": "status",
174
- "type": "text",
175
- "primaryKey": false,
176
- "notNull": true
177
- },
178
- "user_code": {
179
- "name": "user_code",
180
- "type": "text",
181
- "primaryKey": false,
182
- "notNull": true
183
- },
184
- "user_id": {
185
- "name": "user_id",
186
- "type": "text",
187
- "primaryKey": false,
188
- "notNull": false
189
- }
190
- },
191
- "indexes": {
192
- "device_code_device_code_key": {
193
- "name": "device_code_device_code_key",
194
- "columns": [
195
- {
196
- "expression": "device_code",
197
- "isExpression": false,
198
- "asc": true,
199
- "nulls": "last"
200
- }
201
- ],
202
- "isUnique": true,
203
- "concurrently": false,
204
- "method": "btree",
205
- "with": {}
206
- },
207
- "device_code_user_code_key": {
208
- "name": "device_code_user_code_key",
209
- "columns": [
210
- {
211
- "expression": "user_code",
212
- "isExpression": false,
213
- "asc": true,
214
- "nulls": "last"
215
- }
216
- ],
217
- "isUnique": true,
218
- "concurrently": false,
219
- "method": "btree",
220
- "with": {}
221
- },
222
- "device_code_user_id_idx": {
223
- "name": "device_code_user_id_idx",
224
- "columns": [
225
- {
226
- "expression": "user_id",
227
- "isExpression": false,
228
- "asc": true,
229
- "nulls": "last"
230
- }
231
- ],
232
- "isUnique": false,
233
- "concurrently": false,
234
- "method": "btree",
235
- "with": {}
236
- },
237
- "device_code_expires_at_idx": {
238
- "name": "device_code_expires_at_idx",
239
- "columns": [
240
- {
241
- "expression": "expires_at",
242
- "isExpression": false,
243
- "asc": true,
244
- "nulls": "last"
245
- }
246
- ],
247
- "isUnique": false,
248
- "concurrently": false,
249
- "method": "btree",
250
- "with": {}
251
- }
252
- },
253
- "foreignKeys": {
254
- "device_code_user_id_user_id_fk": {
255
- "name": "device_code_user_id_user_id_fk",
256
- "tableFrom": "device_code",
257
- "tableTo": "user",
258
- "columnsFrom": ["user_id"],
259
- "columnsTo": ["id"],
260
- "onDelete": "cascade",
261
- "onUpdate": "no action"
262
- }
263
- },
264
- "compositePrimaryKeys": {},
265
- "uniqueConstraints": {},
266
- "policies": {},
267
- "checkConstraints": {},
268
- "isRLSEnabled": true
269
- },
270
- "public.invitation": {
271
- "name": "invitation",
272
- "schema": "",
273
- "columns": {
274
- "created_at": {
275
- "name": "created_at",
276
- "type": "timestamp",
277
- "primaryKey": false,
278
- "notNull": true,
279
- "default": "now()"
280
- },
281
- "email": {
282
- "name": "email",
283
- "type": "text",
284
- "primaryKey": false,
285
- "notNull": true
286
- },
287
- "expires_at": {
288
- "name": "expires_at",
289
- "type": "timestamp",
290
- "primaryKey": false,
291
- "notNull": true
292
- },
293
- "id": {
294
- "name": "id",
295
- "type": "text",
296
- "primaryKey": true,
297
- "notNull": true
298
- },
299
- "inviter_id": {
300
- "name": "inviter_id",
301
- "type": "text",
302
- "primaryKey": false,
303
- "notNull": true
304
- },
305
- "organization_id": {
306
- "name": "organization_id",
307
- "type": "text",
308
- "primaryKey": false,
309
- "notNull": true
310
- },
311
- "role": {
312
- "name": "role",
313
- "type": "text",
314
- "primaryKey": false,
315
- "notNull": false
316
- },
317
- "status": {
318
- "name": "status",
319
- "type": "text",
320
- "primaryKey": false,
321
- "notNull": true
322
- }
323
- },
324
- "indexes": {
325
- "invitation_organizationId_idx": {
326
- "name": "invitation_organizationId_idx",
327
- "columns": [
328
- {
329
- "expression": "organization_id",
330
- "isExpression": false,
331
- "asc": true,
332
- "nulls": "last"
333
- }
334
- ],
335
- "isUnique": false,
336
- "concurrently": false,
337
- "method": "btree",
338
- "with": {}
339
- },
340
- "invitation_email_idx": {
341
- "name": "invitation_email_idx",
342
- "columns": [
343
- {
344
- "expression": "email",
345
- "isExpression": false,
346
- "asc": true,
347
- "nulls": "last"
348
- }
349
- ],
350
- "isUnique": false,
351
- "concurrently": false,
352
- "method": "btree",
353
- "with": {}
354
- }
355
- },
356
- "foreignKeys": {
357
- "invitation_inviter_id_user_id_fk": {
358
- "name": "invitation_inviter_id_user_id_fk",
359
- "tableFrom": "invitation",
360
- "tableTo": "user",
361
- "columnsFrom": ["inviter_id"],
362
- "columnsTo": ["id"],
363
- "onDelete": "cascade",
364
- "onUpdate": "no action"
365
- },
366
- "invitation_organization_id_organization_id_fk": {
367
- "name": "invitation_organization_id_organization_id_fk",
368
- "tableFrom": "invitation",
369
- "tableTo": "organization",
370
- "columnsFrom": ["organization_id"],
371
- "columnsTo": ["id"],
372
- "onDelete": "cascade",
373
- "onUpdate": "no action"
374
- }
375
- },
376
- "compositePrimaryKeys": {},
377
- "uniqueConstraints": {},
378
- "policies": {},
379
- "checkConstraints": {},
380
- "isRLSEnabled": true
381
- },
382
- "public.member": {
383
- "name": "member",
384
- "schema": "",
385
- "columns": {
386
- "created_at": {
387
- "name": "created_at",
388
- "type": "timestamp",
389
- "primaryKey": false,
390
- "notNull": true,
391
- "default": "now()"
392
- },
393
- "id": {
394
- "name": "id",
395
- "type": "text",
396
- "primaryKey": true,
397
- "notNull": true
398
- },
399
- "organization_id": {
400
- "name": "organization_id",
401
- "type": "text",
402
- "primaryKey": false,
403
- "notNull": true
404
- },
405
- "role": {
406
- "name": "role",
407
- "type": "text",
408
- "primaryKey": false,
409
- "notNull": true
410
- },
411
- "user_id": {
412
- "name": "user_id",
413
- "type": "text",
414
- "primaryKey": false,
415
- "notNull": true
416
- }
417
- },
418
- "indexes": {
419
- "member_organizationId_idx": {
420
- "name": "member_organizationId_idx",
421
- "columns": [
422
- {
423
- "expression": "organization_id",
424
- "isExpression": false,
425
- "asc": true,
426
- "nulls": "last"
427
- }
428
- ],
429
- "isUnique": false,
430
- "concurrently": false,
431
- "method": "btree",
432
- "with": {}
433
- },
434
- "member_userId_idx": {
435
- "name": "member_userId_idx",
436
- "columns": [
437
- {
438
- "expression": "user_id",
439
- "isExpression": false,
440
- "asc": true,
441
- "nulls": "last"
442
- }
443
- ],
444
- "isUnique": false,
445
- "concurrently": false,
446
- "method": "btree",
447
- "with": {}
448
- }
449
- },
450
- "foreignKeys": {
451
- "member_organization_id_organization_id_fk": {
452
- "name": "member_organization_id_organization_id_fk",
453
- "tableFrom": "member",
454
- "tableTo": "organization",
455
- "columnsFrom": ["organization_id"],
456
- "columnsTo": ["id"],
457
- "onDelete": "cascade",
458
- "onUpdate": "no action"
459
- },
460
- "member_user_id_user_id_fk": {
461
- "name": "member_user_id_user_id_fk",
462
- "tableFrom": "member",
463
- "tableTo": "user",
464
- "columnsFrom": ["user_id"],
465
- "columnsTo": ["id"],
466
- "onDelete": "cascade",
467
- "onUpdate": "no action"
468
- }
469
- },
470
- "compositePrimaryKeys": {},
471
- "uniqueConstraints": {},
472
- "policies": {},
473
- "checkConstraints": {},
474
- "isRLSEnabled": true
475
- },
476
- "public.organization": {
477
- "name": "organization",
478
- "schema": "",
479
- "columns": {
480
- "created_at": {
481
- "name": "created_at",
482
- "type": "timestamp",
483
- "primaryKey": false,
484
- "notNull": true,
485
- "default": "now()"
486
- },
487
- "id": {
488
- "name": "id",
489
- "type": "text",
490
- "primaryKey": true,
491
- "notNull": true
492
- },
493
- "logo": {
494
- "name": "logo",
495
- "type": "text",
496
- "primaryKey": false,
497
- "notNull": false
498
- },
499
- "metadata": {
500
- "name": "metadata",
501
- "type": "text",
502
- "primaryKey": false,
503
- "notNull": false
504
- },
505
- "name": {
506
- "name": "name",
507
- "type": "text",
508
- "primaryKey": false,
509
- "notNull": true
510
- },
511
- "slug": {
512
- "name": "slug",
513
- "type": "text",
514
- "primaryKey": false,
515
- "notNull": false
516
- }
517
- },
518
- "indexes": {},
519
- "foreignKeys": {},
520
- "compositePrimaryKeys": {},
521
- "uniqueConstraints": {
522
- "organization_slug_unique": {
523
- "name": "organization_slug_unique",
524
- "nullsNotDistinct": false,
525
- "columns": ["slug"]
526
- }
527
- },
528
- "policies": {},
529
- "checkConstraints": {},
530
- "isRLSEnabled": true
531
- },
532
- "public.rate_limit": {
533
- "name": "rate_limit",
534
- "schema": "",
535
- "columns": {
536
- "id": {
537
- "name": "id",
538
- "type": "text",
539
- "primaryKey": true,
540
- "notNull": true
541
- },
542
- "count": {
543
- "name": "count",
544
- "type": "integer",
545
- "primaryKey": false,
546
- "notNull": true
547
- },
548
- "key": {
549
- "name": "key",
550
- "type": "text",
551
- "primaryKey": false,
552
- "notNull": true
553
- },
554
- "last_request": {
555
- "name": "last_request",
556
- "type": "bigint",
557
- "primaryKey": false,
558
- "notNull": true
559
- }
560
- },
561
- "indexes": {
562
- "rate_limit_key_key": {
563
- "name": "rate_limit_key_key",
564
- "columns": [
565
- {
566
- "expression": "key",
567
- "isExpression": false,
568
- "asc": true,
569
- "nulls": "last"
570
- }
571
- ],
572
- "isUnique": true,
573
- "concurrently": false,
574
- "method": "btree",
575
- "with": {}
576
- }
577
- },
578
- "foreignKeys": {},
579
- "compositePrimaryKeys": {},
580
- "uniqueConstraints": {},
581
- "policies": {},
582
- "checkConstraints": {},
583
- "isRLSEnabled": true
584
- },
585
- "public.session": {
586
- "name": "session",
587
- "schema": "",
588
- "columns": {
589
- "active_organization_id": {
590
- "name": "active_organization_id",
591
- "type": "text",
592
- "primaryKey": false,
593
- "notNull": false
594
- },
595
- "created_at": {
596
- "name": "created_at",
597
- "type": "timestamp",
598
- "primaryKey": false,
599
- "notNull": true,
600
- "default": "now()"
601
- },
602
- "expires_at": {
603
- "name": "expires_at",
604
- "type": "timestamp",
605
- "primaryKey": false,
606
- "notNull": true
607
- },
608
- "id": {
609
- "name": "id",
610
- "type": "text",
611
- "primaryKey": true,
612
- "notNull": true
613
- },
614
- "ip_address": {
615
- "name": "ip_address",
616
- "type": "text",
617
- "primaryKey": false,
618
- "notNull": false
619
- },
620
- "token": {
621
- "name": "token",
622
- "type": "text",
623
- "primaryKey": false,
624
- "notNull": true
625
- },
626
- "updated_at": {
627
- "name": "updated_at",
628
- "type": "timestamp",
629
- "primaryKey": false,
630
- "notNull": true,
631
- "default": "now()"
632
- },
633
- "user_agent": {
634
- "name": "user_agent",
635
- "type": "text",
636
- "primaryKey": false,
637
- "notNull": false
638
- },
639
- "user_id": {
640
- "name": "user_id",
641
- "type": "text",
642
- "primaryKey": false,
643
- "notNull": true
644
- }
645
- },
646
- "indexes": {
647
- "session_userId_idx": {
648
- "name": "session_userId_idx",
649
- "columns": [
650
- {
651
- "expression": "user_id",
652
- "isExpression": false,
653
- "asc": true,
654
- "nulls": "last"
655
- }
656
- ],
657
- "isUnique": false,
658
- "concurrently": false,
659
- "method": "btree",
660
- "with": {}
661
- }
662
- },
663
- "foreignKeys": {
664
- "session_active_organization_id_organization_id_fk": {
665
- "name": "session_active_organization_id_organization_id_fk",
666
- "tableFrom": "session",
667
- "tableTo": "organization",
668
- "columnsFrom": ["active_organization_id"],
669
- "columnsTo": ["id"],
670
- "onDelete": "set null",
671
- "onUpdate": "no action"
672
- },
673
- "session_user_id_user_id_fk": {
674
- "name": "session_user_id_user_id_fk",
675
- "tableFrom": "session",
676
- "tableTo": "user",
677
- "columnsFrom": ["user_id"],
678
- "columnsTo": ["id"],
679
- "onDelete": "cascade",
680
- "onUpdate": "no action"
681
- }
682
- },
683
- "compositePrimaryKeys": {},
684
- "uniqueConstraints": {
685
- "session_token_unique": {
686
- "name": "session_token_unique",
687
- "nullsNotDistinct": false,
688
- "columns": ["token"]
689
- }
690
- },
691
- "policies": {},
692
- "checkConstraints": {},
693
- "isRLSEnabled": true
694
- },
695
- "public.user": {
696
- "name": "user",
697
- "schema": "",
698
- "columns": {
699
- "created_at": {
700
- "name": "created_at",
701
- "type": "timestamp",
702
- "primaryKey": false,
703
- "notNull": true,
704
- "default": "now()"
705
- },
706
- "email": {
707
- "name": "email",
708
- "type": "text",
709
- "primaryKey": false,
710
- "notNull": true
711
- },
712
- "email_verified": {
713
- "name": "email_verified",
714
- "type": "boolean",
715
- "primaryKey": false,
716
- "notNull": true,
717
- "default": false
718
- },
719
- "id": {
720
- "name": "id",
721
- "type": "text",
722
- "primaryKey": true,
723
- "notNull": true
724
- },
725
- "image": {
726
- "name": "image",
727
- "type": "text",
728
- "primaryKey": false,
729
- "notNull": false
730
- },
731
- "name": {
732
- "name": "name",
733
- "type": "text",
734
- "primaryKey": false,
735
- "notNull": true
736
- },
737
- "updated_at": {
738
- "name": "updated_at",
739
- "type": "timestamp",
740
- "primaryKey": false,
741
- "notNull": true,
742
- "default": "now()"
743
- }
744
- },
745
- "indexes": {},
746
- "foreignKeys": {},
747
- "compositePrimaryKeys": {},
748
- "uniqueConstraints": {
749
- "user_email_unique": {
750
- "name": "user_email_unique",
751
- "nullsNotDistinct": false,
752
- "columns": ["email"]
753
- }
754
- },
755
- "policies": {},
756
- "checkConstraints": {},
757
- "isRLSEnabled": true
758
- },
759
- "public.verification": {
760
- "name": "verification",
761
- "schema": "",
762
- "columns": {
763
- "created_at": {
764
- "name": "created_at",
765
- "type": "timestamp",
766
- "primaryKey": false,
767
- "notNull": true,
768
- "default": "now()"
769
- },
770
- "expires_at": {
771
- "name": "expires_at",
772
- "type": "timestamp",
773
- "primaryKey": false,
774
- "notNull": true
775
- },
776
- "id": {
777
- "name": "id",
778
- "type": "text",
779
- "primaryKey": true,
780
- "notNull": true
781
- },
782
- "identifier": {
783
- "name": "identifier",
784
- "type": "text",
785
- "primaryKey": false,
786
- "notNull": true
787
- },
788
- "updated_at": {
789
- "name": "updated_at",
790
- "type": "timestamp",
791
- "primaryKey": false,
792
- "notNull": true,
793
- "default": "now()"
794
- },
795
- "value": {
796
- "name": "value",
797
- "type": "text",
798
- "primaryKey": false,
799
- "notNull": true
800
- }
801
- },
802
- "indexes": {
803
- "verification_identifier_idx": {
804
- "name": "verification_identifier_idx",
805
- "columns": [
806
- {
807
- "expression": "identifier",
808
- "isExpression": false,
809
- "asc": true,
810
- "nulls": "last"
811
- }
812
- ],
813
- "isUnique": false,
814
- "concurrently": false,
815
- "method": "btree",
816
- "with": {}
817
- }
818
- },
819
- "foreignKeys": {},
820
- "compositePrimaryKeys": {},
821
- "uniqueConstraints": {},
822
- "policies": {},
823
- "checkConstraints": {},
824
- "isRLSEnabled": true
825
- },
826
- "public.bigquery_query_costs": {
827
- "name": "bigquery_query_costs",
828
- "schema": "",
829
- "columns": {
830
- "actual_bytes_billed": {
831
- "name": "actual_bytes_billed",
832
- "type": "bigint",
833
- "primaryKey": false,
834
- "notNull": false
835
- },
836
- "actual_bytes_processed": {
837
- "name": "actual_bytes_processed",
838
- "type": "bigint",
839
- "primaryKey": false,
840
- "notNull": false
841
- },
842
- "actual_cost_usd": {
843
- "name": "actual_cost_usd",
844
- "type": "double precision",
845
- "primaryKey": false,
846
- "notNull": false
847
- },
848
- "cache_hit": {
849
- "name": "cache_hit",
850
- "type": "boolean",
851
- "primaryKey": false,
852
- "notNull": false
853
- },
854
- "connection_name": {
855
- "name": "connection_name",
856
- "type": "text",
857
- "primaryKey": false,
858
- "notNull": true
859
- },
860
- "created_at": {
861
- "name": "created_at",
862
- "type": "timestamp with time zone",
863
- "primaryKey": false,
864
- "notNull": true,
865
- "default": "now()"
866
- },
867
- "currency": {
868
- "name": "currency",
869
- "type": "text",
870
- "primaryKey": false,
871
- "notNull": true,
872
- "default": "'USD'"
873
- },
874
- "estimated_bytes_processed": {
875
- "name": "estimated_bytes_processed",
876
- "type": "bigint",
877
- "primaryKey": false,
878
- "notNull": false
879
- },
880
- "estimated_cost_usd": {
881
- "name": "estimated_cost_usd",
882
- "type": "double precision",
883
- "primaryKey": false,
884
- "notNull": false
885
- },
886
- "executed_at": {
887
- "name": "executed_at",
888
- "type": "timestamp with time zone",
889
- "primaryKey": false,
890
- "notNull": true
891
- },
892
- "id": {
893
- "name": "id",
894
- "type": "text",
895
- "primaryKey": true,
896
- "notNull": true
897
- },
898
- "job_id": {
899
- "name": "job_id",
900
- "type": "text",
901
- "primaryKey": false,
902
- "notNull": false
903
- },
904
- "location": {
905
- "name": "location",
906
- "type": "text",
907
- "primaryKey": false,
908
- "notNull": false
909
- },
910
- "organization_id": {
911
- "name": "organization_id",
912
- "type": "text",
913
- "primaryKey": false,
914
- "notNull": true
915
- },
916
- "pricing_model": {
917
- "name": "pricing_model",
918
- "type": "text",
919
- "primaryKey": false,
920
- "notNull": true,
921
- "default": "'unknown'"
922
- },
923
- "query_id": {
924
- "name": "query_id",
925
- "type": "text",
926
- "primaryKey": false,
927
- "notNull": true
928
- },
929
- "tool_call_id": {
930
- "name": "tool_call_id",
931
- "type": "text",
932
- "primaryKey": false,
933
- "notNull": true
934
- }
935
- },
936
- "indexes": {
937
- "idx_bigquery_query_costs_org": {
938
- "name": "idx_bigquery_query_costs_org",
939
- "columns": [
940
- {
941
- "expression": "organization_id",
942
- "isExpression": false,
943
- "asc": true,
944
- "nulls": "last"
945
- }
946
- ],
947
- "isUnique": false,
948
- "concurrently": false,
949
- "method": "btree",
950
- "with": {}
951
- },
952
- "idx_bigquery_query_costs_executed_at": {
953
- "name": "idx_bigquery_query_costs_executed_at",
954
- "columns": [
955
- {
956
- "expression": "executed_at",
957
- "isExpression": false,
958
- "asc": true,
959
- "nulls": "last"
960
- }
961
- ],
962
- "isUnique": false,
963
- "concurrently": false,
964
- "method": "btree",
965
- "with": {}
966
- }
967
- },
968
- "foreignKeys": {
969
- "bigquery_query_costs_organization_id_organization_id_fk": {
970
- "name": "bigquery_query_costs_organization_id_organization_id_fk",
971
- "tableFrom": "bigquery_query_costs",
972
- "tableTo": "organization",
973
- "columnsFrom": ["organization_id"],
974
- "columnsTo": ["id"],
975
- "onDelete": "cascade",
976
- "onUpdate": "no action"
977
- }
978
- },
979
- "compositePrimaryKeys": {},
980
- "uniqueConstraints": {},
981
- "policies": {},
982
- "checkConstraints": {},
983
- "isRLSEnabled": true
984
- },
985
- "public.cli_query_actions": {
986
- "name": "cli_query_actions",
987
- "schema": "",
988
- "columns": {
989
- "id": {
990
- "name": "id",
991
- "type": "text",
992
- "primaryKey": true,
993
- "notNull": true
994
- },
995
- "organization_id": {
996
- "name": "organization_id",
997
- "type": "text",
998
- "primaryKey": false,
999
- "notNull": true
1000
- },
1001
- "actor_user_id": {
1002
- "name": "actor_user_id",
1003
- "type": "text",
1004
- "primaryKey": false,
1005
- "notNull": true
1006
- },
1007
- "actor_email": {
1008
- "name": "actor_email",
1009
- "type": "text",
1010
- "primaryKey": false,
1011
- "notNull": true
1012
- },
1013
- "actor_auth_mode": {
1014
- "name": "actor_auth_mode",
1015
- "type": "text",
1016
- "primaryKey": false,
1017
- "notNull": true
1018
- },
1019
- "actor_membership_roles": {
1020
- "name": "actor_membership_roles",
1021
- "type": "jsonb",
1022
- "primaryKey": false,
1023
- "notNull": true
1024
- },
1025
- "request_id": {
1026
- "name": "request_id",
1027
- "type": "text",
1028
- "primaryKey": false,
1029
- "notNull": true
1030
- },
1031
- "action_type": {
1032
- "name": "action_type",
1033
- "type": "text",
1034
- "primaryKey": false,
1035
- "notNull": true
1036
- },
1037
- "stage": {
1038
- "name": "stage",
1039
- "type": "text",
1040
- "primaryKey": false,
1041
- "notNull": true,
1042
- "default": "'received'"
1043
- },
1044
- "status": {
1045
- "name": "status",
1046
- "type": "text",
1047
- "primaryKey": false,
1048
- "notNull": true,
1049
- "default": "'pending'"
1050
- },
1051
- "usage_persistence_status": {
1052
- "name": "usage_persistence_status",
1053
- "type": "text",
1054
- "primaryKey": false,
1055
- "notNull": true,
1056
- "default": "'not_started'"
1057
- },
1058
- "source_key": {
1059
- "name": "source_key",
1060
- "type": "text",
1061
- "primaryKey": false,
1062
- "notNull": true
1063
- },
1064
- "source_id": {
1065
- "name": "source_id",
1066
- "type": "text",
1067
- "primaryKey": false,
1068
- "notNull": false
1069
- },
1070
- "provider": {
1071
- "name": "provider",
1072
- "type": "text",
1073
- "primaryKey": false,
1074
- "notNull": false
1075
- },
1076
- "source_status": {
1077
- "name": "source_status",
1078
- "type": "text",
1079
- "primaryKey": false,
1080
- "notNull": false
1081
- },
1082
- "sql": {
1083
- "name": "sql",
1084
- "type": "text",
1085
- "primaryKey": false,
1086
- "notNull": true
1087
- },
1088
- "normalized_sql": {
1089
- "name": "normalized_sql",
1090
- "type": "text",
1091
- "primaryKey": false,
1092
- "notNull": false
1093
- },
1094
- "max_rows": {
1095
- "name": "max_rows",
1096
- "type": "integer",
1097
- "primaryKey": false,
1098
- "notNull": false
1099
- },
1100
- "max_bytes": {
1101
- "name": "max_bytes",
1102
- "type": "integer",
1103
- "primaryKey": false,
1104
- "notNull": false
1105
- },
1106
- "cell_max_chars": {
1107
- "name": "cell_max_chars",
1108
- "type": "integer",
1109
- "primaryKey": false,
1110
- "notNull": false
1111
- },
1112
- "timeout_ms": {
1113
- "name": "timeout_ms",
1114
- "type": "integer",
1115
- "primaryKey": false,
1116
- "notNull": false
1117
- },
1118
- "normalized_sql_changed": {
1119
- "name": "normalized_sql_changed",
1120
- "type": "boolean",
1121
- "primaryKey": false,
1122
- "notNull": true,
1123
- "default": false
1124
- },
1125
- "row_count": {
1126
- "name": "row_count",
1127
- "type": "integer",
1128
- "primaryKey": false,
1129
- "notNull": false
1130
- },
1131
- "elapsed_ms": {
1132
- "name": "elapsed_ms",
1133
- "type": "integer",
1134
- "primaryKey": false,
1135
- "notNull": false
1136
- },
1137
- "error_detail": {
1138
- "name": "error_detail",
1139
- "type": "text",
1140
- "primaryKey": false,
1141
- "notNull": false
1142
- },
1143
- "error_hint": {
1144
- "name": "error_hint",
1145
- "type": "text",
1146
- "primaryKey": false,
1147
- "notNull": false
1148
- },
1149
- "retryable": {
1150
- "name": "retryable",
1151
- "type": "boolean",
1152
- "primaryKey": false,
1153
- "notNull": false
1154
- },
1155
- "last_event_id": {
1156
- "name": "last_event_id",
1157
- "type": "text",
1158
- "primaryKey": false,
1159
- "notNull": false
1160
- },
1161
- "last_event_at": {
1162
- "name": "last_event_at",
1163
- "type": "timestamp with time zone",
1164
- "primaryKey": false,
1165
- "notNull": true,
1166
- "default": "now()"
1167
- },
1168
- "completed_at": {
1169
- "name": "completed_at",
1170
- "type": "timestamp with time zone",
1171
- "primaryKey": false,
1172
- "notNull": false
1173
- },
1174
- "created_at": {
1175
- "name": "created_at",
1176
- "type": "timestamp with time zone",
1177
- "primaryKey": false,
1178
- "notNull": true,
1179
- "default": "now()"
1180
- },
1181
- "updated_at": {
1182
- "name": "updated_at",
1183
- "type": "timestamp with time zone",
1184
- "primaryKey": false,
1185
- "notNull": true,
1186
- "default": "now()"
1187
- },
1188
- "version": {
1189
- "name": "version",
1190
- "type": "integer",
1191
- "primaryKey": false,
1192
- "notNull": true,
1193
- "default": 1
1194
- }
1195
- },
1196
- "indexes": {
1197
- "idx_cli_query_actions_org_created": {
1198
- "name": "idx_cli_query_actions_org_created",
1199
- "columns": [
1200
- {
1201
- "expression": "organization_id",
1202
- "isExpression": false,
1203
- "asc": true,
1204
- "nulls": "last"
1205
- },
1206
- {
1207
- "expression": "created_at",
1208
- "isExpression": false,
1209
- "asc": true,
1210
- "nulls": "last"
1211
- }
1212
- ],
1213
- "isUnique": false,
1214
- "concurrently": false,
1215
- "method": "btree",
1216
- "with": {}
1217
- },
1218
- "idx_cli_query_actions_actor_user_id": {
1219
- "name": "idx_cli_query_actions_actor_user_id",
1220
- "columns": [
1221
- {
1222
- "expression": "actor_user_id",
1223
- "isExpression": false,
1224
- "asc": true,
1225
- "nulls": "last"
1226
- }
1227
- ],
1228
- "isUnique": false,
1229
- "concurrently": false,
1230
- "method": "btree",
1231
- "with": {}
1232
- },
1233
- "idx_cli_query_actions_request_id": {
1234
- "name": "idx_cli_query_actions_request_id",
1235
- "columns": [
1236
- {
1237
- "expression": "request_id",
1238
- "isExpression": false,
1239
- "asc": true,
1240
- "nulls": "last"
1241
- }
1242
- ],
1243
- "isUnique": false,
1244
- "concurrently": false,
1245
- "method": "btree",
1246
- "with": {}
1247
- },
1248
- "idx_cli_query_actions_source_id": {
1249
- "name": "idx_cli_query_actions_source_id",
1250
- "columns": [
1251
- {
1252
- "expression": "source_id",
1253
- "isExpression": false,
1254
- "asc": true,
1255
- "nulls": "last"
1256
- }
1257
- ],
1258
- "isUnique": false,
1259
- "concurrently": false,
1260
- "method": "btree",
1261
- "with": {}
1262
- },
1263
- "idx_cli_query_actions_status": {
1264
- "name": "idx_cli_query_actions_status",
1265
- "columns": [
1266
- {
1267
- "expression": "status",
1268
- "isExpression": false,
1269
- "asc": true,
1270
- "nulls": "last"
1271
- }
1272
- ],
1273
- "isUnique": false,
1274
- "concurrently": false,
1275
- "method": "btree",
1276
- "with": {}
1277
- }
1278
- },
1279
- "foreignKeys": {
1280
- "cli_query_actions_organization_id_organization_id_fk": {
1281
- "name": "cli_query_actions_organization_id_organization_id_fk",
1282
- "tableFrom": "cli_query_actions",
1283
- "tableTo": "organization",
1284
- "columnsFrom": ["organization_id"],
1285
- "columnsTo": ["id"],
1286
- "onDelete": "cascade",
1287
- "onUpdate": "no action"
1288
- },
1289
- "cli_query_actions_source_id_data_sources_id_fk": {
1290
- "name": "cli_query_actions_source_id_data_sources_id_fk",
1291
- "tableFrom": "cli_query_actions",
1292
- "tableTo": "data_sources",
1293
- "columnsFrom": ["source_id"],
1294
- "columnsTo": ["id"],
1295
- "onDelete": "set null",
1296
- "onUpdate": "no action"
1297
- },
1298
- "cli_query_actions_same_action_last_event_fk": {
1299
- "name": "cli_query_actions_same_action_last_event_fk",
1300
- "tableFrom": "cli_query_actions",
1301
- "tableTo": "cli_query_action_events",
1302
- "columnsFrom": ["id", "last_event_id"],
1303
- "columnsTo": ["query_action_id", "id"],
1304
- "onDelete": "no action",
1305
- "onUpdate": "no action"
1306
- }
1307
- },
1308
- "compositePrimaryKeys": {},
1309
- "uniqueConstraints": {
1310
- "cli_query_actions_identity_unique": {
1311
- "name": "cli_query_actions_identity_unique",
1312
- "nullsNotDistinct": false,
1313
- "columns": [
1314
- "id",
1315
- "organization_id",
1316
- "request_id",
1317
- "action_type",
1318
- "source_key"
1319
- ]
1320
- }
1321
- },
1322
- "policies": {},
1323
- "checkConstraints": {
1324
- "cli_query_actions_action_type_check": {
1325
- "name": "cli_query_actions_action_type_check",
1326
- "value": "\"cli_query_actions\".\"action_type\" in ('validate', 'execute')"
1327
- },
1328
- "cli_query_actions_actor_auth_mode_check": {
1329
- "name": "cli_query_actions_actor_auth_mode_check",
1330
- "value": "\"cli_query_actions\".\"actor_auth_mode\" in ('browser_session', 'bearer_token')"
1331
- },
1332
- "cli_query_actions_stage_check": {
1333
- "name": "cli_query_actions_stage_check",
1334
- "value": "\"cli_query_actions\".\"stage\" in ('received', 'load_source', 'validate_query', 'load_credentials', 'execute_query', 'persist_usage', 'completed')"
1335
- },
1336
- "cli_query_actions_status_check": {
1337
- "name": "cli_query_actions_status_check",
1338
- "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')"
1339
- },
1340
- "cli_query_actions_usage_persistence_status_check": {
1341
- "name": "cli_query_actions_usage_persistence_status_check",
1342
- "value": "\"cli_query_actions\".\"usage_persistence_status\" in ('not_started', 'succeeded', 'failed')"
1343
- },
1344
- "cli_query_actions_completed_stage_check": {
1345
- "name": "cli_query_actions_completed_stage_check",
1346
- "value": "( (stage = 'completed' and completed_at is not null) or (stage <> 'completed' and completed_at is null) )"
1347
- },
1348
- "cli_query_actions_stage_status_alignment_check": {
1349
- "name": "cli_query_actions_stage_status_alignment_check",
1350
- "value": "( (stage = 'completed' and status <> 'pending') or (stage <> 'completed' and status = 'pending') )"
1351
- },
1352
- "cli_query_actions_pre_completion_usage_check": {
1353
- "name": "cli_query_actions_pre_completion_usage_check",
1354
- "value": "( stage = 'completed' or usage_persistence_status = 'not_started' )"
1355
- }
1356
- },
1357
- "isRLSEnabled": true
1358
- },
1359
- "public.cli_query_action_events": {
1360
- "name": "cli_query_action_events",
1361
- "schema": "",
1362
- "columns": {
1363
- "id": {
1364
- "name": "id",
1365
- "type": "text",
1366
- "primaryKey": true,
1367
- "notNull": true
1368
- },
1369
- "query_action_id": {
1370
- "name": "query_action_id",
1371
- "type": "text",
1372
- "primaryKey": false,
1373
- "notNull": true
1374
- },
1375
- "organization_id": {
1376
- "name": "organization_id",
1377
- "type": "text",
1378
- "primaryKey": false,
1379
- "notNull": true
1380
- },
1381
- "actor_user_id": {
1382
- "name": "actor_user_id",
1383
- "type": "text",
1384
- "primaryKey": false,
1385
- "notNull": true
1386
- },
1387
- "actor_email": {
1388
- "name": "actor_email",
1389
- "type": "text",
1390
- "primaryKey": false,
1391
- "notNull": true
1392
- },
1393
- "actor_auth_mode": {
1394
- "name": "actor_auth_mode",
1395
- "type": "text",
1396
- "primaryKey": false,
1397
- "notNull": true
1398
- },
1399
- "actor_membership_roles": {
1400
- "name": "actor_membership_roles",
1401
- "type": "jsonb",
1402
- "primaryKey": false,
1403
- "notNull": true
1404
- },
1405
- "request_id": {
1406
- "name": "request_id",
1407
- "type": "text",
1408
- "primaryKey": false,
1409
- "notNull": true
1410
- },
1411
- "action_type": {
1412
- "name": "action_type",
1413
- "type": "text",
1414
- "primaryKey": false,
1415
- "notNull": true
1416
- },
1417
- "event_type": {
1418
- "name": "event_type",
1419
- "type": "text",
1420
- "primaryKey": false,
1421
- "notNull": true
1422
- },
1423
- "stage": {
1424
- "name": "stage",
1425
- "type": "text",
1426
- "primaryKey": false,
1427
- "notNull": true
1428
- },
1429
- "status": {
1430
- "name": "status",
1431
- "type": "text",
1432
- "primaryKey": false,
1433
- "notNull": true
1434
- },
1435
- "usage_persistence_status": {
1436
- "name": "usage_persistence_status",
1437
- "type": "text",
1438
- "primaryKey": false,
1439
- "notNull": true
1440
- },
1441
- "source_key": {
1442
- "name": "source_key",
1443
- "type": "text",
1444
- "primaryKey": false,
1445
- "notNull": true
1446
- },
1447
- "source_id": {
1448
- "name": "source_id",
1449
- "type": "text",
1450
- "primaryKey": false,
1451
- "notNull": false
1452
- },
1453
- "provider": {
1454
- "name": "provider",
1455
- "type": "text",
1456
- "primaryKey": false,
1457
- "notNull": false
1458
- },
1459
- "source_status": {
1460
- "name": "source_status",
1461
- "type": "text",
1462
- "primaryKey": false,
1463
- "notNull": false
1464
- },
1465
- "sql": {
1466
- "name": "sql",
1467
- "type": "text",
1468
- "primaryKey": false,
1469
- "notNull": false
1470
- },
1471
- "normalized_sql": {
1472
- "name": "normalized_sql",
1473
- "type": "text",
1474
- "primaryKey": false,
1475
- "notNull": false
1476
- },
1477
- "max_rows": {
1478
- "name": "max_rows",
1479
- "type": "integer",
1480
- "primaryKey": false,
1481
- "notNull": false
1482
- },
1483
- "max_bytes": {
1484
- "name": "max_bytes",
1485
- "type": "integer",
1486
- "primaryKey": false,
1487
- "notNull": false
1488
- },
1489
- "cell_max_chars": {
1490
- "name": "cell_max_chars",
1491
- "type": "integer",
1492
- "primaryKey": false,
1493
- "notNull": false
1494
- },
1495
- "timeout_ms": {
1496
- "name": "timeout_ms",
1497
- "type": "integer",
1498
- "primaryKey": false,
1499
- "notNull": false
1500
- },
1501
- "normalized_sql_changed": {
1502
- "name": "normalized_sql_changed",
1503
- "type": "boolean",
1504
- "primaryKey": false,
1505
- "notNull": true,
1506
- "default": false
1507
- },
1508
- "row_count": {
1509
- "name": "row_count",
1510
- "type": "integer",
1511
- "primaryKey": false,
1512
- "notNull": false
1513
- },
1514
- "elapsed_ms": {
1515
- "name": "elapsed_ms",
1516
- "type": "integer",
1517
- "primaryKey": false,
1518
- "notNull": false
1519
- },
1520
- "error_detail": {
1521
- "name": "error_detail",
1522
- "type": "text",
1523
- "primaryKey": false,
1524
- "notNull": false
1525
- },
1526
- "error_hint": {
1527
- "name": "error_hint",
1528
- "type": "text",
1529
- "primaryKey": false,
1530
- "notNull": false
1531
- },
1532
- "retryable": {
1533
- "name": "retryable",
1534
- "type": "boolean",
1535
- "primaryKey": false,
1536
- "notNull": false
1537
- },
1538
- "occurred_at": {
1539
- "name": "occurred_at",
1540
- "type": "timestamp with time zone",
1541
- "primaryKey": false,
1542
- "notNull": true
1543
- },
1544
- "causation_event_id": {
1545
- "name": "causation_event_id",
1546
- "type": "text",
1547
- "primaryKey": false,
1548
- "notNull": false
1549
- },
1550
- "org_slug": {
1551
- "name": "org_slug",
1552
- "type": "text",
1553
- "primaryKey": false,
1554
- "notNull": false
1555
- },
1556
- "created_at": {
1557
- "name": "created_at",
1558
- "type": "timestamp with time zone",
1559
- "primaryKey": false,
1560
- "notNull": true,
1561
- "default": "now()"
1562
- }
1563
- },
1564
- "indexes": {
1565
- "idx_cli_query_action_events_action_occurred": {
1566
- "name": "idx_cli_query_action_events_action_occurred",
1567
- "columns": [
1568
- {
1569
- "expression": "query_action_id",
1570
- "isExpression": false,
1571
- "asc": true,
1572
- "nulls": "last"
1573
- },
1574
- {
1575
- "expression": "occurred_at",
1576
- "isExpression": false,
1577
- "asc": true,
1578
- "nulls": "last"
1579
- },
1580
- {
1581
- "expression": "id",
1582
- "isExpression": false,
1583
- "asc": true,
1584
- "nulls": "last"
1585
- }
1586
- ],
1587
- "isUnique": false,
1588
- "concurrently": false,
1589
- "method": "btree",
1590
- "with": {}
1591
- },
1592
- "idx_cli_query_action_events_org_occurred": {
1593
- "name": "idx_cli_query_action_events_org_occurred",
1594
- "columns": [
1595
- {
1596
- "expression": "organization_id",
1597
- "isExpression": false,
1598
- "asc": true,
1599
- "nulls": "last"
1600
- },
1601
- {
1602
- "expression": "occurred_at",
1603
- "isExpression": false,
1604
- "asc": true,
1605
- "nulls": "last"
1606
- }
1607
- ],
1608
- "isUnique": false,
1609
- "concurrently": false,
1610
- "method": "btree",
1611
- "with": {}
1612
- },
1613
- "idx_cli_query_action_events_actor_user_id": {
1614
- "name": "idx_cli_query_action_events_actor_user_id",
1615
- "columns": [
1616
- {
1617
- "expression": "actor_user_id",
1618
- "isExpression": false,
1619
- "asc": true,
1620
- "nulls": "last"
1621
- }
1622
- ],
1623
- "isUnique": false,
1624
- "concurrently": false,
1625
- "method": "btree",
1626
- "with": {}
1627
- },
1628
- "idx_cli_query_action_events_request_id": {
1629
- "name": "idx_cli_query_action_events_request_id",
1630
- "columns": [
1631
- {
1632
- "expression": "request_id",
1633
- "isExpression": false,
1634
- "asc": true,
1635
- "nulls": "last"
1636
- }
1637
- ],
1638
- "isUnique": false,
1639
- "concurrently": false,
1640
- "method": "btree",
1641
- "with": {}
1642
- },
1643
- "idx_cli_query_action_events_causation": {
1644
- "name": "idx_cli_query_action_events_causation",
1645
- "columns": [
1646
- {
1647
- "expression": "causation_event_id",
1648
- "isExpression": false,
1649
- "asc": true,
1650
- "nulls": "last"
1651
- }
1652
- ],
1653
- "isUnique": false,
1654
- "concurrently": false,
1655
- "method": "btree",
1656
- "with": {}
1657
- },
1658
- "idx_cli_query_action_events_action_event_type_unique": {
1659
- "name": "idx_cli_query_action_events_action_event_type_unique",
1660
- "columns": [
1661
- {
1662
- "expression": "query_action_id",
1663
- "isExpression": false,
1664
- "asc": true,
1665
- "nulls": "last"
1666
- },
1667
- {
1668
- "expression": "event_type",
1669
- "isExpression": false,
1670
- "asc": true,
1671
- "nulls": "last"
1672
- }
1673
- ],
1674
- "isUnique": true,
1675
- "concurrently": false,
1676
- "method": "btree",
1677
- "with": {}
1678
- }
1679
- },
1680
- "foreignKeys": {
1681
- "cli_query_action_events_query_action_id_cli_query_actions_id_fk": {
1682
- "name": "cli_query_action_events_query_action_id_cli_query_actions_id_fk",
1683
- "tableFrom": "cli_query_action_events",
1684
- "tableTo": "cli_query_actions",
1685
- "columnsFrom": ["query_action_id"],
1686
- "columnsTo": ["id"],
1687
- "onDelete": "cascade",
1688
- "onUpdate": "no action"
1689
- },
1690
- "cli_query_action_events_organization_id_organization_id_fk": {
1691
- "name": "cli_query_action_events_organization_id_organization_id_fk",
1692
- "tableFrom": "cli_query_action_events",
1693
- "tableTo": "organization",
1694
- "columnsFrom": ["organization_id"],
1695
- "columnsTo": ["id"],
1696
- "onDelete": "cascade",
1697
- "onUpdate": "no action"
1698
- },
1699
- "cli_query_action_events_source_id_data_sources_id_fk": {
1700
- "name": "cli_query_action_events_source_id_data_sources_id_fk",
1701
- "tableFrom": "cli_query_action_events",
1702
- "tableTo": "data_sources",
1703
- "columnsFrom": ["source_id"],
1704
- "columnsTo": ["id"],
1705
- "onDelete": "set null",
1706
- "onUpdate": "no action"
1707
- },
1708
- "cli_query_action_events_action_identity_fk": {
1709
- "name": "cli_query_action_events_action_identity_fk",
1710
- "tableFrom": "cli_query_action_events",
1711
- "tableTo": "cli_query_actions",
1712
- "columnsFrom": [
1713
- "query_action_id",
1714
- "organization_id",
1715
- "request_id",
1716
- "action_type",
1717
- "source_key"
1718
- ],
1719
- "columnsTo": [
1720
- "id",
1721
- "organization_id",
1722
- "request_id",
1723
- "action_type",
1724
- "source_key"
1725
- ],
1726
- "onDelete": "no action",
1727
- "onUpdate": "no action"
1728
- },
1729
- "cli_query_action_events_same_action_causation_fk": {
1730
- "name": "cli_query_action_events_same_action_causation_fk",
1731
- "tableFrom": "cli_query_action_events",
1732
- "tableTo": "cli_query_action_events",
1733
- "columnsFrom": ["query_action_id", "causation_event_id"],
1734
- "columnsTo": ["query_action_id", "id"],
1735
- "onDelete": "no action",
1736
- "onUpdate": "no action"
1737
- },
1738
- "cli_query_action_events_causation_event_id_cli_query_action_events_id_fk": {
1739
- "name": "cli_query_action_events_causation_event_id_cli_query_action_events_id_fk",
1740
- "tableFrom": "cli_query_action_events",
1741
- "tableTo": "cli_query_action_events",
1742
- "columnsFrom": ["causation_event_id"],
1743
- "columnsTo": ["id"],
1744
- "onDelete": "set null",
1745
- "onUpdate": "no action"
1746
- }
1747
- },
1748
- "compositePrimaryKeys": {},
1749
- "uniqueConstraints": {
1750
- "cli_query_action_events_action_id_unique": {
1751
- "name": "cli_query_action_events_action_id_unique",
1752
- "nullsNotDistinct": false,
1753
- "columns": ["query_action_id", "id"]
1754
- }
1755
- },
1756
- "policies": {},
1757
- "checkConstraints": {
1758
- "cli_query_action_events_sql_payload_check": {
1759
- "name": "cli_query_action_events_sql_payload_check",
1760
- "value": "( (event_type = 'action_received' and sql is not null) or (event_type <> 'action_received' and sql is null) )"
1761
- },
1762
- "cli_query_action_events_causation_chain_check": {
1763
- "name": "cli_query_action_events_causation_chain_check",
1764
- "value": "( (event_type = 'action_received' and causation_event_id is null) or (event_type <> 'action_received' and causation_event_id is not null) )"
1765
- },
1766
- "cli_query_action_events_validated_normalized_sql_check": {
1767
- "name": "cli_query_action_events_validated_normalized_sql_check",
1768
- "value": "(event_type <> 'query_validated' or normalized_sql is not null)"
1769
- },
1770
- "cli_query_action_events_lifecycle_check": {
1771
- "name": "cli_query_action_events_lifecycle_check",
1772
- "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') )"
1773
- },
1774
- "cli_query_action_events_action_type_check": {
1775
- "name": "cli_query_action_events_action_type_check",
1776
- "value": "\"cli_query_action_events\".\"action_type\" in ('validate', 'execute')"
1777
- },
1778
- "cli_query_action_events_actor_auth_mode_check": {
1779
- "name": "cli_query_action_events_actor_auth_mode_check",
1780
- "value": "\"cli_query_action_events\".\"actor_auth_mode\" in ('browser_session', 'bearer_token')"
1781
- },
1782
- "cli_query_action_events_event_type_check": {
1783
- "name": "cli_query_action_events_event_type_check",
1784
- "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')"
1785
- },
1786
- "cli_query_action_events_stage_check": {
1787
- "name": "cli_query_action_events_stage_check",
1788
- "value": "\"cli_query_action_events\".\"stage\" in ('received', 'load_source', 'validate_query', 'load_credentials', 'execute_query', 'persist_usage', 'completed')"
1789
- },
1790
- "cli_query_action_events_status_check": {
1791
- "name": "cli_query_action_events_status_check",
1792
- "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')"
1793
- },
1794
- "cli_query_action_events_usage_persistence_status_check": {
1795
- "name": "cli_query_action_events_usage_persistence_status_check",
1796
- "value": "\"cli_query_action_events\".\"usage_persistence_status\" in ('not_started', 'succeeded', 'failed')"
1797
- },
1798
- "cli_query_action_events_causation_not_self_check": {
1799
- "name": "cli_query_action_events_causation_not_self_check",
1800
- "value": "\"cli_query_action_events\".\"causation_event_id\" is null or \"cli_query_action_events\".\"causation_event_id\" <> \"cli_query_action_events\".\"id\""
1801
- }
1802
- },
1803
- "isRLSEnabled": true
1804
- },
1805
- "public.connector_jobs": {
1806
- "name": "connector_jobs",
1807
- "schema": "",
1808
- "columns": {
1809
- "completed_at": {
1810
- "name": "completed_at",
1811
- "type": "timestamp with time zone",
1812
- "primaryKey": false,
1813
- "notNull": false
1814
- },
1815
- "connector_id": {
1816
- "name": "connector_id",
1817
- "type": "text",
1818
- "primaryKey": false,
1819
- "notNull": true
1820
- },
1821
- "created_at": {
1822
- "name": "created_at",
1823
- "type": "timestamp with time zone",
1824
- "primaryKey": false,
1825
- "notNull": true,
1826
- "default": "now()"
1827
- },
1828
- "database": {
1829
- "name": "database",
1830
- "type": "text",
1831
- "primaryKey": false,
1832
- "notNull": true
1833
- },
1834
- "job_id": {
1835
- "name": "job_id",
1836
- "type": "text",
1837
- "primaryKey": true,
1838
- "notNull": true
1839
- },
1840
- "leased_at": {
1841
- "name": "leased_at",
1842
- "type": "timestamp with time zone",
1843
- "primaryKey": false,
1844
- "notNull": false
1845
- },
1846
- "max_rows": {
1847
- "name": "max_rows",
1848
- "type": "integer",
1849
- "primaryKey": false,
1850
- "notNull": false
1851
- },
1852
- "outcome": {
1853
- "name": "outcome",
1854
- "type": "jsonb",
1855
- "primaryKey": false,
1856
- "notNull": false
1857
- },
1858
- "sql": {
1859
- "name": "sql",
1860
- "type": "text",
1861
- "primaryKey": false,
1862
- "notNull": true
1863
- },
1864
- "status": {
1865
- "name": "status",
1866
- "type": "text",
1867
- "primaryKey": false,
1868
- "notNull": true
1869
- },
1870
- "timeout_ms": {
1871
- "name": "timeout_ms",
1872
- "type": "integer",
1873
- "primaryKey": false,
1874
- "notNull": false
1875
- },
1876
- "updated_at": {
1877
- "name": "updated_at",
1878
- "type": "timestamp with time zone",
1879
- "primaryKey": false,
1880
- "notNull": true,
1881
- "default": "now()"
1882
- },
1883
- "workgroup": {
1884
- "name": "workgroup",
1885
- "type": "text",
1886
- "primaryKey": false,
1887
- "notNull": false
1888
- }
1889
- },
1890
- "indexes": {
1891
- "idx_connector_jobs_connector_created": {
1892
- "name": "idx_connector_jobs_connector_created",
1893
- "columns": [
1894
- {
1895
- "expression": "connector_id",
1896
- "isExpression": false,
1897
- "asc": true,
1898
- "nulls": "last"
1899
- },
1900
- {
1901
- "expression": "created_at",
1902
- "isExpression": false,
1903
- "asc": true,
1904
- "nulls": "last"
1905
- }
1906
- ],
1907
- "isUnique": false,
1908
- "concurrently": false,
1909
- "method": "btree",
1910
- "with": {}
1911
- },
1912
- "idx_connector_jobs_status_created": {
1913
- "name": "idx_connector_jobs_status_created",
1914
- "columns": [
1915
- {
1916
- "expression": "status",
1917
- "isExpression": false,
1918
- "asc": true,
1919
- "nulls": "last"
1920
- },
1921
- {
1922
- "expression": "created_at",
1923
- "isExpression": false,
1924
- "asc": true,
1925
- "nulls": "last"
1926
- }
1927
- ],
1928
- "isUnique": false,
1929
- "concurrently": false,
1930
- "method": "btree",
1931
- "with": {}
1932
- }
1933
- },
1934
- "foreignKeys": {
1935
- "connector_jobs_connector_id_connectors_connector_id_fk": {
1936
- "name": "connector_jobs_connector_id_connectors_connector_id_fk",
1937
- "tableFrom": "connector_jobs",
1938
- "tableTo": "connectors",
1939
- "columnsFrom": ["connector_id"],
1940
- "columnsTo": ["connector_id"],
1941
- "onDelete": "cascade",
1942
- "onUpdate": "no action"
1943
- }
1944
- },
1945
- "compositePrimaryKeys": {},
1946
- "uniqueConstraints": {},
1947
- "policies": {},
1948
- "checkConstraints": {},
1949
- "isRLSEnabled": true
1950
- },
1951
- "public.connectors": {
1952
- "name": "connectors",
1953
- "schema": "",
1954
- "columns": {
1955
- "auth_token_hash": {
1956
- "name": "auth_token_hash",
1957
- "type": "text",
1958
- "primaryKey": false,
1959
- "notNull": true
1960
- },
1961
- "connector_id": {
1962
- "name": "connector_id",
1963
- "type": "text",
1964
- "primaryKey": true,
1965
- "notNull": true
1966
- },
1967
- "connector_name": {
1968
- "name": "connector_name",
1969
- "type": "text",
1970
- "primaryKey": false,
1971
- "notNull": true
1972
- },
1973
- "health_status": {
1974
- "name": "health_status",
1975
- "type": "text",
1976
- "primaryKey": false,
1977
- "notNull": false
1978
- },
1979
- "last_heartbeat_at": {
1980
- "name": "last_heartbeat_at",
1981
- "type": "timestamp with time zone",
1982
- "primaryKey": false,
1983
- "notNull": false
1984
- },
1985
- "last_seen_at": {
1986
- "name": "last_seen_at",
1987
- "type": "timestamp with time zone",
1988
- "primaryKey": false,
1989
- "notNull": false
1990
- },
1991
- "metadata": {
1992
- "name": "metadata",
1993
- "type": "jsonb",
1994
- "primaryKey": false,
1995
- "notNull": false
1996
- },
1997
- "organization_id": {
1998
- "name": "organization_id",
1999
- "type": "text",
2000
- "primaryKey": false,
2001
- "notNull": true
2002
- },
2003
- "registered_at": {
2004
- "name": "registered_at",
2005
- "type": "timestamp with time zone",
2006
- "primaryKey": false,
2007
- "notNull": true,
2008
- "default": "now()"
2009
- },
2010
- "updated_at": {
2011
- "name": "updated_at",
2012
- "type": "timestamp with time zone",
2013
- "primaryKey": false,
2014
- "notNull": true,
2015
- "default": "now()"
2016
- }
2017
- },
2018
- "indexes": {
2019
- "idx_connectors_organization": {
2020
- "name": "idx_connectors_organization",
2021
- "columns": [
2022
- {
2023
- "expression": "organization_id",
2024
- "isExpression": false,
2025
- "asc": true,
2026
- "nulls": "last"
2027
- }
2028
- ],
2029
- "isUnique": false,
2030
- "concurrently": false,
2031
- "method": "btree",
2032
- "with": {}
2033
- },
2034
- "idx_connectors_last_seen": {
2035
- "name": "idx_connectors_last_seen",
2036
- "columns": [
2037
- {
2038
- "expression": "last_seen_at",
2039
- "isExpression": false,
2040
- "asc": true,
2041
- "nulls": "last"
2042
- }
2043
- ],
2044
- "isUnique": false,
2045
- "concurrently": false,
2046
- "method": "btree",
2047
- "with": {}
2048
- },
2049
- "idx_connectors_auth_token_hash_unique": {
2050
- "name": "idx_connectors_auth_token_hash_unique",
2051
- "columns": [
2052
- {
2053
- "expression": "auth_token_hash",
2054
- "isExpression": false,
2055
- "asc": true,
2056
- "nulls": "last"
2057
- }
2058
- ],
2059
- "isUnique": true,
2060
- "concurrently": false,
2061
- "method": "btree",
2062
- "with": {}
2063
- }
2064
- },
2065
- "foreignKeys": {
2066
- "connectors_organization_id_organization_id_fk": {
2067
- "name": "connectors_organization_id_organization_id_fk",
2068
- "tableFrom": "connectors",
2069
- "tableTo": "organization",
2070
- "columnsFrom": ["organization_id"],
2071
- "columnsTo": ["id"],
2072
- "onDelete": "cascade",
2073
- "onUpdate": "no action"
2074
- }
2075
- },
2076
- "compositePrimaryKeys": {},
2077
- "uniqueConstraints": {},
2078
- "policies": {},
2079
- "checkConstraints": {},
2080
- "isRLSEnabled": true
2081
- },
2082
- "public.data_source_query_costs": {
2083
- "name": "data_source_query_costs",
2084
- "schema": "",
2085
- "columns": {
2086
- "actual_cost_usd": {
2087
- "name": "actual_cost_usd",
2088
- "type": "double precision",
2089
- "primaryKey": false,
2090
- "notNull": false
2091
- },
2092
- "actual_processed_bytes": {
2093
- "name": "actual_processed_bytes",
2094
- "type": "bigint",
2095
- "primaryKey": false,
2096
- "notNull": false
2097
- },
2098
- "billable_bytes": {
2099
- "name": "billable_bytes",
2100
- "type": "bigint",
2101
- "primaryKey": false,
2102
- "notNull": false
2103
- },
2104
- "cache_hit": {
2105
- "name": "cache_hit",
2106
- "type": "boolean",
2107
- "primaryKey": false,
2108
- "notNull": false
2109
- },
2110
- "connection_name": {
2111
- "name": "connection_name",
2112
- "type": "text",
2113
- "primaryKey": false,
2114
- "notNull": true
2115
- },
2116
- "connector_id": {
2117
- "name": "connector_id",
2118
- "type": "text",
2119
- "primaryKey": false,
2120
- "notNull": false
2121
- },
2122
- "created_at": {
2123
- "name": "created_at",
2124
- "type": "timestamp with time zone",
2125
- "primaryKey": false,
2126
- "notNull": true,
2127
- "default": "now()"
2128
- },
2129
- "currency": {
2130
- "name": "currency",
2131
- "type": "text",
2132
- "primaryKey": false,
2133
- "notNull": true,
2134
- "default": "'USD'"
2135
- },
2136
- "database": {
2137
- "name": "database",
2138
- "type": "text",
2139
- "primaryKey": false,
2140
- "notNull": false
2141
- },
2142
- "estimated_cost_usd": {
2143
- "name": "estimated_cost_usd",
2144
- "type": "double precision",
2145
- "primaryKey": false,
2146
- "notNull": false
2147
- },
2148
- "estimated_processed_bytes": {
2149
- "name": "estimated_processed_bytes",
2150
- "type": "bigint",
2151
- "primaryKey": false,
2152
- "notNull": false
2153
- },
2154
- "executed_at": {
2155
- "name": "executed_at",
2156
- "type": "timestamp with time zone",
2157
- "primaryKey": false,
2158
- "notNull": true
2159
- },
2160
- "execution_time_ms": {
2161
- "name": "execution_time_ms",
2162
- "type": "integer",
2163
- "primaryKey": false,
2164
- "notNull": false
2165
- },
2166
- "id": {
2167
- "name": "id",
2168
- "type": "text",
2169
- "primaryKey": true,
2170
- "notNull": true
2171
- },
2172
- "job_id": {
2173
- "name": "job_id",
2174
- "type": "text",
2175
- "primaryKey": false,
2176
- "notNull": false
2177
- },
2178
- "location": {
2179
- "name": "location",
2180
- "type": "text",
2181
- "primaryKey": false,
2182
- "notNull": false
2183
- },
2184
- "organization_id": {
2185
- "name": "organization_id",
2186
- "type": "text",
2187
- "primaryKey": false,
2188
- "notNull": true
2189
- },
2190
- "pricing_model": {
2191
- "name": "pricing_model",
2192
- "type": "text",
2193
- "primaryKey": false,
2194
- "notNull": true,
2195
- "default": "'unknown'"
2196
- },
2197
- "provider": {
2198
- "name": "provider",
2199
- "type": "text",
2200
- "primaryKey": false,
2201
- "notNull": true
2202
- },
2203
- "query_execution_id": {
2204
- "name": "query_execution_id",
2205
- "type": "text",
2206
- "primaryKey": false,
2207
- "notNull": false
2208
- },
2209
- "query_id": {
2210
- "name": "query_id",
2211
- "type": "text",
2212
- "primaryKey": false,
2213
- "notNull": true
2214
- },
2215
- "row_count": {
2216
- "name": "row_count",
2217
- "type": "integer",
2218
- "primaryKey": false,
2219
- "notNull": false
2220
- },
2221
- "tool_call_id": {
2222
- "name": "tool_call_id",
2223
- "type": "text",
2224
- "primaryKey": false,
2225
- "notNull": true
2226
- },
2227
- "workgroup": {
2228
- "name": "workgroup",
2229
- "type": "text",
2230
- "primaryKey": false,
2231
- "notNull": false
2232
- }
2233
- },
2234
- "indexes": {
2235
- "idx_data_source_query_costs_org": {
2236
- "name": "idx_data_source_query_costs_org",
2237
- "columns": [
2238
- {
2239
- "expression": "organization_id",
2240
- "isExpression": false,
2241
- "asc": true,
2242
- "nulls": "last"
2243
- }
2244
- ],
2245
- "isUnique": false,
2246
- "concurrently": false,
2247
- "method": "btree",
2248
- "with": {}
2249
- },
2250
- "idx_data_source_query_costs_provider": {
2251
- "name": "idx_data_source_query_costs_provider",
2252
- "columns": [
2253
- {
2254
- "expression": "provider",
2255
- "isExpression": false,
2256
- "asc": true,
2257
- "nulls": "last"
2258
- }
2259
- ],
2260
- "isUnique": false,
2261
- "concurrently": false,
2262
- "method": "btree",
2263
- "with": {}
2264
- },
2265
- "idx_data_source_query_costs_executed_at": {
2266
- "name": "idx_data_source_query_costs_executed_at",
2267
- "columns": [
2268
- {
2269
- "expression": "executed_at",
2270
- "isExpression": false,
2271
- "asc": true,
2272
- "nulls": "last"
2273
- }
2274
- ],
2275
- "isUnique": false,
2276
- "concurrently": false,
2277
- "method": "btree",
2278
- "with": {}
2279
- }
2280
- },
2281
- "foreignKeys": {
2282
- "data_source_query_costs_connector_id_connectors_connector_id_fk": {
2283
- "name": "data_source_query_costs_connector_id_connectors_connector_id_fk",
2284
- "tableFrom": "data_source_query_costs",
2285
- "tableTo": "connectors",
2286
- "columnsFrom": ["connector_id"],
2287
- "columnsTo": ["connector_id"],
2288
- "onDelete": "cascade",
2289
- "onUpdate": "no action"
2290
- },
2291
- "data_source_query_costs_organization_id_organization_id_fk": {
2292
- "name": "data_source_query_costs_organization_id_organization_id_fk",
2293
- "tableFrom": "data_source_query_costs",
2294
- "tableTo": "organization",
2295
- "columnsFrom": ["organization_id"],
2296
- "columnsTo": ["id"],
2297
- "onDelete": "cascade",
2298
- "onUpdate": "no action"
2299
- }
2300
- },
2301
- "compositePrimaryKeys": {},
2302
- "uniqueConstraints": {},
2303
- "policies": {},
2304
- "checkConstraints": {},
2305
- "isRLSEnabled": true
2306
- },
2307
- "public.data_sources": {
2308
- "name": "data_sources",
2309
- "schema": "",
2310
- "columns": {
2311
- "created_at": {
2312
- "name": "created_at",
2313
- "type": "timestamp with time zone",
2314
- "primaryKey": false,
2315
- "notNull": true,
2316
- "default": "now()"
2317
- },
2318
- "credentials_encrypted": {
2319
- "name": "credentials_encrypted",
2320
- "type": "text",
2321
- "primaryKey": false,
2322
- "notNull": true
2323
- },
2324
- "credentials_iv": {
2325
- "name": "credentials_iv",
2326
- "type": "text",
2327
- "primaryKey": false,
2328
- "notNull": true
2329
- },
2330
- "error_message": {
2331
- "name": "error_message",
2332
- "type": "text",
2333
- "primaryKey": false,
2334
- "notNull": false
2335
- },
2336
- "id": {
2337
- "name": "id",
2338
- "type": "text",
2339
- "primaryKey": true,
2340
- "notNull": true
2341
- },
2342
- "last_used_at": {
2343
- "name": "last_used_at",
2344
- "type": "timestamp with time zone",
2345
- "primaryKey": false,
2346
- "notNull": false
2347
- },
2348
- "name": {
2349
- "name": "name",
2350
- "type": "text",
2351
- "primaryKey": false,
2352
- "notNull": true
2353
- },
2354
- "organization_id": {
2355
- "name": "organization_id",
2356
- "type": "text",
2357
- "primaryKey": false,
2358
- "notNull": true
2359
- },
2360
- "provider": {
2361
- "name": "provider",
2362
- "type": "text",
2363
- "primaryKey": false,
2364
- "notNull": true
2365
- },
2366
- "provider_account_id": {
2367
- "name": "provider_account_id",
2368
- "type": "text",
2369
- "primaryKey": false,
2370
- "notNull": false
2371
- },
2372
- "scope": {
2373
- "name": "scope",
2374
- "type": "text",
2375
- "primaryKey": false,
2376
- "notNull": false
2377
- },
2378
- "status": {
2379
- "name": "status",
2380
- "type": "text",
2381
- "primaryKey": false,
2382
- "notNull": true,
2383
- "default": "'active'"
2384
- },
2385
- "updated_at": {
2386
- "name": "updated_at",
2387
- "type": "timestamp with time zone",
2388
- "primaryKey": false,
2389
- "notNull": true,
2390
- "default": "now()"
2391
- },
2392
- "use_as_data_source": {
2393
- "name": "use_as_data_source",
2394
- "type": "boolean",
2395
- "primaryKey": false,
2396
- "notNull": true,
2397
- "default": true
2398
- }
2399
- },
2400
- "indexes": {
2401
- "idx_data_sources_organization": {
2402
- "name": "idx_data_sources_organization",
2403
- "columns": [
2404
- {
2405
- "expression": "organization_id",
2406
- "isExpression": false,
2407
- "asc": true,
2408
- "nulls": "last"
2409
- }
2410
- ],
2411
- "isUnique": false,
2412
- "concurrently": false,
2413
- "method": "btree",
2414
- "with": {}
2415
- },
2416
- "idx_data_sources_provider": {
2417
- "name": "idx_data_sources_provider",
2418
- "columns": [
2419
- {
2420
- "expression": "provider",
2421
- "isExpression": false,
2422
- "asc": true,
2423
- "nulls": "last"
2424
- }
2425
- ],
2426
- "isUnique": false,
2427
- "concurrently": false,
2428
- "method": "btree",
2429
- "with": {}
2430
- },
2431
- "idx_data_sources_provider_account": {
2432
- "name": "idx_data_sources_provider_account",
2433
- "columns": [
2434
- {
2435
- "expression": "provider",
2436
- "isExpression": false,
2437
- "asc": true,
2438
- "nulls": "last"
2439
- },
2440
- {
2441
- "expression": "provider_account_id",
2442
- "isExpression": false,
2443
- "asc": true,
2444
- "nulls": "last"
2445
- }
2446
- ],
2447
- "isUnique": false,
2448
- "concurrently": false,
2449
- "method": "btree",
2450
- "with": {}
2451
- },
2452
- "idx_data_sources_status": {
2453
- "name": "idx_data_sources_status",
2454
- "columns": [
2455
- {
2456
- "expression": "status",
2457
- "isExpression": false,
2458
- "asc": true,
2459
- "nulls": "last"
2460
- }
2461
- ],
2462
- "isUnique": false,
2463
- "concurrently": false,
2464
- "method": "btree",
2465
- "with": {}
2466
- }
2467
- },
2468
- "foreignKeys": {
2469
- "data_sources_organization_id_organization_id_fk": {
2470
- "name": "data_sources_organization_id_organization_id_fk",
2471
- "tableFrom": "data_sources",
2472
- "tableTo": "organization",
2473
- "columnsFrom": ["organization_id"],
2474
- "columnsTo": ["id"],
2475
- "onDelete": "cascade",
2476
- "onUpdate": "no action"
2477
- }
2478
- },
2479
- "compositePrimaryKeys": {},
2480
- "uniqueConstraints": {
2481
- "data_sources_organization_name_unique": {
2482
- "name": "data_sources_organization_name_unique",
2483
- "nullsNotDistinct": false,
2484
- "columns": ["organization_id", "name"]
2485
- }
2486
- },
2487
- "policies": {},
2488
- "checkConstraints": {},
2489
- "isRLSEnabled": true
2490
- },
2491
- "public.data_source_table_usage": {
2492
- "name": "data_source_table_usage",
2493
- "schema": "",
2494
- "columns": {
2495
- "column_memos": {
2496
- "name": "column_memos",
2497
- "type": "jsonb",
2498
- "primaryKey": false,
2499
- "notNull": true,
2500
- "default": "'{}'::jsonb"
2501
- },
2502
- "created_at": {
2503
- "name": "created_at",
2504
- "type": "timestamp with time zone",
2505
- "primaryKey": false,
2506
- "notNull": true,
2507
- "default": "now()"
2508
- },
2509
- "data_source_id": {
2510
- "name": "data_source_id",
2511
- "type": "text",
2512
- "primaryKey": false,
2513
- "notNull": true
2514
- },
2515
- "formatted": {
2516
- "name": "formatted",
2517
- "type": "text",
2518
- "primaryKey": false,
2519
- "notNull": true
2520
- },
2521
- "generated_at": {
2522
- "name": "generated_at",
2523
- "type": "timestamp with time zone",
2524
- "primaryKey": false,
2525
- "notNull": true
2526
- },
2527
- "id": {
2528
- "name": "id",
2529
- "type": "text",
2530
- "primaryKey": true,
2531
- "notNull": true
2532
- },
2533
- "memo_updated_at": {
2534
- "name": "memo_updated_at",
2535
- "type": "timestamp with time zone",
2536
- "primaryKey": false,
2537
- "notNull": false
2538
- },
2539
- "memo_updated_by": {
2540
- "name": "memo_updated_by",
2541
- "type": "text",
2542
- "primaryKey": false,
2543
- "notNull": false
2544
- },
2545
- "organization_id": {
2546
- "name": "organization_id",
2547
- "type": "text",
2548
- "primaryKey": false,
2549
- "notNull": true
2550
- },
2551
- "provider": {
2552
- "name": "provider",
2553
- "type": "text",
2554
- "primaryKey": false,
2555
- "notNull": true
2556
- },
2557
- "schema_hash": {
2558
- "name": "schema_hash",
2559
- "type": "text",
2560
- "primaryKey": false,
2561
- "notNull": false
2562
- },
2563
- "table_lineage": {
2564
- "name": "table_lineage",
2565
- "type": "jsonb",
2566
- "primaryKey": false,
2567
- "notNull": true,
2568
- "default": "'{}'::jsonb"
2569
- },
2570
- "table_memos": {
2571
- "name": "table_memos",
2572
- "type": "jsonb",
2573
- "primaryKey": false,
2574
- "notNull": true,
2575
- "default": "'{}'::jsonb"
2576
- },
2577
- "tables": {
2578
- "name": "tables",
2579
- "type": "jsonb",
2580
- "primaryKey": false,
2581
- "notNull": true
2582
- },
2583
- "updated_at": {
2584
- "name": "updated_at",
2585
- "type": "timestamp with time zone",
2586
- "primaryKey": false,
2587
- "notNull": true,
2588
- "default": "now()"
2589
- }
2590
- },
2591
- "indexes": {
2592
- "idx_data_source_table_usage_source": {
2593
- "name": "idx_data_source_table_usage_source",
2594
- "columns": [
2595
- {
2596
- "expression": "data_source_id",
2597
- "isExpression": false,
2598
- "asc": true,
2599
- "nulls": "last"
2600
- }
2601
- ],
2602
- "isUnique": true,
2603
- "concurrently": false,
2604
- "method": "btree",
2605
- "with": {}
2606
- },
2607
- "idx_data_source_table_usage_org": {
2608
- "name": "idx_data_source_table_usage_org",
2609
- "columns": [
2610
- {
2611
- "expression": "organization_id",
2612
- "isExpression": false,
2613
- "asc": true,
2614
- "nulls": "last"
2615
- }
2616
- ],
2617
- "isUnique": false,
2618
- "concurrently": false,
2619
- "method": "btree",
2620
- "with": {}
2621
- },
2622
- "idx_data_source_table_usage_provider": {
2623
- "name": "idx_data_source_table_usage_provider",
2624
- "columns": [
2625
- {
2626
- "expression": "provider",
2627
- "isExpression": false,
2628
- "asc": true,
2629
- "nulls": "last"
2630
- }
2631
- ],
2632
- "isUnique": false,
2633
- "concurrently": false,
2634
- "method": "btree",
2635
- "with": {}
2636
- },
2637
- "idx_data_source_table_usage_generated_at": {
2638
- "name": "idx_data_source_table_usage_generated_at",
2639
- "columns": [
2640
- {
2641
- "expression": "generated_at",
2642
- "isExpression": false,
2643
- "asc": true,
2644
- "nulls": "last"
2645
- }
2646
- ],
2647
- "isUnique": false,
2648
- "concurrently": false,
2649
- "method": "btree",
2650
- "with": {}
2651
- }
2652
- },
2653
- "foreignKeys": {
2654
- "data_source_table_usage_data_source_id_data_sources_id_fk": {
2655
- "name": "data_source_table_usage_data_source_id_data_sources_id_fk",
2656
- "tableFrom": "data_source_table_usage",
2657
- "tableTo": "data_sources",
2658
- "columnsFrom": ["data_source_id"],
2659
- "columnsTo": ["id"],
2660
- "onDelete": "cascade",
2661
- "onUpdate": "no action"
2662
- },
2663
- "data_source_table_usage_memo_updated_by_user_id_fk": {
2664
- "name": "data_source_table_usage_memo_updated_by_user_id_fk",
2665
- "tableFrom": "data_source_table_usage",
2666
- "tableTo": "user",
2667
- "columnsFrom": ["memo_updated_by"],
2668
- "columnsTo": ["id"],
2669
- "onDelete": "set null",
2670
- "onUpdate": "no action"
2671
- },
2672
- "data_source_table_usage_organization_id_organization_id_fk": {
2673
- "name": "data_source_table_usage_organization_id_organization_id_fk",
2674
- "tableFrom": "data_source_table_usage",
2675
- "tableTo": "organization",
2676
- "columnsFrom": ["organization_id"],
2677
- "columnsTo": ["id"],
2678
- "onDelete": "cascade",
2679
- "onUpdate": "no action"
2680
- }
2681
- },
2682
- "compositePrimaryKeys": {},
2683
- "uniqueConstraints": {},
2684
- "policies": {},
2685
- "checkConstraints": {},
2686
- "isRLSEnabled": true
2687
- },
2688
- "public.organization_profiles": {
2689
- "name": "organization_profiles",
2690
- "schema": "",
2691
- "columns": {
2692
- "id": {
2693
- "name": "id",
2694
- "type": "text",
2695
- "primaryKey": true,
2696
- "notNull": true
2697
- },
2698
- "organization_id": {
2699
- "name": "organization_id",
2700
- "type": "text",
2701
- "primaryKey": false,
2702
- "notNull": true
2703
- },
2704
- "north_star_metric": {
2705
- "name": "north_star_metric",
2706
- "type": "text",
2707
- "primaryKey": false,
2708
- "notNull": false
2709
- },
2710
- "kpis": {
2711
- "name": "kpis",
2712
- "type": "jsonb",
2713
- "primaryKey": false,
2714
- "notNull": true,
2715
- "default": "'[]'::jsonb"
2716
- },
2717
- "website_url": {
2718
- "name": "website_url",
2719
- "type": "text",
2720
- "primaryKey": false,
2721
- "notNull": false
2722
- },
2723
- "monthly_budget_usd": {
2724
- "name": "monthly_budget_usd",
2725
- "type": "double precision",
2726
- "primaryKey": false,
2727
- "notNull": false
2728
- },
2729
- "created_at": {
2730
- "name": "created_at",
2731
- "type": "timestamp with time zone",
2732
- "primaryKey": false,
2733
- "notNull": true,
2734
- "default": "now()"
2735
- },
2736
- "updated_at": {
2737
- "name": "updated_at",
2738
- "type": "timestamp with time zone",
2739
- "primaryKey": false,
2740
- "notNull": true,
2741
- "default": "now()"
2742
- }
2743
- },
2744
- "indexes": {
2745
- "idx_org_profiles_org": {
2746
- "name": "idx_org_profiles_org",
2747
- "columns": [
2748
- {
2749
- "expression": "organization_id",
2750
- "isExpression": false,
2751
- "asc": true,
2752
- "nulls": "last"
2753
- }
2754
- ],
2755
- "isUnique": true,
2756
- "concurrently": false,
2757
- "method": "btree",
2758
- "with": {}
2759
- },
2760
- "idx_org_profiles_created": {
2761
- "name": "idx_org_profiles_created",
2762
- "columns": [
2763
- {
2764
- "expression": "created_at",
2765
- "isExpression": false,
2766
- "asc": true,
2767
- "nulls": "last"
2768
- }
2769
- ],
2770
- "isUnique": false,
2771
- "concurrently": false,
2772
- "method": "btree",
2773
- "with": {}
2774
- }
2775
- },
2776
- "foreignKeys": {
2777
- "organization_profiles_organization_id_organization_id_fk": {
2778
- "name": "organization_profiles_organization_id_organization_id_fk",
2779
- "tableFrom": "organization_profiles",
2780
- "tableTo": "organization",
2781
- "columnsFrom": ["organization_id"],
2782
- "columnsTo": ["id"],
2783
- "onDelete": "cascade",
2784
- "onUpdate": "no action"
2785
- }
2786
- },
2787
- "compositePrimaryKeys": {},
2788
- "uniqueConstraints": {},
2789
- "policies": {},
2790
- "checkConstraints": {},
2791
- "isRLSEnabled": true
2792
- },
2793
- "public.user_profiles": {
2794
- "name": "user_profiles",
2795
- "schema": "",
2796
- "columns": {
2797
- "created_at": {
2798
- "name": "created_at",
2799
- "type": "timestamp with time zone",
2800
- "primaryKey": false,
2801
- "notNull": true,
2802
- "default": "now()"
2803
- },
2804
- "id": {
2805
- "name": "id",
2806
- "type": "text",
2807
- "primaryKey": true,
2808
- "notNull": true
2809
- },
2810
- "updated_at": {
2811
- "name": "updated_at",
2812
- "type": "timestamp with time zone",
2813
- "primaryKey": false,
2814
- "notNull": true,
2815
- "default": "now()"
2816
- },
2817
- "user_id": {
2818
- "name": "user_id",
2819
- "type": "text",
2820
- "primaryKey": false,
2821
- "notNull": true
2822
- }
2823
- },
2824
- "indexes": {
2825
- "idx_user_profiles_user": {
2826
- "name": "idx_user_profiles_user",
2827
- "columns": [
2828
- {
2829
- "expression": "user_id",
2830
- "isExpression": false,
2831
- "asc": true,
2832
- "nulls": "last"
2833
- }
2834
- ],
2835
- "isUnique": true,
2836
- "concurrently": false,
2837
- "method": "btree",
2838
- "with": {}
2839
- }
2840
- },
2841
- "foreignKeys": {
2842
- "user_profiles_user_id_user_id_fk": {
2843
- "name": "user_profiles_user_id_user_id_fk",
2844
- "tableFrom": "user_profiles",
2845
- "tableTo": "user",
2846
- "columnsFrom": ["user_id"],
2847
- "columnsTo": ["id"],
2848
- "onDelete": "cascade",
2849
- "onUpdate": "no action"
2850
- }
2851
- },
2852
- "compositePrimaryKeys": {},
2853
- "uniqueConstraints": {},
2854
- "policies": {},
2855
- "checkConstraints": {},
2856
- "isRLSEnabled": true
2857
- }
2858
- },
2859
- "enums": {},
2860
- "schemas": {},
2861
- "sequences": {},
2862
- "roles": {},
2863
- "policies": {},
2864
- "views": {},
2865
- "_meta": {
2866
- "columns": {},
2867
- "schemas": {},
2868
- "tables": {}
2869
- }
2870
- }