@onequery/cli 0.1.65-win32-arm64 → 0.1.65

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/aarch64-pc-windows-msvc/onequery/onequery.exe +0 -0
  7. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/CompositeItem-BB408Cyb.js +0 -1
  8. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/CompositeList-DbbDW_rT.js +0 -1
  9. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/DialogTitle-ChNkcIa6.js +0 -1
  10. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/IconArrowRight-DsOD7mDl.js +0 -1
  11. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/IconCheck-Gc24xPT2.js +0 -1
  12. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/IconChevronDown-B-39MA7-.js +0 -1
  13. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/IconChevronRight-DD16tNHZ.js +0 -1
  14. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/IconCoins-C7Nn0L6R.js +0 -1
  15. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/IconHistory-DuLS8PKF.js +0 -1
  16. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/IconLoader2-BpZcTuHV.js +0 -1
  17. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/IconPlus-CZiRiEUF.js +0 -1
  18. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/IconTerminal2-PxNqcz3d.js +0 -1
  19. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/IconX-rRpRFwc5.js +0 -1
  20. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/Separator-M05FshHx.js +0 -1
  21. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/_authenticated-CcSc_Pt7.js +0 -1
  22. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/_org_slug-BvJDit6U.js +0 -1
  23. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/alert-BIGxI3XN.js +0 -1
  24. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/api-base-url-DIb6qukm.js +0 -1
  25. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/api-client-tp8XTpAa.js +0 -1
  26. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/api-paths-DcYkf-C_.js +0 -1
  27. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/app-routes-CMyon6Em.js +0 -1
  28. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/audit-CdPU9Jf2.js +0 -2
  29. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/auth-bootstrap-query-B1MHd_NV.js +0 -1
  30. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/auth-client-D-YHMy0G.js +0 -3
  31. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/avatar-SaFoLofF.js +0 -1
  32. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/badge-BFPkSrVD.js +0 -1
  33. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/budget-CX5MplAP.js +0 -1
  34. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/callback-BWQ3ETBy.js +0 -1
  35. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/card-Dllm2lhp.js +0 -1
  36. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/checkbox-Bii9Pcrx.js +0 -1
  37. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/compiler-runtime-DCc3R3Xn.js +0 -1
  38. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/connect-database-C1Jb2l53.js +0 -1
  39. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/copy-button-BO1KBdf9.js +0 -1
  40. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/create-org-BSzKv5ue.js +0 -1
  41. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/createReactComponent-_L2mp4Ui.js +0 -1
  42. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/data-source-connection-form-CbDL0cgG.js +0 -273
  43. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/device-Bbz7apAX.js +0 -1
  44. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/dist-BNi06Dzx.js +0 -3
  45. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/dropdown-menu-Cw2MW0pD.js +0 -1
  46. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/empty-DjRo5ytz.js +0 -1
  47. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/format-date-Rg05aHXh.js +0 -1
  48. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/getDisabledMountTransitionStyles-C0uz3iMh.js +0 -1
  49. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/getPseudoElementBounds-CRlxTrfr.js +0 -12
  50. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/home-BNjpNKdt.js +0 -1
  51. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/index-B4OsjuJp.css +0 -2
  52. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/index-CXR0dKJj.js +0 -10
  53. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/input-BRu0b1Tq.js +0 -1
  54. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/integrations-BWC7iPQ5.js +0 -1
  55. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
  56. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
  57. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
  58. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
  59. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
  60. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
  61. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
  62. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/invite._invitationId-DmJnR4R5.js +0 -1
  63. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/jsx-runtime-DG_AJzB_.js +0 -1
  64. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/label-f2wVZcni.js +0 -1
  65. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/link-Cgvqhh5w.js +0 -1
  66. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/matchContext-CDajBC0L.js +0 -1
  67. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/organization-permissions-BXV_ess0.js +0 -1
  68. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/organization-query-keys-ieaSNxMR.js +0 -1
  69. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/query-CY--GYXb.js +0 -1
  70. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/query-timing-YBkSOxxF.js +0 -1
  71. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/queryOptions-bXtOUR_h.js +0 -1
  72. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/routes-CxJ2aoMf.js +0 -1
  73. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/schemas-EcBBwCo1.js +0 -64
  74. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/select-yNaL0SXM.js +0 -1
  75. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/separator-BH7Gsum-.js +0 -1
  76. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/settings-C8us2bWX.js +0 -1
  77. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/signin-BgfqB9QB.js +0 -1
  78. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/src-C5F1uEDb.js +0 -1
  79. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/team-CYPsHFTt.js +0 -1
  80. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/textarea-CnA77PLS.js +0 -1
  81. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/theme-toggle-CRaDbyxE.js +0 -1
  82. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/use-optimistic-mutation-3PPnMc-O.js +0 -1
  83. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/useBaseQuery-CO5Q8xm4.js +0 -1
  84. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/useBaseUiId-CtNp109T.js +0 -1
  85. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/useCompositeItem-D243hyne.js +0 -1
  86. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/useControlled-C-85HRFr.js +0 -1
  87. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/useQuery-DyOxsY45.js +0 -1
  88. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/useRender-CzpKCg11.js +0 -1
  89. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/useRouterState-DpT8luFk.js +0 -1
  90. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/useSuspenseQuery-CBFRU4At.js +0 -1
  91. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/useValueChanged-BNrgSVVM.js +0 -1
  92. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/utils-C8DGLIgm.js +0 -1
  93. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/xstate-react.esm-Bo3CCIRt.js +0 -1
  94. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/assets/zod-D0PWrP9q.js +0 -1
  95. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/favicon.ico +0 -0
  96. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/amplitude/step1_settings_sidebar.png +0 -0
  97. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/amplitude/step2_projects.png +0 -0
  98. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/amplitude/step3_project_keys.png +0 -0
  99. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/amplitude/step4_api_keys.png +0 -0
  100. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/bigquery/step1_service_accounts.png +0 -0
  101. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/bigquery/step2_bigquery_roles.png +0 -0
  102. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/bigquery/step3_add_key_menu.png +0 -0
  103. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/bigquery/step4_create_json_key.png +0 -0
  104. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/cloudflare-workers-observability/step2_enable_workers_logs.png +0 -0
  105. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/cloudflare-workers-observability/step3_user_api_tokens.png +0 -0
  106. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/cloudflare-workers-observability/step4_create_api_token.png +0 -0
  107. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/cloudflare-workers-observability/step5_workers_pages_account_id.png +0 -0
  108. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/cloudflare-workers-observability/step6_workers_observability_permission.png +0 -0
  109. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/ga4/step1_service_accounts.png +0 -0
  110. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/ga4/step2_create_json_key.png +0 -0
  111. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/ga4/step3_add_user_viewer.png +0 -0
  112. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/ga4/step4_property_details.png +0 -0
  113. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/github-token-guide/step1_signin.png +0 -0
  114. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/github-token-guide/step2_new_fine_grained_token_sanitized.png +0 -0
  115. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/github-token-guide/step3_permissions_configured_sanitized.png +0 -0
  116. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/github-token-guide/step4_token_created_sanitized.png +0 -0
  117. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/google-search-console/step1_confirm_property.png +0 -0
  118. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/google-search-console/step2_scope_selected.png +0 -0
  119. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/google-search-console/step3_copy_access_token.png +0 -0
  120. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/mixpanel/step1_service_accounts.png +0 -0
  121. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/mixpanel/step2_create_service_account.png +0 -0
  122. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/mixpanel/step3_credentials.png +0 -0
  123. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/mixpanel/step4_project_settings.png +0 -0
  124. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/postgresql/step1_create_user.png +0 -0
  125. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/postgresql/step2_connection.png +0 -0
  126. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/posthog/step1_project_settings.png +0 -0
  127. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/posthog/step2_personal_api_keys.png +0 -0
  128. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/posthog/step3_create_key_modal.png +0 -0
  129. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/rds/step1_connect.png +0 -0
  130. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/rds/step2_create_user.png +0 -0
  131. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/rds/step3_grant.png +0 -0
  132. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/rds/step4_info.png +0 -0
  133. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/sentry/step1_personal_tokens.png +0 -0
  134. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/sentry/step2_create_token_permissions.png +0 -0
  135. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/sentry/step3_organization_slug.png +0 -0
  136. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/sentry/step4_project_slug.png +0 -0
  137. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/vercel/step1_tokens_page.png +0 -0
  138. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/images/vercel/step2_configure_token.png +0 -0
  139. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/index.html +0 -47
  140. package/vendor/aarch64-pc-windows-msvc/runtime/dashboard/onequery.svg +0 -44
  141. package/vendor/aarch64-pc-windows-msvc/runtime/migrations/20260327065242_curious_nightmare.sql +0 -403
  142. package/vendor/aarch64-pc-windows-msvc/runtime/migrations/20260403103652_slippery_hellfire_club.sql +0 -8
  143. package/vendor/aarch64-pc-windows-msvc/runtime/migrations/20260403112219_gigantic_namora.sql +0 -1
  144. package/vendor/aarch64-pc-windows-msvc/runtime/migrations/20260420071232_previous_justin_hammer.sql +0 -141
  145. package/vendor/aarch64-pc-windows-msvc/runtime/migrations/20260420093157_spooky_cassandra_nova.sql +0 -29
  146. package/vendor/aarch64-pc-windows-msvc/runtime/migrations/20260420101631_even_ogun.sql +0 -5
  147. package/vendor/aarch64-pc-windows-msvc/runtime/migrations/20260425110519_smart_amazoness.sql +0 -8
  148. package/vendor/aarch64-pc-windows-msvc/runtime/migrations/20260428033542_rename_source_query_interface_missing.sql +0 -36
  149. package/vendor/aarch64-pc-windows-msvc/runtime/migrations/20260430114113_jittery_scorpion.sql +0 -28
  150. package/vendor/aarch64-pc-windows-msvc/runtime/migrations/20260430135906_flippant_timeslip.sql +0 -4
  151. package/vendor/aarch64-pc-windows-msvc/runtime/migrations/20260502000100_drop_old_workflow_audit_tables.sql +0 -15
  152. package/vendor/aarch64-pc-windows-msvc/runtime/migrations/20260503011110_moaning_jack_flag.sql +0 -22
  153. package/vendor/aarch64-pc-windows-msvc/runtime/migrations/20260514143216_reset_workflow_audit_history.sql +0 -20
  154. package/vendor/aarch64-pc-windows-msvc/runtime/migrations/20260524081943_colorful_firelord.sql +0 -1
  155. package/vendor/aarch64-pc-windows-msvc/runtime/migrations/meta/20260327065242_snapshot.json +0 -2817
  156. package/vendor/aarch64-pc-windows-msvc/runtime/migrations/meta/20260403103652_snapshot.json +0 -2864
  157. package/vendor/aarch64-pc-windows-msvc/runtime/migrations/meta/20260403112219_snapshot.json +0 -2870
  158. package/vendor/aarch64-pc-windows-msvc/runtime/migrations/meta/20260420071232_snapshot.json +0 -3879
  159. package/vendor/aarch64-pc-windows-msvc/runtime/migrations/meta/20260420093157_snapshot.json +0 -4088
  160. package/vendor/aarch64-pc-windows-msvc/runtime/migrations/meta/20260420101631_snapshot.json +0 -3250
  161. package/vendor/aarch64-pc-windows-msvc/runtime/migrations/meta/20260425110519_snapshot.json +0 -3250
  162. package/vendor/aarch64-pc-windows-msvc/runtime/migrations/meta/20260428033542_snapshot.json +0 -3250
  163. package/vendor/aarch64-pc-windows-msvc/runtime/migrations/meta/20260430114113_snapshot.json +0 -3507
  164. package/vendor/aarch64-pc-windows-msvc/runtime/migrations/meta/20260430135906_snapshot.json +0 -3531
  165. package/vendor/aarch64-pc-windows-msvc/runtime/migrations/meta/20260503011110_snapshot.json +0 -3089
  166. package/vendor/aarch64-pc-windows-msvc/runtime/migrations/meta/20260524081943_snapshot.json +0 -3082
  167. package/vendor/aarch64-pc-windows-msvc/runtime/migrations/meta/_journal.json +0 -104
  168. package/vendor/aarch64-pc-windows-msvc/runtime/pglite/initdb.wasm +0 -0
  169. package/vendor/aarch64-pc-windows-msvc/runtime/pglite/pglite.data +0 -0
  170. package/vendor/aarch64-pc-windows-msvc/runtime/pglite/pglite.wasm +0 -0
  171. package/vendor/aarch64-pc-windows-msvc/server/onequery-server.mjs +0 -447972
  172. package/vendor/aarch64-pc-windows-msvc/server/polyglot_sql_wasm_bg.wasm +0 -0
