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