@@ -1,2864 +0,0 @@
1
- {
2
- "id": "844bfd84-7118-453f-927f-4c421a92dd05",
3
- "prevId": "fdae119f-e504-4aa2-ab94-240d864fcec5",
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
- "count": {
537
- "name": "count",
538
- "type": "integer",
539
- "primaryKey": false,
540
- "notNull": true
541
- },
542
- "key": {
543
- "name": "key",
544
- "type": "text",
545
- "primaryKey": false,
546
- "notNull": true
547
- },
548
- "last_request": {
549
- "name": "last_request",
550
- "type": "bigint",
551
- "primaryKey": false,
552
- "notNull": true
553
- }
554
- },
555
- "indexes": {
556
- "rate_limit_key_key": {
557
- "name": "rate_limit_key_key",
558
- "columns": [
559
- {
560
- "expression": "key",
561
- "isExpression": false,
562
- "asc": true,
563
- "nulls": "last"
564
- }
565
- ],
566
- "isUnique": true,
567
- "concurrently": false,
568
- "method": "btree",
569
- "with": {}
570
- }
571
- },
572
- "foreignKeys": {},
573
- "compositePrimaryKeys": {},
574
- "uniqueConstraints": {},
575
- "policies": {},
576
- "checkConstraints": {},
577
- "isRLSEnabled": true
578
- },
579
- "public.session": {
580
- "name": "session",
581
- "schema": "",
582
- "columns": {
583
- "active_organization_id": {
584
- "name": "active_organization_id",
585
- "type": "text",
586
- "primaryKey": false,
587
- "notNull": false
588
- },
589
- "created_at": {
590
- "name": "created_at",
591
- "type": "timestamp",
592
- "primaryKey": false,
593
- "notNull": true,
594
- "default": "now()"
595
- },
596
- "expires_at": {
597
- "name": "expires_at",
598
- "type": "timestamp",
599
- "primaryKey": false,
600
- "notNull": true
601
- },
602
- "id": {
603
- "name": "id",
604
- "type": "text",
605
- "primaryKey": true,
606
- "notNull": true
607
- },
608
- "ip_address": {
609
- "name": "ip_address",
610
- "type": "text",
611
- "primaryKey": false,
612
- "notNull": false
613
- },
614
- "token": {
615
- "name": "token",
616
- "type": "text",
617
- "primaryKey": false,
618
- "notNull": true
619
- },
620
- "updated_at": {
621
- "name": "updated_at",
622
- "type": "timestamp",
623
- "primaryKey": false,
624
- "notNull": true,
625
- "default": "now()"
626
- },
627
- "user_agent": {
628
- "name": "user_agent",
629
- "type": "text",
630
- "primaryKey": false,
631
- "notNull": false
632
- },
633
- "user_id": {
634
- "name": "user_id",
635
- "type": "text",
636
- "primaryKey": false,
637
- "notNull": true
638
- }
639
- },
640
- "indexes": {
641
- "session_userId_idx": {
642
- "name": "session_userId_idx",
643
- "columns": [
644
- {
645
- "expression": "user_id",
646
- "isExpression": false,
647
- "asc": true,
648
- "nulls": "last"
649
- }
650
- ],
651
- "isUnique": false,
652
- "concurrently": false,
653
- "method": "btree",
654
- "with": {}
655
- }
656
- },
657
- "foreignKeys": {
658
- "session_active_organization_id_organization_id_fk": {
659
- "name": "session_active_organization_id_organization_id_fk",
660
- "tableFrom": "session",
661
- "tableTo": "organization",
662
- "columnsFrom": ["active_organization_id"],
663
- "columnsTo": ["id"],
664
- "onDelete": "set null",
665
- "onUpdate": "no action"
666
- },
667
- "session_user_id_user_id_fk": {
668
- "name": "session_user_id_user_id_fk",
669
- "tableFrom": "session",
670
- "tableTo": "user",
671
- "columnsFrom": ["user_id"],
672
- "columnsTo": ["id"],
673
- "onDelete": "cascade",
674
- "onUpdate": "no action"
675
- }
676
- },
677
- "compositePrimaryKeys": {},
678
- "uniqueConstraints": {
679
- "session_token_unique": {
680
- "name": "session_token_unique",
681
- "nullsNotDistinct": false,
682
- "columns": ["token"]
683
- }
684
- },
685
- "policies": {},
686
- "checkConstraints": {},
687
- "isRLSEnabled": true
688
- },
689
- "public.user": {
690
- "name": "user",
691
- "schema": "",
692
- "columns": {
693
- "created_at": {
694
- "name": "created_at",
695
- "type": "timestamp",
696
- "primaryKey": false,
697
- "notNull": true,
698
- "default": "now()"
699
- },
700
- "email": {
701
- "name": "email",
702
- "type": "text",
703
- "primaryKey": false,
704
- "notNull": true
705
- },
706
- "email_verified": {
707
- "name": "email_verified",
708
- "type": "boolean",
709
- "primaryKey": false,
710
- "notNull": true,
711
- "default": false
712
- },
713
- "id": {
714
- "name": "id",
715
- "type": "text",
716
- "primaryKey": true,
717
- "notNull": true
718
- },
719
- "image": {
720
- "name": "image",
721
- "type": "text",
722
- "primaryKey": false,
723
- "notNull": false
724
- },
725
- "name": {
726
- "name": "name",
727
- "type": "text",
728
- "primaryKey": false,
729
- "notNull": true
730
- },
731
- "updated_at": {
732
- "name": "updated_at",
733
- "type": "timestamp",
734
- "primaryKey": false,
735
- "notNull": true,
736
- "default": "now()"
737
- }
738
- },
739
- "indexes": {},
740
- "foreignKeys": {},
741
- "compositePrimaryKeys": {},
742
- "uniqueConstraints": {
743
- "user_email_unique": {
744
- "name": "user_email_unique",
745
- "nullsNotDistinct": false,
746
- "columns": ["email"]
747
- }
748
- },
749
- "policies": {},
750
- "checkConstraints": {},
751
- "isRLSEnabled": true
752
- },
753
- "public.verification": {
754
- "name": "verification",
755
- "schema": "",
756
- "columns": {
757
- "created_at": {
758
- "name": "created_at",
759
- "type": "timestamp",
760
- "primaryKey": false,
761
- "notNull": true,
762
- "default": "now()"
763
- },
764
- "expires_at": {
765
- "name": "expires_at",
766
- "type": "timestamp",
767
- "primaryKey": false,
768
- "notNull": true
769
- },
770
- "id": {
771
- "name": "id",
772
- "type": "text",
773
- "primaryKey": true,
774
- "notNull": true
775
- },
776
- "identifier": {
777
- "name": "identifier",
778
- "type": "text",
779
- "primaryKey": false,
780
- "notNull": true
781
- },
782
- "updated_at": {
783
- "name": "updated_at",
784
- "type": "timestamp",
785
- "primaryKey": false,
786
- "notNull": true,
787
- "default": "now()"
788
- },
789
- "value": {
790
- "name": "value",
791
- "type": "text",
792
- "primaryKey": false,
793
- "notNull": true
794
- }
795
- },
796
- "indexes": {
797
- "verification_identifier_idx": {
798
- "name": "verification_identifier_idx",
799
- "columns": [
800
- {
801
- "expression": "identifier",
802
- "isExpression": false,
803
- "asc": true,
804
- "nulls": "last"
805
- }
806
- ],
807
- "isUnique": false,
808
- "concurrently": false,
809
- "method": "btree",
810
- "with": {}
811
- }
812
- },
813
- "foreignKeys": {},
814
- "compositePrimaryKeys": {},
815
- "uniqueConstraints": {},
816
- "policies": {},
817
- "checkConstraints": {},
818
- "isRLSEnabled": true
819
- },
820
- "public.bigquery_query_costs": {
821
- "name": "bigquery_query_costs",
822
- "schema": "",
823
- "columns": {
824
- "actual_bytes_billed": {
825
- "name": "actual_bytes_billed",
826
- "type": "bigint",
827
- "primaryKey": false,
828
- "notNull": false
829
- },
830
- "actual_bytes_processed": {
831
- "name": "actual_bytes_processed",
832
- "type": "bigint",
833
- "primaryKey": false,
834
- "notNull": false
835
- },
836
- "actual_cost_usd": {
837
- "name": "actual_cost_usd",
838
- "type": "double precision",
839
- "primaryKey": false,
840
- "notNull": false
841
- },
842
- "cache_hit": {
843
- "name": "cache_hit",
844
- "type": "boolean",
845
- "primaryKey": false,
846
- "notNull": false
847
- },
848
- "connection_name": {
849
- "name": "connection_name",
850
- "type": "text",
851
- "primaryKey": false,
852
- "notNull": true
853
- },
854
- "created_at": {
855
- "name": "created_at",
856
- "type": "timestamp with time zone",
857
- "primaryKey": false,
858
- "notNull": true,
859
- "default": "now()"
860
- },
861
- "currency": {
862
- "name": "currency",
863
- "type": "text",
864
- "primaryKey": false,
865
- "notNull": true,
866
- "default": "'USD'"
867
- },
868
- "estimated_bytes_processed": {
869
- "name": "estimated_bytes_processed",
870
- "type": "bigint",
871
- "primaryKey": false,
872
- "notNull": false
873
- },
874
- "estimated_cost_usd": {
875
- "name": "estimated_cost_usd",
876
- "type": "double precision",
877
- "primaryKey": false,
878
- "notNull": false
879
- },
880
- "executed_at": {
881
- "name": "executed_at",
882
- "type": "timestamp with time zone",
883
- "primaryKey": false,
884
- "notNull": true
885
- },
886
- "id": {
887
- "name": "id",
888
- "type": "text",
889
- "primaryKey": true,
890
- "notNull": true
891
- },
892
- "job_id": {
893
- "name": "job_id",
894
- "type": "text",
895
- "primaryKey": false,
896
- "notNull": false
897
- },
898
- "location": {
899
- "name": "location",
900
- "type": "text",
901
- "primaryKey": false,
902
- "notNull": false
903
- },
904
- "organization_id": {
905
- "name": "organization_id",
906
- "type": "text",
907
- "primaryKey": false,
908
- "notNull": true
909
- },
910
- "pricing_model": {
911
- "name": "pricing_model",
912
- "type": "text",
913
- "primaryKey": false,
914
- "notNull": true,
915
- "default": "'unknown'"
916
- },
917
- "query_id": {
918
- "name": "query_id",
919
- "type": "text",
920
- "primaryKey": false,
921
- "notNull": true
922
- },
923
- "tool_call_id": {
924
- "name": "tool_call_id",
925
- "type": "text",
926
- "primaryKey": false,
927
- "notNull": true
928
- }
929
- },
930
- "indexes": {
931
- "idx_bigquery_query_costs_org": {
932
- "name": "idx_bigquery_query_costs_org",
933
- "columns": [
934
- {
935
- "expression": "organization_id",
936
- "isExpression": false,
937
- "asc": true,
938
- "nulls": "last"
939
- }
940
- ],
941
- "isUnique": false,
942
- "concurrently": false,
943
- "method": "btree",
944
- "with": {}
945
- },
946
- "idx_bigquery_query_costs_executed_at": {
947
- "name": "idx_bigquery_query_costs_executed_at",
948
- "columns": [
949
- {
950
- "expression": "executed_at",
951
- "isExpression": false,
952
- "asc": true,
953
- "nulls": "last"
954
- }
955
- ],
956
- "isUnique": false,
957
- "concurrently": false,
958
- "method": "btree",
959
- "with": {}
960
- }
961
- },
962
- "foreignKeys": {
963
- "bigquery_query_costs_organization_id_organization_id_fk": {
964
- "name": "bigquery_query_costs_organization_id_organization_id_fk",
965
- "tableFrom": "bigquery_query_costs",
966
- "tableTo": "organization",
967
- "columnsFrom": ["organization_id"],
968
- "columnsTo": ["id"],
969
- "onDelete": "cascade",
970
- "onUpdate": "no action"
971
- }
972
- },
973
- "compositePrimaryKeys": {},
974
- "uniqueConstraints": {},
975
- "policies": {},
976
- "checkConstraints": {},
977
- "isRLSEnabled": true
978
- },
979
- "public.cli_query_actions": {
980
- "name": "cli_query_actions",
981
- "schema": "",
982
- "columns": {
983
- "id": {
984
- "name": "id",
985
- "type": "text",
986
- "primaryKey": true,
987
- "notNull": true
988
- },
989
- "organization_id": {
990
- "name": "organization_id",
991
- "type": "text",
992
- "primaryKey": false,
993
- "notNull": true
994
- },
995
- "actor_user_id": {
996
- "name": "actor_user_id",
997
- "type": "text",
998
- "primaryKey": false,
999
- "notNull": true
1000
- },
1001
- "actor_email": {
1002
- "name": "actor_email",
1003
- "type": "text",
1004
- "primaryKey": false,
1005
- "notNull": true
1006
- },
1007
- "actor_auth_mode": {
1008
- "name": "actor_auth_mode",
1009
- "type": "text",
1010
- "primaryKey": false,
1011
- "notNull": true
1012
- },
1013
- "actor_membership_roles": {
1014
- "name": "actor_membership_roles",
1015
- "type": "jsonb",
1016
- "primaryKey": false,
1017
- "notNull": true
1018
- },
1019
- "request_id": {
1020
- "name": "request_id",
1021
- "type": "text",
1022
- "primaryKey": false,
1023
- "notNull": true
1024
- },
1025
- "action_type": {
1026
- "name": "action_type",
1027
- "type": "text",
1028
- "primaryKey": false,
1029
- "notNull": true
1030
- },
1031
- "stage": {
1032
- "name": "stage",
1033
- "type": "text",
1034
- "primaryKey": false,
1035
- "notNull": true,
1036
- "default": "'received'"
1037
- },
1038
- "status": {
1039
- "name": "status",
1040
- "type": "text",
1041
- "primaryKey": false,
1042
- "notNull": true,
1043
- "default": "'pending'"
1044
- },
1045
- "usage_persistence_status": {
1046
- "name": "usage_persistence_status",
1047
- "type": "text",
1048
- "primaryKey": false,
1049
- "notNull": true,
1050
- "default": "'not_started'"
1051
- },
1052
- "source_key": {
1053
- "name": "source_key",
1054
- "type": "text",
1055
- "primaryKey": false,
1056
- "notNull": true
1057
- },
1058
- "source_id": {
1059
- "name": "source_id",
1060
- "type": "text",
1061
- "primaryKey": false,
1062
- "notNull": false
1063
- },
1064
- "provider": {
1065
- "name": "provider",
1066
- "type": "text",
1067
- "primaryKey": false,
1068
- "notNull": false
1069
- },
1070
- "source_status": {
1071
- "name": "source_status",
1072
- "type": "text",
1073
- "primaryKey": false,
1074
- "notNull": false
1075
- },
1076
- "sql": {
1077
- "name": "sql",
1078
- "type": "text",
1079
- "primaryKey": false,
1080
- "notNull": true
1081
- },
1082
- "normalized_sql": {
1083
- "name": "normalized_sql",
1084
- "type": "text",
1085
- "primaryKey": false,
1086
- "notNull": false
1087
- },
1088
- "max_rows": {
1089
- "name": "max_rows",
1090
- "type": "integer",
1091
- "primaryKey": false,
1092
- "notNull": false
1093
- },
1094
- "max_bytes": {
1095
- "name": "max_bytes",
1096
- "type": "integer",
1097
- "primaryKey": false,
1098
- "notNull": false
1099
- },
1100
- "cell_max_chars": {
1101
- "name": "cell_max_chars",
1102
- "type": "integer",
1103
- "primaryKey": false,
1104
- "notNull": false
1105
- },
1106
- "timeout_ms": {
1107
- "name": "timeout_ms",
1108
- "type": "integer",
1109
- "primaryKey": false,
1110
- "notNull": false
1111
- },
1112
- "normalized_sql_changed": {
1113
- "name": "normalized_sql_changed",
1114
- "type": "boolean",
1115
- "primaryKey": false,
1116
- "notNull": true,
1117
- "default": false
1118
- },
1119
- "row_count": {
1120
- "name": "row_count",
1121
- "type": "integer",
1122
- "primaryKey": false,
1123
- "notNull": false
1124
- },
1125
- "elapsed_ms": {
1126
- "name": "elapsed_ms",
1127
- "type": "integer",
1128
- "primaryKey": false,
1129
- "notNull": false
1130
- },
1131
- "error_detail": {
1132
- "name": "error_detail",
1133
- "type": "text",
1134
- "primaryKey": false,
1135
- "notNull": false
1136
- },
1137
- "error_hint": {
1138
- "name": "error_hint",
1139
- "type": "text",
1140
- "primaryKey": false,
1141
- "notNull": false
1142
- },
1143
- "retryable": {
1144
- "name": "retryable",
1145
- "type": "boolean",
1146
- "primaryKey": false,
1147
- "notNull": false
1148
- },
1149
- "last_event_id": {
1150
- "name": "last_event_id",
1151
- "type": "text",
1152
- "primaryKey": false,
1153
- "notNull": false
1154
- },
1155
- "last_event_at": {
1156
- "name": "last_event_at",
1157
- "type": "timestamp with time zone",
1158
- "primaryKey": false,
1159
- "notNull": true,
1160
- "default": "now()"
1161
- },
1162
- "completed_at": {
1163
- "name": "completed_at",
1164
- "type": "timestamp with time zone",
1165
- "primaryKey": false,
1166
- "notNull": false
1167
- },
1168
- "created_at": {
1169
- "name": "created_at",
1170
- "type": "timestamp with time zone",
1171
- "primaryKey": false,
1172
- "notNull": true,
1173
- "default": "now()"
1174
- },
1175
- "updated_at": {
1176
- "name": "updated_at",
1177
- "type": "timestamp with time zone",
1178
- "primaryKey": false,
1179
- "notNull": true,
1180
- "default": "now()"
1181
- },
1182
- "version": {
1183
- "name": "version",
1184
- "type": "integer",
1185
- "primaryKey": false,
1186
- "notNull": true,
1187
- "default": 1
1188
- }
1189
- },
1190
- "indexes": {
1191
- "idx_cli_query_actions_org_created": {
1192
- "name": "idx_cli_query_actions_org_created",
1193
- "columns": [
1194
- {
1195
- "expression": "organization_id",
1196
- "isExpression": false,
1197
- "asc": true,
1198
- "nulls": "last"
1199
- },
1200
- {
1201
- "expression": "created_at",
1202
- "isExpression": false,
1203
- "asc": true,
1204
- "nulls": "last"
1205
- }
1206
- ],
1207
- "isUnique": false,
1208
- "concurrently": false,
1209
- "method": "btree",
1210
- "with": {}
1211
- },
1212
- "idx_cli_query_actions_actor_user_id": {
1213
- "name": "idx_cli_query_actions_actor_user_id",
1214
- "columns": [
1215
- {
1216
- "expression": "actor_user_id",
1217
- "isExpression": false,
1218
- "asc": true,
1219
- "nulls": "last"
1220
- }
1221
- ],
1222
- "isUnique": false,
1223
- "concurrently": false,
1224
- "method": "btree",
1225
- "with": {}
1226
- },
1227
- "idx_cli_query_actions_request_id": {
1228
- "name": "idx_cli_query_actions_request_id",
1229
- "columns": [
1230
- {
1231
- "expression": "request_id",
1232
- "isExpression": false,
1233
- "asc": true,
1234
- "nulls": "last"
1235
- }
1236
- ],
1237
- "isUnique": false,
1238
- "concurrently": false,
1239
- "method": "btree",
1240
- "with": {}
1241
- },
1242
- "idx_cli_query_actions_source_id": {
1243
- "name": "idx_cli_query_actions_source_id",
1244
- "columns": [
1245
- {
1246
- "expression": "source_id",
1247
- "isExpression": false,
1248
- "asc": true,
1249
- "nulls": "last"
1250
- }
1251
- ],
1252
- "isUnique": false,
1253
- "concurrently": false,
1254
- "method": "btree",
1255
- "with": {}
1256
- },
1257
- "idx_cli_query_actions_status": {
1258
- "name": "idx_cli_query_actions_status",
1259
- "columns": [
1260
- {
1261
- "expression": "status",
1262
- "isExpression": false,
1263
- "asc": true,
1264
- "nulls": "last"
1265
- }
1266
- ],
1267
- "isUnique": false,
1268
- "concurrently": false,
1269
- "method": "btree",
1270
- "with": {}
1271
- }
1272
- },
1273
- "foreignKeys": {
1274
- "cli_query_actions_organization_id_organization_id_fk": {
1275
- "name": "cli_query_actions_organization_id_organization_id_fk",
1276
- "tableFrom": "cli_query_actions",
1277
- "tableTo": "organization",
1278
- "columnsFrom": ["organization_id"],
1279
- "columnsTo": ["id"],
1280
- "onDelete": "cascade",
1281
- "onUpdate": "no action"
1282
- },
1283
- "cli_query_actions_source_id_data_sources_id_fk": {
1284
- "name": "cli_query_actions_source_id_data_sources_id_fk",
1285
- "tableFrom": "cli_query_actions",
1286
- "tableTo": "data_sources",
1287
- "columnsFrom": ["source_id"],
1288
- "columnsTo": ["id"],
1289
- "onDelete": "set null",
1290
- "onUpdate": "no action"
1291
- },
1292
- "cli_query_actions_same_action_last_event_fk": {
1293
- "name": "cli_query_actions_same_action_last_event_fk",
1294
- "tableFrom": "cli_query_actions",
1295
- "tableTo": "cli_query_action_events",
1296
- "columnsFrom": ["id", "last_event_id"],
1297
- "columnsTo": ["query_action_id", "id"],
1298
- "onDelete": "no action",
1299
- "onUpdate": "no action"
1300
- }
1301
- },
1302
- "compositePrimaryKeys": {},
1303
- "uniqueConstraints": {
1304
- "cli_query_actions_identity_unique": {
1305
- "name": "cli_query_actions_identity_unique",
1306
- "nullsNotDistinct": false,
1307
- "columns": [
1308
- "id",
1309
- "organization_id",
1310
- "request_id",
1311
- "action_type",
1312
- "source_key"
1313
- ]
1314
- }
1315
- },
1316
- "policies": {},
1317
- "checkConstraints": {
1318
- "cli_query_actions_action_type_check": {
1319
- "name": "cli_query_actions_action_type_check",
1320
- "value": "\"cli_query_actions\".\"action_type\" in ('validate', 'execute')"
1321
- },
1322
- "cli_query_actions_actor_auth_mode_check": {
1323
- "name": "cli_query_actions_actor_auth_mode_check",
1324
- "value": "\"cli_query_actions\".\"actor_auth_mode\" in ('browser_session', 'bearer_token')"
1325
- },
1326
- "cli_query_actions_stage_check": {
1327
- "name": "cli_query_actions_stage_check",
1328
- "value": "\"cli_query_actions\".\"stage\" in ('received', 'load_source', 'validate_query', 'load_credentials', 'execute_query', 'persist_usage', 'completed')"
1329
- },
1330
- "cli_query_actions_status_check": {
1331
- "name": "cli_query_actions_status_check",
1332
- "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')"
1333
- },
1334
- "cli_query_actions_usage_persistence_status_check": {
1335
- "name": "cli_query_actions_usage_persistence_status_check",
1336
- "value": "\"cli_query_actions\".\"usage_persistence_status\" in ('not_started', 'succeeded', 'failed')"
1337
- },
1338
- "cli_query_actions_completed_stage_check": {
1339
- "name": "cli_query_actions_completed_stage_check",
1340
- "value": "( (stage = 'completed' and completed_at is not null) or (stage <> 'completed' and completed_at is null) )"
1341
- },
1342
- "cli_query_actions_stage_status_alignment_check": {
1343
- "name": "cli_query_actions_stage_status_alignment_check",
1344
- "value": "( (stage = 'completed' and status <> 'pending') or (stage <> 'completed' and status = 'pending') )"
1345
- },
1346
- "cli_query_actions_pre_completion_usage_check": {
1347
- "name": "cli_query_actions_pre_completion_usage_check",
1348
- "value": "( stage = 'completed' or usage_persistence_status = 'not_started' )"
1349
- }
1350
- },
1351
- "isRLSEnabled": true
1352
- },
1353
- "public.cli_query_action_events": {
1354
- "name": "cli_query_action_events",
1355
- "schema": "",
1356
- "columns": {
1357
- "id": {
1358
- "name": "id",
1359
- "type": "text",
1360
- "primaryKey": true,
1361
- "notNull": true
1362
- },
1363
- "query_action_id": {
1364
- "name": "query_action_id",
1365
- "type": "text",
1366
- "primaryKey": false,
1367
- "notNull": true
1368
- },
1369
- "organization_id": {
1370
- "name": "organization_id",
1371
- "type": "text",
1372
- "primaryKey": false,
1373
- "notNull": true
1374
- },
1375
- "actor_user_id": {
1376
- "name": "actor_user_id",
1377
- "type": "text",
1378
- "primaryKey": false,
1379
- "notNull": true
1380
- },
1381
- "actor_email": {
1382
- "name": "actor_email",
1383
- "type": "text",
1384
- "primaryKey": false,
1385
- "notNull": true
1386
- },
1387
- "actor_auth_mode": {
1388
- "name": "actor_auth_mode",
1389
- "type": "text",
1390
- "primaryKey": false,
1391
- "notNull": true
1392
- },
1393
- "actor_membership_roles": {
1394
- "name": "actor_membership_roles",
1395
- "type": "jsonb",
1396
- "primaryKey": false,
1397
- "notNull": true
1398
- },
1399
- "request_id": {
1400
- "name": "request_id",
1401
- "type": "text",
1402
- "primaryKey": false,
1403
- "notNull": true
1404
- },
1405
- "action_type": {
1406
- "name": "action_type",
1407
- "type": "text",
1408
- "primaryKey": false,
1409
- "notNull": true
1410
- },
1411
- "event_type": {
1412
- "name": "event_type",
1413
- "type": "text",
1414
- "primaryKey": false,
1415
- "notNull": true
1416
- },
1417
- "stage": {
1418
- "name": "stage",
1419
- "type": "text",
1420
- "primaryKey": false,
1421
- "notNull": true
1422
- },
1423
- "status": {
1424
- "name": "status",
1425
- "type": "text",
1426
- "primaryKey": false,
1427
- "notNull": true
1428
- },
1429
- "usage_persistence_status": {
1430
- "name": "usage_persistence_status",
1431
- "type": "text",
1432
- "primaryKey": false,
1433
- "notNull": true
1434
- },
1435
- "source_key": {
1436
- "name": "source_key",
1437
- "type": "text",
1438
- "primaryKey": false,
1439
- "notNull": true
1440
- },
1441
- "source_id": {
1442
- "name": "source_id",
1443
- "type": "text",
1444
- "primaryKey": false,
1445
- "notNull": false
1446
- },
1447
- "provider": {
1448
- "name": "provider",
1449
- "type": "text",
1450
- "primaryKey": false,
1451
- "notNull": false
1452
- },
1453
- "source_status": {
1454
- "name": "source_status",
1455
- "type": "text",
1456
- "primaryKey": false,
1457
- "notNull": false
1458
- },
1459
- "sql": {
1460
- "name": "sql",
1461
- "type": "text",
1462
- "primaryKey": false,
1463
- "notNull": false
1464
- },
1465
- "normalized_sql": {
1466
- "name": "normalized_sql",
1467
- "type": "text",
1468
- "primaryKey": false,
1469
- "notNull": false
1470
- },
1471
- "max_rows": {
1472
- "name": "max_rows",
1473
- "type": "integer",
1474
- "primaryKey": false,
1475
- "notNull": false
1476
- },
1477
- "max_bytes": {
1478
- "name": "max_bytes",
1479
- "type": "integer",
1480
- "primaryKey": false,
1481
- "notNull": false
1482
- },
1483
- "cell_max_chars": {
1484
- "name": "cell_max_chars",
1485
- "type": "integer",
1486
- "primaryKey": false,
1487
- "notNull": false
1488
- },
1489
- "timeout_ms": {
1490
- "name": "timeout_ms",
1491
- "type": "integer",
1492
- "primaryKey": false,
1493
- "notNull": false
1494
- },
1495
- "normalized_sql_changed": {
1496
- "name": "normalized_sql_changed",
1497
- "type": "boolean",
1498
- "primaryKey": false,
1499
- "notNull": true,
1500
- "default": false
1501
- },
1502
- "row_count": {
1503
- "name": "row_count",
1504
- "type": "integer",
1505
- "primaryKey": false,
1506
- "notNull": false
1507
- },
1508
- "elapsed_ms": {
1509
- "name": "elapsed_ms",
1510
- "type": "integer",
1511
- "primaryKey": false,
1512
- "notNull": false
1513
- },
1514
- "error_detail": {
1515
- "name": "error_detail",
1516
- "type": "text",
1517
- "primaryKey": false,
1518
- "notNull": false
1519
- },
1520
- "error_hint": {
1521
- "name": "error_hint",
1522
- "type": "text",
1523
- "primaryKey": false,
1524
- "notNull": false
1525
- },
1526
- "retryable": {
1527
- "name": "retryable",
1528
- "type": "boolean",
1529
- "primaryKey": false,
1530
- "notNull": false
1531
- },
1532
- "occurred_at": {
1533
- "name": "occurred_at",
1534
- "type": "timestamp with time zone",
1535
- "primaryKey": false,
1536
- "notNull": true
1537
- },
1538
- "causation_event_id": {
1539
- "name": "causation_event_id",
1540
- "type": "text",
1541
- "primaryKey": false,
1542
- "notNull": false
1543
- },
1544
- "org_slug": {
1545
- "name": "org_slug",
1546
- "type": "text",
1547
- "primaryKey": false,
1548
- "notNull": false
1549
- },
1550
- "created_at": {
1551
- "name": "created_at",
1552
- "type": "timestamp with time zone",
1553
- "primaryKey": false,
1554
- "notNull": true,
1555
- "default": "now()"
1556
- }
1557
- },
1558
- "indexes": {
1559
- "idx_cli_query_action_events_action_occurred": {
1560
- "name": "idx_cli_query_action_events_action_occurred",
1561
- "columns": [
1562
- {
1563
- "expression": "query_action_id",
1564
- "isExpression": false,
1565
- "asc": true,
1566
- "nulls": "last"
1567
- },
1568
- {
1569
- "expression": "occurred_at",
1570
- "isExpression": false,
1571
- "asc": true,
1572
- "nulls": "last"
1573
- },
1574
- {
1575
- "expression": "id",
1576
- "isExpression": false,
1577
- "asc": true,
1578
- "nulls": "last"
1579
- }
1580
- ],
1581
- "isUnique": false,
1582
- "concurrently": false,
1583
- "method": "btree",
1584
- "with": {}
1585
- },
1586
- "idx_cli_query_action_events_org_occurred": {
1587
- "name": "idx_cli_query_action_events_org_occurred",
1588
- "columns": [
1589
- {
1590
- "expression": "organization_id",
1591
- "isExpression": false,
1592
- "asc": true,
1593
- "nulls": "last"
1594
- },
1595
- {
1596
- "expression": "occurred_at",
1597
- "isExpression": false,
1598
- "asc": true,
1599
- "nulls": "last"
1600
- }
1601
- ],
1602
- "isUnique": false,
1603
- "concurrently": false,
1604
- "method": "btree",
1605
- "with": {}
1606
- },
1607
- "idx_cli_query_action_events_actor_user_id": {
1608
- "name": "idx_cli_query_action_events_actor_user_id",
1609
- "columns": [
1610
- {
1611
- "expression": "actor_user_id",
1612
- "isExpression": false,
1613
- "asc": true,
1614
- "nulls": "last"
1615
- }
1616
- ],
1617
- "isUnique": false,
1618
- "concurrently": false,
1619
- "method": "btree",
1620
- "with": {}
1621
- },
1622
- "idx_cli_query_action_events_request_id": {
1623
- "name": "idx_cli_query_action_events_request_id",
1624
- "columns": [
1625
- {
1626
- "expression": "request_id",
1627
- "isExpression": false,
1628
- "asc": true,
1629
- "nulls": "last"
1630
- }
1631
- ],
1632
- "isUnique": false,
1633
- "concurrently": false,
1634
- "method": "btree",
1635
- "with": {}
1636
- },
1637
- "idx_cli_query_action_events_causation": {
1638
- "name": "idx_cli_query_action_events_causation",
1639
- "columns": [
1640
- {
1641
- "expression": "causation_event_id",
1642
- "isExpression": false,
1643
- "asc": true,
1644
- "nulls": "last"
1645
- }
1646
- ],
1647
- "isUnique": false,
1648
- "concurrently": false,
1649
- "method": "btree",
1650
- "with": {}
1651
- },
1652
- "idx_cli_query_action_events_action_event_type_unique": {
1653
- "name": "idx_cli_query_action_events_action_event_type_unique",
1654
- "columns": [
1655
- {
1656
- "expression": "query_action_id",
1657
- "isExpression": false,
1658
- "asc": true,
1659
- "nulls": "last"
1660
- },
1661
- {
1662
- "expression": "event_type",
1663
- "isExpression": false,
1664
- "asc": true,
1665
- "nulls": "last"
1666
- }
1667
- ],
1668
- "isUnique": true,
1669
- "concurrently": false,
1670
- "method": "btree",
1671
- "with": {}
1672
- }
1673
- },
1674
- "foreignKeys": {
1675
- "cli_query_action_events_query_action_id_cli_query_actions_id_fk": {
1676
- "name": "cli_query_action_events_query_action_id_cli_query_actions_id_fk",
1677
- "tableFrom": "cli_query_action_events",
1678
- "tableTo": "cli_query_actions",
1679
- "columnsFrom": ["query_action_id"],
1680
- "columnsTo": ["id"],
1681
- "onDelete": "cascade",
1682
- "onUpdate": "no action"
1683
- },
1684
- "cli_query_action_events_organization_id_organization_id_fk": {
1685
- "name": "cli_query_action_events_organization_id_organization_id_fk",
1686
- "tableFrom": "cli_query_action_events",
1687
- "tableTo": "organization",
1688
- "columnsFrom": ["organization_id"],
1689
- "columnsTo": ["id"],
1690
- "onDelete": "cascade",
1691
- "onUpdate": "no action"
1692
- },
1693
- "cli_query_action_events_source_id_data_sources_id_fk": {
1694
- "name": "cli_query_action_events_source_id_data_sources_id_fk",
1695
- "tableFrom": "cli_query_action_events",
1696
- "tableTo": "data_sources",
1697
- "columnsFrom": ["source_id"],
1698
- "columnsTo": ["id"],
1699
- "onDelete": "set null",
1700
- "onUpdate": "no action"
1701
- },
1702
- "cli_query_action_events_action_identity_fk": {
1703
- "name": "cli_query_action_events_action_identity_fk",
1704
- "tableFrom": "cli_query_action_events",
1705
- "tableTo": "cli_query_actions",
1706
- "columnsFrom": [
1707
- "query_action_id",
1708
- "organization_id",
1709
- "request_id",
1710
- "action_type",
1711
- "source_key"
1712
- ],
1713
- "columnsTo": [
1714
- "id",
1715
- "organization_id",
1716
- "request_id",
1717
- "action_type",
1718
- "source_key"
1719
- ],
1720
- "onDelete": "no action",
1721
- "onUpdate": "no action"
1722
- },
1723
- "cli_query_action_events_same_action_causation_fk": {
1724
- "name": "cli_query_action_events_same_action_causation_fk",
1725
- "tableFrom": "cli_query_action_events",
1726
- "tableTo": "cli_query_action_events",
1727
- "columnsFrom": ["query_action_id", "causation_event_id"],
1728
- "columnsTo": ["query_action_id", "id"],
1729
- "onDelete": "no action",
1730
- "onUpdate": "no action"
1731
- },
1732
- "cli_query_action_events_causation_event_id_cli_query_action_events_id_fk": {
1733
- "name": "cli_query_action_events_causation_event_id_cli_query_action_events_id_fk",
1734
- "tableFrom": "cli_query_action_events",
1735
- "tableTo": "cli_query_action_events",
1736
- "columnsFrom": ["causation_event_id"],
1737
- "columnsTo": ["id"],
1738
- "onDelete": "set null",
1739
- "onUpdate": "no action"
1740
- }
1741
- },
1742
- "compositePrimaryKeys": {},
1743
- "uniqueConstraints": {
1744
- "cli_query_action_events_action_id_unique": {
1745
- "name": "cli_query_action_events_action_id_unique",
1746
- "nullsNotDistinct": false,
1747
- "columns": ["query_action_id", "id"]
1748
- }
1749
- },
1750
- "policies": {},
1751
- "checkConstraints": {
1752
- "cli_query_action_events_sql_payload_check": {
1753
- "name": "cli_query_action_events_sql_payload_check",
1754
- "value": "( (event_type = 'action_received' and sql is not null) or (event_type <> 'action_received' and sql is null) )"
1755
- },
1756
- "cli_query_action_events_causation_chain_check": {
1757
- "name": "cli_query_action_events_causation_chain_check",
1758
- "value": "( (event_type = 'action_received' and causation_event_id is null) or (event_type <> 'action_received' and causation_event_id is not null) )"
1759
- },
1760
- "cli_query_action_events_validated_normalized_sql_check": {
1761
- "name": "cli_query_action_events_validated_normalized_sql_check",
1762
- "value": "(event_type <> 'query_validated' or normalized_sql is not null)"
1763
- },
1764
- "cli_query_action_events_lifecycle_check": {
1765
- "name": "cli_query_action_events_lifecycle_check",
1766
- "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') )"
1767
- },
1768
- "cli_query_action_events_action_type_check": {
1769
- "name": "cli_query_action_events_action_type_check",
1770
- "value": "\"cli_query_action_events\".\"action_type\" in ('validate', 'execute')"
1771
- },
1772
- "cli_query_action_events_actor_auth_mode_check": {
1773
- "name": "cli_query_action_events_actor_auth_mode_check",
1774
- "value": "\"cli_query_action_events\".\"actor_auth_mode\" in ('browser_session', 'bearer_token')"
1775
- },
1776
- "cli_query_action_events_event_type_check": {
1777
- "name": "cli_query_action_events_event_type_check",
1778
- "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')"
1779
- },
1780
- "cli_query_action_events_stage_check": {
1781
- "name": "cli_query_action_events_stage_check",
1782
- "value": "\"cli_query_action_events\".\"stage\" in ('received', 'load_source', 'validate_query', 'load_credentials', 'execute_query', 'persist_usage', 'completed')"
1783
- },
1784
- "cli_query_action_events_status_check": {
1785
- "name": "cli_query_action_events_status_check",
1786
- "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')"
1787
- },
1788
- "cli_query_action_events_usage_persistence_status_check": {
1789
- "name": "cli_query_action_events_usage_persistence_status_check",
1790
- "value": "\"cli_query_action_events\".\"usage_persistence_status\" in ('not_started', 'succeeded', 'failed')"
1791
- },
1792
- "cli_query_action_events_causation_not_self_check": {
1793
- "name": "cli_query_action_events_causation_not_self_check",
1794
- "value": "\"cli_query_action_events\".\"causation_event_id\" is null or \"cli_query_action_events\".\"causation_event_id\" <> \"cli_query_action_events\".\"id\""
1795
- }
1796
- },
1797
- "isRLSEnabled": true
1798
- },
1799
- "public.connector_jobs": {
1800
- "name": "connector_jobs",
1801
- "schema": "",
1802
- "columns": {
1803
- "completed_at": {
1804
- "name": "completed_at",
1805
- "type": "timestamp with time zone",
1806
- "primaryKey": false,
1807
- "notNull": false
1808
- },
1809
- "connector_id": {
1810
- "name": "connector_id",
1811
- "type": "text",
1812
- "primaryKey": false,
1813
- "notNull": true
1814
- },
1815
- "created_at": {
1816
- "name": "created_at",
1817
- "type": "timestamp with time zone",
1818
- "primaryKey": false,
1819
- "notNull": true,
1820
- "default": "now()"
1821
- },
1822
- "database": {
1823
- "name": "database",
1824
- "type": "text",
1825
- "primaryKey": false,
1826
- "notNull": true
1827
- },
1828
- "job_id": {
1829
- "name": "job_id",
1830
- "type": "text",
1831
- "primaryKey": true,
1832
- "notNull": true
1833
- },
1834
- "leased_at": {
1835
- "name": "leased_at",
1836
- "type": "timestamp with time zone",
1837
- "primaryKey": false,
1838
- "notNull": false
1839
- },
1840
- "max_rows": {
1841
- "name": "max_rows",
1842
- "type": "integer",
1843
- "primaryKey": false,
1844
- "notNull": false
1845
- },
1846
- "outcome": {
1847
- "name": "outcome",
1848
- "type": "jsonb",
1849
- "primaryKey": false,
1850
- "notNull": false
1851
- },
1852
- "sql": {
1853
- "name": "sql",
1854
- "type": "text",
1855
- "primaryKey": false,
1856
- "notNull": true
1857
- },
1858
- "status": {
1859
- "name": "status",
1860
- "type": "text",
1861
- "primaryKey": false,
1862
- "notNull": true
1863
- },
1864
- "timeout_ms": {
1865
- "name": "timeout_ms",
1866
- "type": "integer",
1867
- "primaryKey": false,
1868
- "notNull": false
1869
- },
1870
- "updated_at": {
1871
- "name": "updated_at",
1872
- "type": "timestamp with time zone",
1873
- "primaryKey": false,
1874
- "notNull": true,
1875
- "default": "now()"
1876
- },
1877
- "workgroup": {
1878
- "name": "workgroup",
1879
- "type": "text",
1880
- "primaryKey": false,
1881
- "notNull": false
1882
- }
1883
- },
1884
- "indexes": {
1885
- "idx_connector_jobs_connector_created": {
1886
- "name": "idx_connector_jobs_connector_created",
1887
- "columns": [
1888
- {
1889
- "expression": "connector_id",
1890
- "isExpression": false,
1891
- "asc": true,
1892
- "nulls": "last"
1893
- },
1894
- {
1895
- "expression": "created_at",
1896
- "isExpression": false,
1897
- "asc": true,
1898
- "nulls": "last"
1899
- }
1900
- ],
1901
- "isUnique": false,
1902
- "concurrently": false,
1903
- "method": "btree",
1904
- "with": {}
1905
- },
1906
- "idx_connector_jobs_status_created": {
1907
- "name": "idx_connector_jobs_status_created",
1908
- "columns": [
1909
- {
1910
- "expression": "status",
1911
- "isExpression": false,
1912
- "asc": true,
1913
- "nulls": "last"
1914
- },
1915
- {
1916
- "expression": "created_at",
1917
- "isExpression": false,
1918
- "asc": true,
1919
- "nulls": "last"
1920
- }
1921
- ],
1922
- "isUnique": false,
1923
- "concurrently": false,
1924
- "method": "btree",
1925
- "with": {}
1926
- }
1927
- },
1928
- "foreignKeys": {
1929
- "connector_jobs_connector_id_connectors_connector_id_fk": {
1930
- "name": "connector_jobs_connector_id_connectors_connector_id_fk",
1931
- "tableFrom": "connector_jobs",
1932
- "tableTo": "connectors",
1933
- "columnsFrom": ["connector_id"],
1934
- "columnsTo": ["connector_id"],
1935
- "onDelete": "cascade",
1936
- "onUpdate": "no action"
1937
- }
1938
- },
1939
- "compositePrimaryKeys": {},
1940
- "uniqueConstraints": {},
1941
- "policies": {},
1942
- "checkConstraints": {},
1943
- "isRLSEnabled": true
1944
- },
1945
- "public.connectors": {
1946
- "name": "connectors",
1947
- "schema": "",
1948
- "columns": {
1949
- "auth_token_hash": {
1950
- "name": "auth_token_hash",
1951
- "type": "text",
1952
- "primaryKey": false,
1953
- "notNull": true
1954
- },
1955
- "connector_id": {
1956
- "name": "connector_id",
1957
- "type": "text",
1958
- "primaryKey": true,
1959
- "notNull": true
1960
- },
1961
- "connector_name": {
1962
- "name": "connector_name",
1963
- "type": "text",
1964
- "primaryKey": false,
1965
- "notNull": true
1966
- },
1967
- "health_status": {
1968
- "name": "health_status",
1969
- "type": "text",
1970
- "primaryKey": false,
1971
- "notNull": false
1972
- },
1973
- "last_heartbeat_at": {
1974
- "name": "last_heartbeat_at",
1975
- "type": "timestamp with time zone",
1976
- "primaryKey": false,
1977
- "notNull": false
1978
- },
1979
- "last_seen_at": {
1980
- "name": "last_seen_at",
1981
- "type": "timestamp with time zone",
1982
- "primaryKey": false,
1983
- "notNull": false
1984
- },
1985
- "metadata": {
1986
- "name": "metadata",
1987
- "type": "jsonb",
1988
- "primaryKey": false,
1989
- "notNull": false
1990
- },
1991
- "organization_id": {
1992
- "name": "organization_id",
1993
- "type": "text",
1994
- "primaryKey": false,
1995
- "notNull": true
1996
- },
1997
- "registered_at": {
1998
- "name": "registered_at",
1999
- "type": "timestamp with time zone",
2000
- "primaryKey": false,
2001
- "notNull": true,
2002
- "default": "now()"
2003
- },
2004
- "updated_at": {
2005
- "name": "updated_at",
2006
- "type": "timestamp with time zone",
2007
- "primaryKey": false,
2008
- "notNull": true,
2009
- "default": "now()"
2010
- }
2011
- },
2012
- "indexes": {
2013
- "idx_connectors_organization": {
2014
- "name": "idx_connectors_organization",
2015
- "columns": [
2016
- {
2017
- "expression": "organization_id",
2018
- "isExpression": false,
2019
- "asc": true,
2020
- "nulls": "last"
2021
- }
2022
- ],
2023
- "isUnique": false,
2024
- "concurrently": false,
2025
- "method": "btree",
2026
- "with": {}
2027
- },
2028
- "idx_connectors_last_seen": {
2029
- "name": "idx_connectors_last_seen",
2030
- "columns": [
2031
- {
2032
- "expression": "last_seen_at",
2033
- "isExpression": false,
2034
- "asc": true,
2035
- "nulls": "last"
2036
- }
2037
- ],
2038
- "isUnique": false,
2039
- "concurrently": false,
2040
- "method": "btree",
2041
- "with": {}
2042
- },
2043
- "idx_connectors_auth_token_hash_unique": {
2044
- "name": "idx_connectors_auth_token_hash_unique",
2045
- "columns": [
2046
- {
2047
- "expression": "auth_token_hash",
2048
- "isExpression": false,
2049
- "asc": true,
2050
- "nulls": "last"
2051
- }
2052
- ],
2053
- "isUnique": true,
2054
- "concurrently": false,
2055
- "method": "btree",
2056
- "with": {}
2057
- }
2058
- },
2059
- "foreignKeys": {
2060
- "connectors_organization_id_organization_id_fk": {
2061
- "name": "connectors_organization_id_organization_id_fk",
2062
- "tableFrom": "connectors",
2063
- "tableTo": "organization",
2064
- "columnsFrom": ["organization_id"],
2065
- "columnsTo": ["id"],
2066
- "onDelete": "cascade",
2067
- "onUpdate": "no action"
2068
- }
2069
- },
2070
- "compositePrimaryKeys": {},
2071
- "uniqueConstraints": {},
2072
- "policies": {},
2073
- "checkConstraints": {},
2074
- "isRLSEnabled": true
2075
- },
2076
- "public.data_source_query_costs": {
2077
- "name": "data_source_query_costs",
2078
- "schema": "",
2079
- "columns": {
2080
- "actual_cost_usd": {
2081
- "name": "actual_cost_usd",
2082
- "type": "double precision",
2083
- "primaryKey": false,
2084
- "notNull": false
2085
- },
2086
- "actual_processed_bytes": {
2087
- "name": "actual_processed_bytes",
2088
- "type": "bigint",
2089
- "primaryKey": false,
2090
- "notNull": false
2091
- },
2092
- "billable_bytes": {
2093
- "name": "billable_bytes",
2094
- "type": "bigint",
2095
- "primaryKey": false,
2096
- "notNull": false
2097
- },
2098
- "cache_hit": {
2099
- "name": "cache_hit",
2100
- "type": "boolean",
2101
- "primaryKey": false,
2102
- "notNull": false
2103
- },
2104
- "connection_name": {
2105
- "name": "connection_name",
2106
- "type": "text",
2107
- "primaryKey": false,
2108
- "notNull": true
2109
- },
2110
- "connector_id": {
2111
- "name": "connector_id",
2112
- "type": "text",
2113
- "primaryKey": false,
2114
- "notNull": false
2115
- },
2116
- "created_at": {
2117
- "name": "created_at",
2118
- "type": "timestamp with time zone",
2119
- "primaryKey": false,
2120
- "notNull": true,
2121
- "default": "now()"
2122
- },
2123
- "currency": {
2124
- "name": "currency",
2125
- "type": "text",
2126
- "primaryKey": false,
2127
- "notNull": true,
2128
- "default": "'USD'"
2129
- },
2130
- "database": {
2131
- "name": "database",
2132
- "type": "text",
2133
- "primaryKey": false,
2134
- "notNull": false
2135
- },
2136
- "estimated_cost_usd": {
2137
- "name": "estimated_cost_usd",
2138
- "type": "double precision",
2139
- "primaryKey": false,
2140
- "notNull": false
2141
- },
2142
- "estimated_processed_bytes": {
2143
- "name": "estimated_processed_bytes",
2144
- "type": "bigint",
2145
- "primaryKey": false,
2146
- "notNull": false
2147
- },
2148
- "executed_at": {
2149
- "name": "executed_at",
2150
- "type": "timestamp with time zone",
2151
- "primaryKey": false,
2152
- "notNull": true
2153
- },
2154
- "execution_time_ms": {
2155
- "name": "execution_time_ms",
2156
- "type": "integer",
2157
- "primaryKey": false,
2158
- "notNull": false
2159
- },
2160
- "id": {
2161
- "name": "id",
2162
- "type": "text",
2163
- "primaryKey": true,
2164
- "notNull": true
2165
- },
2166
- "job_id": {
2167
- "name": "job_id",
2168
- "type": "text",
2169
- "primaryKey": false,
2170
- "notNull": false
2171
- },
2172
- "location": {
2173
- "name": "location",
2174
- "type": "text",
2175
- "primaryKey": false,
2176
- "notNull": false
2177
- },
2178
- "organization_id": {
2179
- "name": "organization_id",
2180
- "type": "text",
2181
- "primaryKey": false,
2182
- "notNull": true
2183
- },
2184
- "pricing_model": {
2185
- "name": "pricing_model",
2186
- "type": "text",
2187
- "primaryKey": false,
2188
- "notNull": true,
2189
- "default": "'unknown'"
2190
- },
2191
- "provider": {
2192
- "name": "provider",
2193
- "type": "text",
2194
- "primaryKey": false,
2195
- "notNull": true
2196
- },
2197
- "query_execution_id": {
2198
- "name": "query_execution_id",
2199
- "type": "text",
2200
- "primaryKey": false,
2201
- "notNull": false
2202
- },
2203
- "query_id": {
2204
- "name": "query_id",
2205
- "type": "text",
2206
- "primaryKey": false,
2207
- "notNull": true
2208
- },
2209
- "row_count": {
2210
- "name": "row_count",
2211
- "type": "integer",
2212
- "primaryKey": false,
2213
- "notNull": false
2214
- },
2215
- "tool_call_id": {
2216
- "name": "tool_call_id",
2217
- "type": "text",
2218
- "primaryKey": false,
2219
- "notNull": true
2220
- },
2221
- "workgroup": {
2222
- "name": "workgroup",
2223
- "type": "text",
2224
- "primaryKey": false,
2225
- "notNull": false
2226
- }
2227
- },
2228
- "indexes": {
2229
- "idx_data_source_query_costs_org": {
2230
- "name": "idx_data_source_query_costs_org",
2231
- "columns": [
2232
- {
2233
- "expression": "organization_id",
2234
- "isExpression": false,
2235
- "asc": true,
2236
- "nulls": "last"
2237
- }
2238
- ],
2239
- "isUnique": false,
2240
- "concurrently": false,
2241
- "method": "btree",
2242
- "with": {}
2243
- },
2244
- "idx_data_source_query_costs_provider": {
2245
- "name": "idx_data_source_query_costs_provider",
2246
- "columns": [
2247
- {
2248
- "expression": "provider",
2249
- "isExpression": false,
2250
- "asc": true,
2251
- "nulls": "last"
2252
- }
2253
- ],
2254
- "isUnique": false,
2255
- "concurrently": false,
2256
- "method": "btree",
2257
- "with": {}
2258
- },
2259
- "idx_data_source_query_costs_executed_at": {
2260
- "name": "idx_data_source_query_costs_executed_at",
2261
- "columns": [
2262
- {
2263
- "expression": "executed_at",
2264
- "isExpression": false,
2265
- "asc": true,
2266
- "nulls": "last"
2267
- }
2268
- ],
2269
- "isUnique": false,
2270
- "concurrently": false,
2271
- "method": "btree",
2272
- "with": {}
2273
- }
2274
- },
2275
- "foreignKeys": {
2276
- "data_source_query_costs_connector_id_connectors_connector_id_fk": {
2277
- "name": "data_source_query_costs_connector_id_connectors_connector_id_fk",
2278
- "tableFrom": "data_source_query_costs",
2279
- "tableTo": "connectors",
2280
- "columnsFrom": ["connector_id"],
2281
- "columnsTo": ["connector_id"],
2282
- "onDelete": "cascade",
2283
- "onUpdate": "no action"
2284
- },
2285
- "data_source_query_costs_organization_id_organization_id_fk": {
2286
- "name": "data_source_query_costs_organization_id_organization_id_fk",
2287
- "tableFrom": "data_source_query_costs",
2288
- "tableTo": "organization",
2289
- "columnsFrom": ["organization_id"],
2290
- "columnsTo": ["id"],
2291
- "onDelete": "cascade",
2292
- "onUpdate": "no action"
2293
- }
2294
- },
2295
- "compositePrimaryKeys": {},
2296
- "uniqueConstraints": {},
2297
- "policies": {},
2298
- "checkConstraints": {},
2299
- "isRLSEnabled": true
2300
- },
2301
- "public.data_sources": {
2302
- "name": "data_sources",
2303
- "schema": "",
2304
- "columns": {
2305
- "created_at": {
2306
- "name": "created_at",
2307
- "type": "timestamp with time zone",
2308
- "primaryKey": false,
2309
- "notNull": true,
2310
- "default": "now()"
2311
- },
2312
- "credentials_encrypted": {
2313
- "name": "credentials_encrypted",
2314
- "type": "text",
2315
- "primaryKey": false,
2316
- "notNull": true
2317
- },
2318
- "credentials_iv": {
2319
- "name": "credentials_iv",
2320
- "type": "text",
2321
- "primaryKey": false,
2322
- "notNull": true
2323
- },
2324
- "error_message": {
2325
- "name": "error_message",
2326
- "type": "text",
2327
- "primaryKey": false,
2328
- "notNull": false
2329
- },
2330
- "id": {
2331
- "name": "id",
2332
- "type": "text",
2333
- "primaryKey": true,
2334
- "notNull": true
2335
- },
2336
- "last_used_at": {
2337
- "name": "last_used_at",
2338
- "type": "timestamp with time zone",
2339
- "primaryKey": false,
2340
- "notNull": false
2341
- },
2342
- "name": {
2343
- "name": "name",
2344
- "type": "text",
2345
- "primaryKey": false,
2346
- "notNull": true
2347
- },
2348
- "organization_id": {
2349
- "name": "organization_id",
2350
- "type": "text",
2351
- "primaryKey": false,
2352
- "notNull": true
2353
- },
2354
- "provider": {
2355
- "name": "provider",
2356
- "type": "text",
2357
- "primaryKey": false,
2358
- "notNull": true
2359
- },
2360
- "provider_account_id": {
2361
- "name": "provider_account_id",
2362
- "type": "text",
2363
- "primaryKey": false,
2364
- "notNull": false
2365
- },
2366
- "scope": {
2367
- "name": "scope",
2368
- "type": "text",
2369
- "primaryKey": false,
2370
- "notNull": false
2371
- },
2372
- "status": {
2373
- "name": "status",
2374
- "type": "text",
2375
- "primaryKey": false,
2376
- "notNull": true,
2377
- "default": "'active'"
2378
- },
2379
- "updated_at": {
2380
- "name": "updated_at",
2381
- "type": "timestamp with time zone",
2382
- "primaryKey": false,
2383
- "notNull": true,
2384
- "default": "now()"
2385
- },
2386
- "use_as_data_source": {
2387
- "name": "use_as_data_source",
2388
- "type": "boolean",
2389
- "primaryKey": false,
2390
- "notNull": true,
2391
- "default": true
2392
- }
2393
- },
2394
- "indexes": {
2395
- "idx_data_sources_organization": {
2396
- "name": "idx_data_sources_organization",
2397
- "columns": [
2398
- {
2399
- "expression": "organization_id",
2400
- "isExpression": false,
2401
- "asc": true,
2402
- "nulls": "last"
2403
- }
2404
- ],
2405
- "isUnique": false,
2406
- "concurrently": false,
2407
- "method": "btree",
2408
- "with": {}
2409
- },
2410
- "idx_data_sources_provider": {
2411
- "name": "idx_data_sources_provider",
2412
- "columns": [
2413
- {
2414
- "expression": "provider",
2415
- "isExpression": false,
2416
- "asc": true,
2417
- "nulls": "last"
2418
- }
2419
- ],
2420
- "isUnique": false,
2421
- "concurrently": false,
2422
- "method": "btree",
2423
- "with": {}
2424
- },
2425
- "idx_data_sources_provider_account": {
2426
- "name": "idx_data_sources_provider_account",
2427
- "columns": [
2428
- {
2429
- "expression": "provider",
2430
- "isExpression": false,
2431
- "asc": true,
2432
- "nulls": "last"
2433
- },
2434
- {
2435
- "expression": "provider_account_id",
2436
- "isExpression": false,
2437
- "asc": true,
2438
- "nulls": "last"
2439
- }
2440
- ],
2441
- "isUnique": false,
2442
- "concurrently": false,
2443
- "method": "btree",
2444
- "with": {}
2445
- },
2446
- "idx_data_sources_status": {
2447
- "name": "idx_data_sources_status",
2448
- "columns": [
2449
- {
2450
- "expression": "status",
2451
- "isExpression": false,
2452
- "asc": true,
2453
- "nulls": "last"
2454
- }
2455
- ],
2456
- "isUnique": false,
2457
- "concurrently": false,
2458
- "method": "btree",
2459
- "with": {}
2460
- }
2461
- },
2462
- "foreignKeys": {
2463
- "data_sources_organization_id_organization_id_fk": {
2464
- "name": "data_sources_organization_id_organization_id_fk",
2465
- "tableFrom": "data_sources",
2466
- "tableTo": "organization",
2467
- "columnsFrom": ["organization_id"],
2468
- "columnsTo": ["id"],
2469
- "onDelete": "cascade",
2470
- "onUpdate": "no action"
2471
- }
2472
- },
2473
- "compositePrimaryKeys": {},
2474
- "uniqueConstraints": {
2475
- "data_sources_organization_name_unique": {
2476
- "name": "data_sources_organization_name_unique",
2477
- "nullsNotDistinct": false,
2478
- "columns": ["organization_id", "name"]
2479
- }
2480
- },
2481
- "policies": {},
2482
- "checkConstraints": {},
2483
- "isRLSEnabled": true
2484
- },
2485
- "public.data_source_table_usage": {
2486
- "name": "data_source_table_usage",
2487
- "schema": "",
2488
- "columns": {
2489
- "column_memos": {
2490
- "name": "column_memos",
2491
- "type": "jsonb",
2492
- "primaryKey": false,
2493
- "notNull": true,
2494
- "default": "'{}'::jsonb"
2495
- },
2496
- "created_at": {
2497
- "name": "created_at",
2498
- "type": "timestamp with time zone",
2499
- "primaryKey": false,
2500
- "notNull": true,
2501
- "default": "now()"
2502
- },
2503
- "data_source_id": {
2504
- "name": "data_source_id",
2505
- "type": "text",
2506
- "primaryKey": false,
2507
- "notNull": true
2508
- },
2509
- "formatted": {
2510
- "name": "formatted",
2511
- "type": "text",
2512
- "primaryKey": false,
2513
- "notNull": true
2514
- },
2515
- "generated_at": {
2516
- "name": "generated_at",
2517
- "type": "timestamp with time zone",
2518
- "primaryKey": false,
2519
- "notNull": true
2520
- },
2521
- "id": {
2522
- "name": "id",
2523
- "type": "text",
2524
- "primaryKey": true,
2525
- "notNull": true
2526
- },
2527
- "memo_updated_at": {
2528
- "name": "memo_updated_at",
2529
- "type": "timestamp with time zone",
2530
- "primaryKey": false,
2531
- "notNull": false
2532
- },
2533
- "memo_updated_by": {
2534
- "name": "memo_updated_by",
2535
- "type": "text",
2536
- "primaryKey": false,
2537
- "notNull": false
2538
- },
2539
- "organization_id": {
2540
- "name": "organization_id",
2541
- "type": "text",
2542
- "primaryKey": false,
2543
- "notNull": true
2544
- },
2545
- "provider": {
2546
- "name": "provider",
2547
- "type": "text",
2548
- "primaryKey": false,
2549
- "notNull": true
2550
- },
2551
- "schema_hash": {
2552
- "name": "schema_hash",
2553
- "type": "text",
2554
- "primaryKey": false,
2555
- "notNull": false
2556
- },
2557
- "table_lineage": {
2558
- "name": "table_lineage",
2559
- "type": "jsonb",
2560
- "primaryKey": false,
2561
- "notNull": true,
2562
- "default": "'{}'::jsonb"
2563
- },
2564
- "table_memos": {
2565
- "name": "table_memos",
2566
- "type": "jsonb",
2567
- "primaryKey": false,
2568
- "notNull": true,
2569
- "default": "'{}'::jsonb"
2570
- },
2571
- "tables": {
2572
- "name": "tables",
2573
- "type": "jsonb",
2574
- "primaryKey": false,
2575
- "notNull": true
2576
- },
2577
- "updated_at": {
2578
- "name": "updated_at",
2579
- "type": "timestamp with time zone",
2580
- "primaryKey": false,
2581
- "notNull": true,
2582
- "default": "now()"
2583
- }
2584
- },
2585
- "indexes": {
2586
- "idx_data_source_table_usage_source": {
2587
- "name": "idx_data_source_table_usage_source",
2588
- "columns": [
2589
- {
2590
- "expression": "data_source_id",
2591
- "isExpression": false,
2592
- "asc": true,
2593
- "nulls": "last"
2594
- }
2595
- ],
2596
- "isUnique": true,
2597
- "concurrently": false,
2598
- "method": "btree",
2599
- "with": {}
2600
- },
2601
- "idx_data_source_table_usage_org": {
2602
- "name": "idx_data_source_table_usage_org",
2603
- "columns": [
2604
- {
2605
- "expression": "organization_id",
2606
- "isExpression": false,
2607
- "asc": true,
2608
- "nulls": "last"
2609
- }
2610
- ],
2611
- "isUnique": false,
2612
- "concurrently": false,
2613
- "method": "btree",
2614
- "with": {}
2615
- },
2616
- "idx_data_source_table_usage_provider": {
2617
- "name": "idx_data_source_table_usage_provider",
2618
- "columns": [
2619
- {
2620
- "expression": "provider",
2621
- "isExpression": false,
2622
- "asc": true,
2623
- "nulls": "last"
2624
- }
2625
- ],
2626
- "isUnique": false,
2627
- "concurrently": false,
2628
- "method": "btree",
2629
- "with": {}
2630
- },
2631
- "idx_data_source_table_usage_generated_at": {
2632
- "name": "idx_data_source_table_usage_generated_at",
2633
- "columns": [
2634
- {
2635
- "expression": "generated_at",
2636
- "isExpression": false,
2637
- "asc": true,
2638
- "nulls": "last"
2639
- }
2640
- ],
2641
- "isUnique": false,
2642
- "concurrently": false,
2643
- "method": "btree",
2644
- "with": {}
2645
- }
2646
- },
2647
- "foreignKeys": {
2648
- "data_source_table_usage_data_source_id_data_sources_id_fk": {
2649
- "name": "data_source_table_usage_data_source_id_data_sources_id_fk",
2650
- "tableFrom": "data_source_table_usage",
2651
- "tableTo": "data_sources",
2652
- "columnsFrom": ["data_source_id"],
2653
- "columnsTo": ["id"],
2654
- "onDelete": "cascade",
2655
- "onUpdate": "no action"
2656
- },
2657
- "data_source_table_usage_memo_updated_by_user_id_fk": {
2658
- "name": "data_source_table_usage_memo_updated_by_user_id_fk",
2659
- "tableFrom": "data_source_table_usage",
2660
- "tableTo": "user",
2661
- "columnsFrom": ["memo_updated_by"],
2662
- "columnsTo": ["id"],
2663
- "onDelete": "set null",
2664
- "onUpdate": "no action"
2665
- },
2666
- "data_source_table_usage_organization_id_organization_id_fk": {
2667
- "name": "data_source_table_usage_organization_id_organization_id_fk",
2668
- "tableFrom": "data_source_table_usage",
2669
- "tableTo": "organization",
2670
- "columnsFrom": ["organization_id"],
2671
- "columnsTo": ["id"],
2672
- "onDelete": "cascade",
2673
- "onUpdate": "no action"
2674
- }
2675
- },
2676
- "compositePrimaryKeys": {},
2677
- "uniqueConstraints": {},
2678
- "policies": {},
2679
- "checkConstraints": {},
2680
- "isRLSEnabled": true
2681
- },
2682
- "public.organization_profiles": {
2683
- "name": "organization_profiles",
2684
- "schema": "",
2685
- "columns": {
2686
- "id": {
2687
- "name": "id",
2688
- "type": "text",
2689
- "primaryKey": true,
2690
- "notNull": true
2691
- },
2692
- "organization_id": {
2693
- "name": "organization_id",
2694
- "type": "text",
2695
- "primaryKey": false,
2696
- "notNull": true
2697
- },
2698
- "north_star_metric": {
2699
- "name": "north_star_metric",
2700
- "type": "text",
2701
- "primaryKey": false,
2702
- "notNull": false
2703
- },
2704
- "kpis": {
2705
- "name": "kpis",
2706
- "type": "jsonb",
2707
- "primaryKey": false,
2708
- "notNull": true,
2709
- "default": "'[]'::jsonb"
2710
- },
2711
- "website_url": {
2712
- "name": "website_url",
2713
- "type": "text",
2714
- "primaryKey": false,
2715
- "notNull": false
2716
- },
2717
- "monthly_budget_usd": {
2718
- "name": "monthly_budget_usd",
2719
- "type": "double precision",
2720
- "primaryKey": false,
2721
- "notNull": false
2722
- },
2723
- "created_at": {
2724
- "name": "created_at",
2725
- "type": "timestamp with time zone",
2726
- "primaryKey": false,
2727
- "notNull": true,
2728
- "default": "now()"
2729
- },
2730
- "updated_at": {
2731
- "name": "updated_at",
2732
- "type": "timestamp with time zone",
2733
- "primaryKey": false,
2734
- "notNull": true,
2735
- "default": "now()"
2736
- }
2737
- },
2738
- "indexes": {
2739
- "idx_org_profiles_org": {
2740
- "name": "idx_org_profiles_org",
2741
- "columns": [
2742
- {
2743
- "expression": "organization_id",
2744
- "isExpression": false,
2745
- "asc": true,
2746
- "nulls": "last"
2747
- }
2748
- ],
2749
- "isUnique": true,
2750
- "concurrently": false,
2751
- "method": "btree",
2752
- "with": {}
2753
- },
2754
- "idx_org_profiles_created": {
2755
- "name": "idx_org_profiles_created",
2756
- "columns": [
2757
- {
2758
- "expression": "created_at",
2759
- "isExpression": false,
2760
- "asc": true,
2761
- "nulls": "last"
2762
- }
2763
- ],
2764
- "isUnique": false,
2765
- "concurrently": false,
2766
- "method": "btree",
2767
- "with": {}
2768
- }
2769
- },
2770
- "foreignKeys": {
2771
- "organization_profiles_organization_id_organization_id_fk": {
2772
- "name": "organization_profiles_organization_id_organization_id_fk",
2773
- "tableFrom": "organization_profiles",
2774
- "tableTo": "organization",
2775
- "columnsFrom": ["organization_id"],
2776
- "columnsTo": ["id"],
2777
- "onDelete": "cascade",
2778
- "onUpdate": "no action"
2779
- }
2780
- },
2781
- "compositePrimaryKeys": {},
2782
- "uniqueConstraints": {},
2783
- "policies": {},
2784
- "checkConstraints": {},
2785
- "isRLSEnabled": true
2786
- },
2787
- "public.user_profiles": {
2788
- "name": "user_profiles",
2789
- "schema": "",
2790
- "columns": {
2791
- "created_at": {
2792
- "name": "created_at",
2793
- "type": "timestamp with time zone",
2794
- "primaryKey": false,
2795
- "notNull": true,
2796
- "default": "now()"
2797
- },
2798
- "id": {
2799
- "name": "id",
2800
- "type": "text",
2801
- "primaryKey": true,
2802
- "notNull": true
2803
- },
2804
- "updated_at": {
2805
- "name": "updated_at",
2806
- "type": "timestamp with time zone",
2807
- "primaryKey": false,
2808
- "notNull": true,
2809
- "default": "now()"
2810
- },
2811
- "user_id": {
2812
- "name": "user_id",
2813
- "type": "text",
2814
- "primaryKey": false,
2815
- "notNull": true
2816
- }
2817
- },
2818
- "indexes": {
2819
- "idx_user_profiles_user": {
2820
- "name": "idx_user_profiles_user",
2821
- "columns": [
2822
- {
2823
- "expression": "user_id",
2824
- "isExpression": false,
2825
- "asc": true,
2826
- "nulls": "last"
2827
- }
2828
- ],
2829
- "isUnique": true,
2830
- "concurrently": false,
2831
- "method": "btree",
2832
- "with": {}
2833
- }
2834
- },
2835
- "foreignKeys": {
2836
- "user_profiles_user_id_user_id_fk": {
2837
- "name": "user_profiles_user_id_user_id_fk",
2838
- "tableFrom": "user_profiles",
2839
- "tableTo": "user",
2840
- "columnsFrom": ["user_id"],
2841
- "columnsTo": ["id"],
2842
- "onDelete": "cascade",
2843
- "onUpdate": "no action"
2844
- }
2845
- },
2846
- "compositePrimaryKeys": {},
2847
- "uniqueConstraints": {},
2848
- "policies": {},
2849
- "checkConstraints": {},
2850
- "isRLSEnabled": true
2851
- }
2852
- },
2853
- "enums": {},
2854
- "schemas": {},
2855
- "sequences": {},
2856
- "roles": {},
2857
- "policies": {},
2858
- "views": {},
2859
- "_meta": {
2860
- "columns": {},
2861
- "schemas": {},
2862
- "tables": {}
2863
- }
2864
- }