@onequery/cli 0.1.64 → 0.1.65-darwin-x64

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/package.json +17 -24
  2. package/vendor/x86_64-apple-darwin/onequery/onequery +0 -0
  3. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/CompositeItem-BB408Cyb.js +1 -0
  4. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/CompositeList-DbbDW_rT.js +1 -0
  5. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/DialogTitle-ChNkcIa6.js +1 -0
  6. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/IconArrowRight-DsOD7mDl.js +1 -0
  7. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/IconCheck-Gc24xPT2.js +1 -0
  8. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/IconChevronDown-B-39MA7-.js +1 -0
  9. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/IconChevronRight-DD16tNHZ.js +1 -0
  10. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/IconCoins-C7Nn0L6R.js +1 -0
  11. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/IconHistory-DuLS8PKF.js +1 -0
  12. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/IconLoader2-BpZcTuHV.js +1 -0
  13. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/IconPlus-CZiRiEUF.js +1 -0
  14. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/IconTerminal2-PxNqcz3d.js +1 -0
  15. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/IconX-rRpRFwc5.js +1 -0
  16. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/Separator-M05FshHx.js +1 -0
  17. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/_authenticated-CcSc_Pt7.js +1 -0
  18. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/_org_slug-BvJDit6U.js +1 -0
  19. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/alert-BIGxI3XN.js +1 -0
  20. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/api-base-url-DIb6qukm.js +1 -0
  21. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/api-client-tp8XTpAa.js +1 -0
  22. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/api-paths-DcYkf-C_.js +1 -0
  23. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/app-routes-CMyon6Em.js +1 -0
  24. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/audit-CdPU9Jf2.js +2 -0
  25. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/auth-bootstrap-query-B1MHd_NV.js +1 -0
  26. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/auth-client-D-YHMy0G.js +3 -0
  27. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/avatar-SaFoLofF.js +1 -0
  28. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/badge-BFPkSrVD.js +1 -0
  29. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/budget-CX5MplAP.js +1 -0
  30. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/callback-BWQ3ETBy.js +1 -0
  31. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/card-Dllm2lhp.js +1 -0
  32. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/checkbox-Bii9Pcrx.js +1 -0
  33. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/compiler-runtime-DCc3R3Xn.js +1 -0
  34. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/connect-database-C1Jb2l53.js +1 -0
  35. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/copy-button-BO1KBdf9.js +1 -0
  36. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/create-org-BSzKv5ue.js +1 -0
  37. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/createReactComponent-_L2mp4Ui.js +1 -0
  38. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/data-source-connection-form-CbDL0cgG.js +273 -0
  39. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/device-Bbz7apAX.js +1 -0
  40. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/dist-BNi06Dzx.js +3 -0
  41. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/dropdown-menu-Cw2MW0pD.js +1 -0
  42. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/empty-DjRo5ytz.js +1 -0
  43. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/format-date-Rg05aHXh.js +1 -0
  44. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/getDisabledMountTransitionStyles-C0uz3iMh.js +1 -0
  45. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/getPseudoElementBounds-CRlxTrfr.js +12 -0
  46. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/home-BNjpNKdt.js +1 -0
  47. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/index-B4OsjuJp.css +2 -0
  48. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/index-CXR0dKJj.js +10 -0
  49. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/input-BRu0b1Tq.js +1 -0
  50. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/integrations-BWC7iPQ5.js +1 -0
  51. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
  52. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
  53. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
  54. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
  55. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
  56. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
  57. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
  58. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/invite._invitationId-DmJnR4R5.js +1 -0
  59. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/jsx-runtime-DG_AJzB_.js +1 -0
  60. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/label-f2wVZcni.js +1 -0
  61. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/link-Cgvqhh5w.js +1 -0
  62. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/matchContext-CDajBC0L.js +1 -0
  63. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/organization-permissions-BXV_ess0.js +1 -0
  64. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/organization-query-keys-ieaSNxMR.js +1 -0
  65. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/query-CY--GYXb.js +1 -0
  66. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/query-timing-YBkSOxxF.js +1 -0
  67. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/queryOptions-bXtOUR_h.js +1 -0
  68. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/routes-CxJ2aoMf.js +1 -0
  69. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/schemas-EcBBwCo1.js +64 -0
  70. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/select-yNaL0SXM.js +1 -0
  71. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/separator-BH7Gsum-.js +1 -0
  72. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/settings-C8us2bWX.js +1 -0
  73. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/signin-BgfqB9QB.js +1 -0
  74. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/src-C5F1uEDb.js +1 -0
  75. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/team-CYPsHFTt.js +1 -0
  76. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/textarea-CnA77PLS.js +1 -0
  77. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/theme-toggle-CRaDbyxE.js +1 -0
  78. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/use-optimistic-mutation-3PPnMc-O.js +1 -0
  79. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/useBaseQuery-CO5Q8xm4.js +1 -0
  80. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/useBaseUiId-CtNp109T.js +1 -0
  81. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/useCompositeItem-D243hyne.js +1 -0
  82. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/useControlled-C-85HRFr.js +1 -0
  83. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/useQuery-DyOxsY45.js +1 -0
  84. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/useRender-CzpKCg11.js +1 -0
  85. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/useRouterState-DpT8luFk.js +1 -0
  86. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/useSuspenseQuery-CBFRU4At.js +1 -0
  87. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/useValueChanged-BNrgSVVM.js +1 -0
  88. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/utils-C8DGLIgm.js +1 -0
  89. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/xstate-react.esm-Bo3CCIRt.js +1 -0
  90. package/vendor/x86_64-apple-darwin/runtime/dashboard/assets/zod-D0PWrP9q.js +1 -0
  91. package/vendor/x86_64-apple-darwin/runtime/dashboard/favicon.ico +0 -0
  92. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/amplitude/step1_settings_sidebar.png +0 -0
  93. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/amplitude/step2_projects.png +0 -0
  94. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/amplitude/step3_project_keys.png +0 -0
  95. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/amplitude/step4_api_keys.png +0 -0
  96. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/bigquery/step1_service_accounts.png +0 -0
  97. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/bigquery/step2_bigquery_roles.png +0 -0
  98. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/bigquery/step3_add_key_menu.png +0 -0
  99. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/bigquery/step4_create_json_key.png +0 -0
  100. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/cloudflare-workers-observability/step2_enable_workers_logs.png +0 -0
  101. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/cloudflare-workers-observability/step3_user_api_tokens.png +0 -0
  102. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/cloudflare-workers-observability/step4_create_api_token.png +0 -0
  103. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/cloudflare-workers-observability/step5_workers_pages_account_id.png +0 -0
  104. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/cloudflare-workers-observability/step6_workers_observability_permission.png +0 -0
  105. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/ga4/step1_service_accounts.png +0 -0
  106. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/ga4/step2_create_json_key.png +0 -0
  107. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/ga4/step3_add_user_viewer.png +0 -0
  108. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/ga4/step4_property_details.png +0 -0
  109. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/github-token-guide/step1_signin.png +0 -0
  110. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/github-token-guide/step2_new_fine_grained_token_sanitized.png +0 -0
  111. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/github-token-guide/step3_permissions_configured_sanitized.png +0 -0
  112. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/github-token-guide/step4_token_created_sanitized.png +0 -0
  113. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/google-search-console/step1_confirm_property.png +0 -0
  114. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/google-search-console/step2_scope_selected.png +0 -0
  115. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/google-search-console/step3_copy_access_token.png +0 -0
  116. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/mixpanel/step1_service_accounts.png +0 -0
  117. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/mixpanel/step2_create_service_account.png +0 -0
  118. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/mixpanel/step3_credentials.png +0 -0
  119. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/mixpanel/step4_project_settings.png +0 -0
  120. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/postgresql/step1_create_user.png +0 -0
  121. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/postgresql/step2_connection.png +0 -0
  122. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/posthog/step1_project_settings.png +0 -0
  123. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/posthog/step2_personal_api_keys.png +0 -0
  124. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/posthog/step3_create_key_modal.png +0 -0
  125. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/rds/step1_connect.png +0 -0
  126. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/rds/step2_create_user.png +0 -0
  127. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/rds/step3_grant.png +0 -0
  128. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/rds/step4_info.png +0 -0
  129. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/sentry/step1_personal_tokens.png +0 -0
  130. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/sentry/step2_create_token_permissions.png +0 -0
  131. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/sentry/step3_organization_slug.png +0 -0
  132. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/sentry/step4_project_slug.png +0 -0
  133. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/vercel/step1_tokens_page.png +0 -0
  134. package/vendor/x86_64-apple-darwin/runtime/dashboard/images/vercel/step2_configure_token.png +0 -0
  135. package/vendor/x86_64-apple-darwin/runtime/dashboard/index.html +47 -0
  136. package/vendor/x86_64-apple-darwin/runtime/dashboard/onequery.svg +44 -0
  137. package/vendor/x86_64-apple-darwin/runtime/migrations/20260327065242_curious_nightmare.sql +403 -0
  138. package/vendor/x86_64-apple-darwin/runtime/migrations/20260403103652_slippery_hellfire_club.sql +8 -0
  139. package/vendor/x86_64-apple-darwin/runtime/migrations/20260403112219_gigantic_namora.sql +1 -0
  140. package/vendor/x86_64-apple-darwin/runtime/migrations/20260420071232_previous_justin_hammer.sql +141 -0
  141. package/vendor/x86_64-apple-darwin/runtime/migrations/20260420093157_spooky_cassandra_nova.sql +29 -0
  142. package/vendor/x86_64-apple-darwin/runtime/migrations/20260420101631_even_ogun.sql +5 -0
  143. package/vendor/x86_64-apple-darwin/runtime/migrations/20260425110519_smart_amazoness.sql +8 -0
  144. package/vendor/x86_64-apple-darwin/runtime/migrations/20260428033542_rename_source_query_interface_missing.sql +36 -0
  145. package/vendor/x86_64-apple-darwin/runtime/migrations/20260430114113_jittery_scorpion.sql +28 -0
  146. package/vendor/x86_64-apple-darwin/runtime/migrations/20260430135906_flippant_timeslip.sql +4 -0
  147. package/vendor/x86_64-apple-darwin/runtime/migrations/20260502000100_drop_old_workflow_audit_tables.sql +15 -0
  148. package/vendor/x86_64-apple-darwin/runtime/migrations/20260503011110_moaning_jack_flag.sql +22 -0
  149. package/vendor/x86_64-apple-darwin/runtime/migrations/20260514143216_reset_workflow_audit_history.sql +20 -0
  150. package/vendor/x86_64-apple-darwin/runtime/migrations/20260524081943_colorful_firelord.sql +1 -0
  151. package/vendor/x86_64-apple-darwin/runtime/migrations/meta/20260327065242_snapshot.json +2817 -0
  152. package/vendor/x86_64-apple-darwin/runtime/migrations/meta/20260403103652_snapshot.json +2864 -0
  153. package/vendor/x86_64-apple-darwin/runtime/migrations/meta/20260403112219_snapshot.json +2870 -0
  154. package/vendor/x86_64-apple-darwin/runtime/migrations/meta/20260420071232_snapshot.json +3879 -0
  155. package/vendor/x86_64-apple-darwin/runtime/migrations/meta/20260420093157_snapshot.json +4088 -0
  156. package/vendor/x86_64-apple-darwin/runtime/migrations/meta/20260420101631_snapshot.json +3250 -0
  157. package/vendor/x86_64-apple-darwin/runtime/migrations/meta/20260425110519_snapshot.json +3250 -0
  158. package/vendor/x86_64-apple-darwin/runtime/migrations/meta/20260428033542_snapshot.json +3250 -0
  159. package/vendor/x86_64-apple-darwin/runtime/migrations/meta/20260430114113_snapshot.json +3507 -0
  160. package/vendor/x86_64-apple-darwin/runtime/migrations/meta/20260430135906_snapshot.json +3531 -0
  161. package/vendor/x86_64-apple-darwin/runtime/migrations/meta/20260503011110_snapshot.json +3089 -0
  162. package/vendor/x86_64-apple-darwin/runtime/migrations/meta/20260524081943_snapshot.json +3082 -0
  163. package/vendor/x86_64-apple-darwin/runtime/migrations/meta/_journal.json +104 -0
  164. package/vendor/x86_64-apple-darwin/runtime/pglite/initdb.wasm +0 -0
  165. package/vendor/x86_64-apple-darwin/runtime/pglite/pglite.data +0 -0
  166. package/vendor/x86_64-apple-darwin/runtime/pglite/pglite.wasm +0 -0
  167. package/vendor/x86_64-apple-darwin/server/onequery-server.mjs +447972 -0
  168. package/vendor/x86_64-apple-darwin/server/polyglot_sql_wasm_bg.wasm +0 -0
  169. package/bin/onequery.js +0 -266
  170. package/bin/package-constants.d.ts +0 -75
  171. package/bin/package-constants.js +0 -160
  172. package/runtime-bundle.json +0 -55
@@ -0,0 +1,3082 @@
1
+ {
2
+ "id": "1d334e32-9ef9-49ab-95a7-bbe4f4a81f99",
3
+ "prevId": "f58f7228-f627-42d9-8ff4-f74df8e58381",
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.connector_jobs": {
1256
+ "name": "connector_jobs",
1257
+ "schema": "",
1258
+ "columns": {
1259
+ "completed_at": {
1260
+ "name": "completed_at",
1261
+ "type": "timestamp with time zone",
1262
+ "primaryKey": false,
1263
+ "notNull": false
1264
+ },
1265
+ "connector_id": {
1266
+ "name": "connector_id",
1267
+ "type": "text",
1268
+ "primaryKey": false,
1269
+ "notNull": true
1270
+ },
1271
+ "created_at": {
1272
+ "name": "created_at",
1273
+ "type": "timestamp with time zone",
1274
+ "primaryKey": false,
1275
+ "notNull": true,
1276
+ "default": "now()"
1277
+ },
1278
+ "database": {
1279
+ "name": "database",
1280
+ "type": "text",
1281
+ "primaryKey": false,
1282
+ "notNull": true
1283
+ },
1284
+ "job_id": {
1285
+ "name": "job_id",
1286
+ "type": "text",
1287
+ "primaryKey": true,
1288
+ "notNull": true
1289
+ },
1290
+ "leased_at": {
1291
+ "name": "leased_at",
1292
+ "type": "timestamp with time zone",
1293
+ "primaryKey": false,
1294
+ "notNull": false
1295
+ },
1296
+ "max_rows": {
1297
+ "name": "max_rows",
1298
+ "type": "integer",
1299
+ "primaryKey": false,
1300
+ "notNull": false
1301
+ },
1302
+ "outcome": {
1303
+ "name": "outcome",
1304
+ "type": "jsonb",
1305
+ "primaryKey": false,
1306
+ "notNull": false
1307
+ },
1308
+ "sql": {
1309
+ "name": "sql",
1310
+ "type": "text",
1311
+ "primaryKey": false,
1312
+ "notNull": true
1313
+ },
1314
+ "status": {
1315
+ "name": "status",
1316
+ "type": "text",
1317
+ "primaryKey": false,
1318
+ "notNull": true
1319
+ },
1320
+ "timeout_ms": {
1321
+ "name": "timeout_ms",
1322
+ "type": "integer",
1323
+ "primaryKey": false,
1324
+ "notNull": false
1325
+ },
1326
+ "updated_at": {
1327
+ "name": "updated_at",
1328
+ "type": "timestamp with time zone",
1329
+ "primaryKey": false,
1330
+ "notNull": true,
1331
+ "default": "now()"
1332
+ },
1333
+ "workgroup": {
1334
+ "name": "workgroup",
1335
+ "type": "text",
1336
+ "primaryKey": false,
1337
+ "notNull": false
1338
+ }
1339
+ },
1340
+ "indexes": {
1341
+ "idx_connector_jobs_connector_created": {
1342
+ "name": "idx_connector_jobs_connector_created",
1343
+ "columns": [
1344
+ {
1345
+ "expression": "connector_id",
1346
+ "isExpression": false,
1347
+ "asc": true,
1348
+ "nulls": "last"
1349
+ },
1350
+ {
1351
+ "expression": "created_at",
1352
+ "isExpression": false,
1353
+ "asc": true,
1354
+ "nulls": "last"
1355
+ }
1356
+ ],
1357
+ "isUnique": false,
1358
+ "concurrently": false,
1359
+ "method": "btree",
1360
+ "with": {}
1361
+ },
1362
+ "idx_connector_jobs_status_created": {
1363
+ "name": "idx_connector_jobs_status_created",
1364
+ "columns": [
1365
+ {
1366
+ "expression": "status",
1367
+ "isExpression": false,
1368
+ "asc": true,
1369
+ "nulls": "last"
1370
+ },
1371
+ {
1372
+ "expression": "created_at",
1373
+ "isExpression": false,
1374
+ "asc": true,
1375
+ "nulls": "last"
1376
+ }
1377
+ ],
1378
+ "isUnique": false,
1379
+ "concurrently": false,
1380
+ "method": "btree",
1381
+ "with": {}
1382
+ }
1383
+ },
1384
+ "foreignKeys": {
1385
+ "connector_jobs_connector_id_connectors_connector_id_fk": {
1386
+ "name": "connector_jobs_connector_id_connectors_connector_id_fk",
1387
+ "tableFrom": "connector_jobs",
1388
+ "tableTo": "connectors",
1389
+ "columnsFrom": ["connector_id"],
1390
+ "columnsTo": ["connector_id"],
1391
+ "onDelete": "cascade",
1392
+ "onUpdate": "no action"
1393
+ }
1394
+ },
1395
+ "compositePrimaryKeys": {},
1396
+ "uniqueConstraints": {},
1397
+ "policies": {},
1398
+ "checkConstraints": {},
1399
+ "isRLSEnabled": true
1400
+ },
1401
+ "public.connectors": {
1402
+ "name": "connectors",
1403
+ "schema": "",
1404
+ "columns": {
1405
+ "auth_token_hash": {
1406
+ "name": "auth_token_hash",
1407
+ "type": "text",
1408
+ "primaryKey": false,
1409
+ "notNull": true
1410
+ },
1411
+ "connector_id": {
1412
+ "name": "connector_id",
1413
+ "type": "text",
1414
+ "primaryKey": true,
1415
+ "notNull": true
1416
+ },
1417
+ "connector_name": {
1418
+ "name": "connector_name",
1419
+ "type": "text",
1420
+ "primaryKey": false,
1421
+ "notNull": true
1422
+ },
1423
+ "health_status": {
1424
+ "name": "health_status",
1425
+ "type": "text",
1426
+ "primaryKey": false,
1427
+ "notNull": false
1428
+ },
1429
+ "last_heartbeat_at": {
1430
+ "name": "last_heartbeat_at",
1431
+ "type": "timestamp with time zone",
1432
+ "primaryKey": false,
1433
+ "notNull": false
1434
+ },
1435
+ "last_seen_at": {
1436
+ "name": "last_seen_at",
1437
+ "type": "timestamp with time zone",
1438
+ "primaryKey": false,
1439
+ "notNull": false
1440
+ },
1441
+ "metadata": {
1442
+ "name": "metadata",
1443
+ "type": "jsonb",
1444
+ "primaryKey": false,
1445
+ "notNull": false
1446
+ },
1447
+ "organization_id": {
1448
+ "name": "organization_id",
1449
+ "type": "text",
1450
+ "primaryKey": false,
1451
+ "notNull": true
1452
+ },
1453
+ "registered_at": {
1454
+ "name": "registered_at",
1455
+ "type": "timestamp with time zone",
1456
+ "primaryKey": false,
1457
+ "notNull": true,
1458
+ "default": "now()"
1459
+ },
1460
+ "updated_at": {
1461
+ "name": "updated_at",
1462
+ "type": "timestamp with time zone",
1463
+ "primaryKey": false,
1464
+ "notNull": true,
1465
+ "default": "now()"
1466
+ }
1467
+ },
1468
+ "indexes": {
1469
+ "idx_connectors_organization": {
1470
+ "name": "idx_connectors_organization",
1471
+ "columns": [
1472
+ {
1473
+ "expression": "organization_id",
1474
+ "isExpression": false,
1475
+ "asc": true,
1476
+ "nulls": "last"
1477
+ }
1478
+ ],
1479
+ "isUnique": false,
1480
+ "concurrently": false,
1481
+ "method": "btree",
1482
+ "with": {}
1483
+ },
1484
+ "idx_connectors_last_seen": {
1485
+ "name": "idx_connectors_last_seen",
1486
+ "columns": [
1487
+ {
1488
+ "expression": "last_seen_at",
1489
+ "isExpression": false,
1490
+ "asc": true,
1491
+ "nulls": "last"
1492
+ }
1493
+ ],
1494
+ "isUnique": false,
1495
+ "concurrently": false,
1496
+ "method": "btree",
1497
+ "with": {}
1498
+ },
1499
+ "idx_connectors_auth_token_hash_unique": {
1500
+ "name": "idx_connectors_auth_token_hash_unique",
1501
+ "columns": [
1502
+ {
1503
+ "expression": "auth_token_hash",
1504
+ "isExpression": false,
1505
+ "asc": true,
1506
+ "nulls": "last"
1507
+ }
1508
+ ],
1509
+ "isUnique": true,
1510
+ "concurrently": false,
1511
+ "method": "btree",
1512
+ "with": {}
1513
+ }
1514
+ },
1515
+ "foreignKeys": {
1516
+ "connectors_organization_id_organization_id_fk": {
1517
+ "name": "connectors_organization_id_organization_id_fk",
1518
+ "tableFrom": "connectors",
1519
+ "tableTo": "organization",
1520
+ "columnsFrom": ["organization_id"],
1521
+ "columnsTo": ["id"],
1522
+ "onDelete": "cascade",
1523
+ "onUpdate": "no action"
1524
+ }
1525
+ },
1526
+ "compositePrimaryKeys": {},
1527
+ "uniqueConstraints": {},
1528
+ "policies": {},
1529
+ "checkConstraints": {},
1530
+ "isRLSEnabled": true
1531
+ },
1532
+ "public.data_source_query_costs": {
1533
+ "name": "data_source_query_costs",
1534
+ "schema": "",
1535
+ "columns": {
1536
+ "actual_cost_usd": {
1537
+ "name": "actual_cost_usd",
1538
+ "type": "double precision",
1539
+ "primaryKey": false,
1540
+ "notNull": false
1541
+ },
1542
+ "actual_processed_bytes": {
1543
+ "name": "actual_processed_bytes",
1544
+ "type": "bigint",
1545
+ "primaryKey": false,
1546
+ "notNull": false
1547
+ },
1548
+ "billable_bytes": {
1549
+ "name": "billable_bytes",
1550
+ "type": "bigint",
1551
+ "primaryKey": false,
1552
+ "notNull": false
1553
+ },
1554
+ "cache_hit": {
1555
+ "name": "cache_hit",
1556
+ "type": "boolean",
1557
+ "primaryKey": false,
1558
+ "notNull": false
1559
+ },
1560
+ "connection_name": {
1561
+ "name": "connection_name",
1562
+ "type": "text",
1563
+ "primaryKey": false,
1564
+ "notNull": true
1565
+ },
1566
+ "connector_id": {
1567
+ "name": "connector_id",
1568
+ "type": "text",
1569
+ "primaryKey": false,
1570
+ "notNull": false
1571
+ },
1572
+ "created_at": {
1573
+ "name": "created_at",
1574
+ "type": "timestamp with time zone",
1575
+ "primaryKey": false,
1576
+ "notNull": true,
1577
+ "default": "now()"
1578
+ },
1579
+ "currency": {
1580
+ "name": "currency",
1581
+ "type": "text",
1582
+ "primaryKey": false,
1583
+ "notNull": true,
1584
+ "default": "'USD'"
1585
+ },
1586
+ "database": {
1587
+ "name": "database",
1588
+ "type": "text",
1589
+ "primaryKey": false,
1590
+ "notNull": false
1591
+ },
1592
+ "estimated_cost_usd": {
1593
+ "name": "estimated_cost_usd",
1594
+ "type": "double precision",
1595
+ "primaryKey": false,
1596
+ "notNull": false
1597
+ },
1598
+ "estimated_processed_bytes": {
1599
+ "name": "estimated_processed_bytes",
1600
+ "type": "bigint",
1601
+ "primaryKey": false,
1602
+ "notNull": false
1603
+ },
1604
+ "executed_at": {
1605
+ "name": "executed_at",
1606
+ "type": "timestamp with time zone",
1607
+ "primaryKey": false,
1608
+ "notNull": true
1609
+ },
1610
+ "execution_time_ms": {
1611
+ "name": "execution_time_ms",
1612
+ "type": "integer",
1613
+ "primaryKey": false,
1614
+ "notNull": false
1615
+ },
1616
+ "id": {
1617
+ "name": "id",
1618
+ "type": "text",
1619
+ "primaryKey": true,
1620
+ "notNull": true
1621
+ },
1622
+ "job_id": {
1623
+ "name": "job_id",
1624
+ "type": "text",
1625
+ "primaryKey": false,
1626
+ "notNull": false
1627
+ },
1628
+ "location": {
1629
+ "name": "location",
1630
+ "type": "text",
1631
+ "primaryKey": false,
1632
+ "notNull": false
1633
+ },
1634
+ "organization_id": {
1635
+ "name": "organization_id",
1636
+ "type": "text",
1637
+ "primaryKey": false,
1638
+ "notNull": true
1639
+ },
1640
+ "pricing_model": {
1641
+ "name": "pricing_model",
1642
+ "type": "text",
1643
+ "primaryKey": false,
1644
+ "notNull": true,
1645
+ "default": "'unknown'"
1646
+ },
1647
+ "provider": {
1648
+ "name": "provider",
1649
+ "type": "text",
1650
+ "primaryKey": false,
1651
+ "notNull": true
1652
+ },
1653
+ "query_execution_id": {
1654
+ "name": "query_execution_id",
1655
+ "type": "text",
1656
+ "primaryKey": false,
1657
+ "notNull": false
1658
+ },
1659
+ "query_id": {
1660
+ "name": "query_id",
1661
+ "type": "text",
1662
+ "primaryKey": false,
1663
+ "notNull": true
1664
+ },
1665
+ "row_count": {
1666
+ "name": "row_count",
1667
+ "type": "integer",
1668
+ "primaryKey": false,
1669
+ "notNull": false
1670
+ },
1671
+ "tool_call_id": {
1672
+ "name": "tool_call_id",
1673
+ "type": "text",
1674
+ "primaryKey": false,
1675
+ "notNull": true
1676
+ },
1677
+ "workgroup": {
1678
+ "name": "workgroup",
1679
+ "type": "text",
1680
+ "primaryKey": false,
1681
+ "notNull": false
1682
+ }
1683
+ },
1684
+ "indexes": {
1685
+ "idx_data_source_query_costs_org": {
1686
+ "name": "idx_data_source_query_costs_org",
1687
+ "columns": [
1688
+ {
1689
+ "expression": "organization_id",
1690
+ "isExpression": false,
1691
+ "asc": true,
1692
+ "nulls": "last"
1693
+ }
1694
+ ],
1695
+ "isUnique": false,
1696
+ "concurrently": false,
1697
+ "method": "btree",
1698
+ "with": {}
1699
+ },
1700
+ "idx_data_source_query_costs_provider": {
1701
+ "name": "idx_data_source_query_costs_provider",
1702
+ "columns": [
1703
+ {
1704
+ "expression": "provider",
1705
+ "isExpression": false,
1706
+ "asc": true,
1707
+ "nulls": "last"
1708
+ }
1709
+ ],
1710
+ "isUnique": false,
1711
+ "concurrently": false,
1712
+ "method": "btree",
1713
+ "with": {}
1714
+ },
1715
+ "idx_data_source_query_costs_executed_at": {
1716
+ "name": "idx_data_source_query_costs_executed_at",
1717
+ "columns": [
1718
+ {
1719
+ "expression": "executed_at",
1720
+ "isExpression": false,
1721
+ "asc": true,
1722
+ "nulls": "last"
1723
+ }
1724
+ ],
1725
+ "isUnique": false,
1726
+ "concurrently": false,
1727
+ "method": "btree",
1728
+ "with": {}
1729
+ }
1730
+ },
1731
+ "foreignKeys": {
1732
+ "data_source_query_costs_connector_id_connectors_connector_id_fk": {
1733
+ "name": "data_source_query_costs_connector_id_connectors_connector_id_fk",
1734
+ "tableFrom": "data_source_query_costs",
1735
+ "tableTo": "connectors",
1736
+ "columnsFrom": ["connector_id"],
1737
+ "columnsTo": ["connector_id"],
1738
+ "onDelete": "cascade",
1739
+ "onUpdate": "no action"
1740
+ },
1741
+ "data_source_query_costs_organization_id_organization_id_fk": {
1742
+ "name": "data_source_query_costs_organization_id_organization_id_fk",
1743
+ "tableFrom": "data_source_query_costs",
1744
+ "tableTo": "organization",
1745
+ "columnsFrom": ["organization_id"],
1746
+ "columnsTo": ["id"],
1747
+ "onDelete": "cascade",
1748
+ "onUpdate": "no action"
1749
+ }
1750
+ },
1751
+ "compositePrimaryKeys": {},
1752
+ "uniqueConstraints": {},
1753
+ "policies": {},
1754
+ "checkConstraints": {},
1755
+ "isRLSEnabled": true
1756
+ },
1757
+ "public.data_sources": {
1758
+ "name": "data_sources",
1759
+ "schema": "",
1760
+ "columns": {
1761
+ "created_at": {
1762
+ "name": "created_at",
1763
+ "type": "timestamp with time zone",
1764
+ "primaryKey": false,
1765
+ "notNull": true,
1766
+ "default": "now()"
1767
+ },
1768
+ "credentials_encrypted": {
1769
+ "name": "credentials_encrypted",
1770
+ "type": "text",
1771
+ "primaryKey": false,
1772
+ "notNull": true
1773
+ },
1774
+ "credentials_iv": {
1775
+ "name": "credentials_iv",
1776
+ "type": "text",
1777
+ "primaryKey": false,
1778
+ "notNull": true
1779
+ },
1780
+ "error_message": {
1781
+ "name": "error_message",
1782
+ "type": "text",
1783
+ "primaryKey": false,
1784
+ "notNull": false
1785
+ },
1786
+ "id": {
1787
+ "name": "id",
1788
+ "type": "text",
1789
+ "primaryKey": true,
1790
+ "notNull": true
1791
+ },
1792
+ "last_used_at": {
1793
+ "name": "last_used_at",
1794
+ "type": "timestamp with time zone",
1795
+ "primaryKey": false,
1796
+ "notNull": false
1797
+ },
1798
+ "name": {
1799
+ "name": "name",
1800
+ "type": "text",
1801
+ "primaryKey": false,
1802
+ "notNull": true
1803
+ },
1804
+ "organization_id": {
1805
+ "name": "organization_id",
1806
+ "type": "text",
1807
+ "primaryKey": false,
1808
+ "notNull": true
1809
+ },
1810
+ "provider": {
1811
+ "name": "provider",
1812
+ "type": "text",
1813
+ "primaryKey": false,
1814
+ "notNull": true
1815
+ },
1816
+ "provider_account_id": {
1817
+ "name": "provider_account_id",
1818
+ "type": "text",
1819
+ "primaryKey": false,
1820
+ "notNull": false
1821
+ },
1822
+ "scope": {
1823
+ "name": "scope",
1824
+ "type": "text",
1825
+ "primaryKey": false,
1826
+ "notNull": false
1827
+ },
1828
+ "status": {
1829
+ "name": "status",
1830
+ "type": "text",
1831
+ "primaryKey": false,
1832
+ "notNull": true,
1833
+ "default": "'active'"
1834
+ },
1835
+ "updated_at": {
1836
+ "name": "updated_at",
1837
+ "type": "timestamp with time zone",
1838
+ "primaryKey": false,
1839
+ "notNull": true,
1840
+ "default": "now()"
1841
+ }
1842
+ },
1843
+ "indexes": {
1844
+ "idx_data_sources_organization": {
1845
+ "name": "idx_data_sources_organization",
1846
+ "columns": [
1847
+ {
1848
+ "expression": "organization_id",
1849
+ "isExpression": false,
1850
+ "asc": true,
1851
+ "nulls": "last"
1852
+ }
1853
+ ],
1854
+ "isUnique": false,
1855
+ "concurrently": false,
1856
+ "method": "btree",
1857
+ "with": {}
1858
+ },
1859
+ "idx_data_sources_provider": {
1860
+ "name": "idx_data_sources_provider",
1861
+ "columns": [
1862
+ {
1863
+ "expression": "provider",
1864
+ "isExpression": false,
1865
+ "asc": true,
1866
+ "nulls": "last"
1867
+ }
1868
+ ],
1869
+ "isUnique": false,
1870
+ "concurrently": false,
1871
+ "method": "btree",
1872
+ "with": {}
1873
+ },
1874
+ "idx_data_sources_provider_account": {
1875
+ "name": "idx_data_sources_provider_account",
1876
+ "columns": [
1877
+ {
1878
+ "expression": "provider",
1879
+ "isExpression": false,
1880
+ "asc": true,
1881
+ "nulls": "last"
1882
+ },
1883
+ {
1884
+ "expression": "provider_account_id",
1885
+ "isExpression": false,
1886
+ "asc": true,
1887
+ "nulls": "last"
1888
+ }
1889
+ ],
1890
+ "isUnique": false,
1891
+ "concurrently": false,
1892
+ "method": "btree",
1893
+ "with": {}
1894
+ },
1895
+ "idx_data_sources_status": {
1896
+ "name": "idx_data_sources_status",
1897
+ "columns": [
1898
+ {
1899
+ "expression": "status",
1900
+ "isExpression": false,
1901
+ "asc": true,
1902
+ "nulls": "last"
1903
+ }
1904
+ ],
1905
+ "isUnique": false,
1906
+ "concurrently": false,
1907
+ "method": "btree",
1908
+ "with": {}
1909
+ }
1910
+ },
1911
+ "foreignKeys": {
1912
+ "data_sources_organization_id_organization_id_fk": {
1913
+ "name": "data_sources_organization_id_organization_id_fk",
1914
+ "tableFrom": "data_sources",
1915
+ "tableTo": "organization",
1916
+ "columnsFrom": ["organization_id"],
1917
+ "columnsTo": ["id"],
1918
+ "onDelete": "cascade",
1919
+ "onUpdate": "no action"
1920
+ }
1921
+ },
1922
+ "compositePrimaryKeys": {},
1923
+ "uniqueConstraints": {
1924
+ "data_sources_organization_name_unique": {
1925
+ "name": "data_sources_organization_name_unique",
1926
+ "nullsNotDistinct": false,
1927
+ "columns": ["organization_id", "name"]
1928
+ }
1929
+ },
1930
+ "policies": {},
1931
+ "checkConstraints": {},
1932
+ "isRLSEnabled": true
1933
+ },
1934
+ "public.data_source_table_usage": {
1935
+ "name": "data_source_table_usage",
1936
+ "schema": "",
1937
+ "columns": {
1938
+ "column_memos": {
1939
+ "name": "column_memos",
1940
+ "type": "jsonb",
1941
+ "primaryKey": false,
1942
+ "notNull": true,
1943
+ "default": "'{}'::jsonb"
1944
+ },
1945
+ "created_at": {
1946
+ "name": "created_at",
1947
+ "type": "timestamp with time zone",
1948
+ "primaryKey": false,
1949
+ "notNull": true,
1950
+ "default": "now()"
1951
+ },
1952
+ "data_source_id": {
1953
+ "name": "data_source_id",
1954
+ "type": "text",
1955
+ "primaryKey": false,
1956
+ "notNull": true
1957
+ },
1958
+ "formatted": {
1959
+ "name": "formatted",
1960
+ "type": "text",
1961
+ "primaryKey": false,
1962
+ "notNull": true
1963
+ },
1964
+ "generated_at": {
1965
+ "name": "generated_at",
1966
+ "type": "timestamp with time zone",
1967
+ "primaryKey": false,
1968
+ "notNull": true
1969
+ },
1970
+ "id": {
1971
+ "name": "id",
1972
+ "type": "text",
1973
+ "primaryKey": true,
1974
+ "notNull": true
1975
+ },
1976
+ "memo_updated_at": {
1977
+ "name": "memo_updated_at",
1978
+ "type": "timestamp with time zone",
1979
+ "primaryKey": false,
1980
+ "notNull": false
1981
+ },
1982
+ "memo_updated_by": {
1983
+ "name": "memo_updated_by",
1984
+ "type": "text",
1985
+ "primaryKey": false,
1986
+ "notNull": false
1987
+ },
1988
+ "organization_id": {
1989
+ "name": "organization_id",
1990
+ "type": "text",
1991
+ "primaryKey": false,
1992
+ "notNull": true
1993
+ },
1994
+ "provider": {
1995
+ "name": "provider",
1996
+ "type": "text",
1997
+ "primaryKey": false,
1998
+ "notNull": true
1999
+ },
2000
+ "schema_hash": {
2001
+ "name": "schema_hash",
2002
+ "type": "text",
2003
+ "primaryKey": false,
2004
+ "notNull": false
2005
+ },
2006
+ "table_lineage": {
2007
+ "name": "table_lineage",
2008
+ "type": "jsonb",
2009
+ "primaryKey": false,
2010
+ "notNull": true,
2011
+ "default": "'{}'::jsonb"
2012
+ },
2013
+ "table_memos": {
2014
+ "name": "table_memos",
2015
+ "type": "jsonb",
2016
+ "primaryKey": false,
2017
+ "notNull": true,
2018
+ "default": "'{}'::jsonb"
2019
+ },
2020
+ "tables": {
2021
+ "name": "tables",
2022
+ "type": "jsonb",
2023
+ "primaryKey": false,
2024
+ "notNull": true
2025
+ },
2026
+ "updated_at": {
2027
+ "name": "updated_at",
2028
+ "type": "timestamp with time zone",
2029
+ "primaryKey": false,
2030
+ "notNull": true,
2031
+ "default": "now()"
2032
+ }
2033
+ },
2034
+ "indexes": {
2035
+ "idx_data_source_table_usage_source": {
2036
+ "name": "idx_data_source_table_usage_source",
2037
+ "columns": [
2038
+ {
2039
+ "expression": "data_source_id",
2040
+ "isExpression": false,
2041
+ "asc": true,
2042
+ "nulls": "last"
2043
+ }
2044
+ ],
2045
+ "isUnique": true,
2046
+ "concurrently": false,
2047
+ "method": "btree",
2048
+ "with": {}
2049
+ },
2050
+ "idx_data_source_table_usage_org": {
2051
+ "name": "idx_data_source_table_usage_org",
2052
+ "columns": [
2053
+ {
2054
+ "expression": "organization_id",
2055
+ "isExpression": false,
2056
+ "asc": true,
2057
+ "nulls": "last"
2058
+ }
2059
+ ],
2060
+ "isUnique": false,
2061
+ "concurrently": false,
2062
+ "method": "btree",
2063
+ "with": {}
2064
+ },
2065
+ "idx_data_source_table_usage_provider": {
2066
+ "name": "idx_data_source_table_usage_provider",
2067
+ "columns": [
2068
+ {
2069
+ "expression": "provider",
2070
+ "isExpression": false,
2071
+ "asc": true,
2072
+ "nulls": "last"
2073
+ }
2074
+ ],
2075
+ "isUnique": false,
2076
+ "concurrently": false,
2077
+ "method": "btree",
2078
+ "with": {}
2079
+ },
2080
+ "idx_data_source_table_usage_generated_at": {
2081
+ "name": "idx_data_source_table_usage_generated_at",
2082
+ "columns": [
2083
+ {
2084
+ "expression": "generated_at",
2085
+ "isExpression": false,
2086
+ "asc": true,
2087
+ "nulls": "last"
2088
+ }
2089
+ ],
2090
+ "isUnique": false,
2091
+ "concurrently": false,
2092
+ "method": "btree",
2093
+ "with": {}
2094
+ }
2095
+ },
2096
+ "foreignKeys": {
2097
+ "data_source_table_usage_data_source_id_data_sources_id_fk": {
2098
+ "name": "data_source_table_usage_data_source_id_data_sources_id_fk",
2099
+ "tableFrom": "data_source_table_usage",
2100
+ "tableTo": "data_sources",
2101
+ "columnsFrom": ["data_source_id"],
2102
+ "columnsTo": ["id"],
2103
+ "onDelete": "cascade",
2104
+ "onUpdate": "no action"
2105
+ },
2106
+ "data_source_table_usage_memo_updated_by_user_id_fk": {
2107
+ "name": "data_source_table_usage_memo_updated_by_user_id_fk",
2108
+ "tableFrom": "data_source_table_usage",
2109
+ "tableTo": "user",
2110
+ "columnsFrom": ["memo_updated_by"],
2111
+ "columnsTo": ["id"],
2112
+ "onDelete": "set null",
2113
+ "onUpdate": "no action"
2114
+ },
2115
+ "data_source_table_usage_organization_id_organization_id_fk": {
2116
+ "name": "data_source_table_usage_organization_id_organization_id_fk",
2117
+ "tableFrom": "data_source_table_usage",
2118
+ "tableTo": "organization",
2119
+ "columnsFrom": ["organization_id"],
2120
+ "columnsTo": ["id"],
2121
+ "onDelete": "cascade",
2122
+ "onUpdate": "no action"
2123
+ }
2124
+ },
2125
+ "compositePrimaryKeys": {},
2126
+ "uniqueConstraints": {},
2127
+ "policies": {},
2128
+ "checkConstraints": {},
2129
+ "isRLSEnabled": true
2130
+ },
2131
+ "public.organization_profiles": {
2132
+ "name": "organization_profiles",
2133
+ "schema": "",
2134
+ "columns": {
2135
+ "id": {
2136
+ "name": "id",
2137
+ "type": "text",
2138
+ "primaryKey": true,
2139
+ "notNull": true
2140
+ },
2141
+ "organization_id": {
2142
+ "name": "organization_id",
2143
+ "type": "text",
2144
+ "primaryKey": false,
2145
+ "notNull": true
2146
+ },
2147
+ "north_star_metric": {
2148
+ "name": "north_star_metric",
2149
+ "type": "text",
2150
+ "primaryKey": false,
2151
+ "notNull": false
2152
+ },
2153
+ "kpis": {
2154
+ "name": "kpis",
2155
+ "type": "jsonb",
2156
+ "primaryKey": false,
2157
+ "notNull": true,
2158
+ "default": "'[]'::jsonb"
2159
+ },
2160
+ "website_url": {
2161
+ "name": "website_url",
2162
+ "type": "text",
2163
+ "primaryKey": false,
2164
+ "notNull": false
2165
+ },
2166
+ "monthly_budget_usd": {
2167
+ "name": "monthly_budget_usd",
2168
+ "type": "double precision",
2169
+ "primaryKey": false,
2170
+ "notNull": false
2171
+ },
2172
+ "created_at": {
2173
+ "name": "created_at",
2174
+ "type": "timestamp with time zone",
2175
+ "primaryKey": false,
2176
+ "notNull": true,
2177
+ "default": "now()"
2178
+ },
2179
+ "updated_at": {
2180
+ "name": "updated_at",
2181
+ "type": "timestamp with time zone",
2182
+ "primaryKey": false,
2183
+ "notNull": true,
2184
+ "default": "now()"
2185
+ }
2186
+ },
2187
+ "indexes": {
2188
+ "idx_org_profiles_org": {
2189
+ "name": "idx_org_profiles_org",
2190
+ "columns": [
2191
+ {
2192
+ "expression": "organization_id",
2193
+ "isExpression": false,
2194
+ "asc": true,
2195
+ "nulls": "last"
2196
+ }
2197
+ ],
2198
+ "isUnique": true,
2199
+ "concurrently": false,
2200
+ "method": "btree",
2201
+ "with": {}
2202
+ },
2203
+ "idx_org_profiles_created": {
2204
+ "name": "idx_org_profiles_created",
2205
+ "columns": [
2206
+ {
2207
+ "expression": "created_at",
2208
+ "isExpression": false,
2209
+ "asc": true,
2210
+ "nulls": "last"
2211
+ }
2212
+ ],
2213
+ "isUnique": false,
2214
+ "concurrently": false,
2215
+ "method": "btree",
2216
+ "with": {}
2217
+ }
2218
+ },
2219
+ "foreignKeys": {
2220
+ "organization_profiles_organization_id_organization_id_fk": {
2221
+ "name": "organization_profiles_organization_id_organization_id_fk",
2222
+ "tableFrom": "organization_profiles",
2223
+ "tableTo": "organization",
2224
+ "columnsFrom": ["organization_id"],
2225
+ "columnsTo": ["id"],
2226
+ "onDelete": "cascade",
2227
+ "onUpdate": "no action"
2228
+ }
2229
+ },
2230
+ "compositePrimaryKeys": {},
2231
+ "uniqueConstraints": {},
2232
+ "policies": {},
2233
+ "checkConstraints": {},
2234
+ "isRLSEnabled": true
2235
+ },
2236
+ "public.pending_workflow_effects": {
2237
+ "name": "pending_workflow_effects",
2238
+ "schema": "",
2239
+ "columns": {
2240
+ "attempt_count": {
2241
+ "name": "attempt_count",
2242
+ "type": "integer",
2243
+ "primaryKey": false,
2244
+ "notNull": true,
2245
+ "default": 0
2246
+ },
2247
+ "effect_id": {
2248
+ "name": "effect_id",
2249
+ "type": "text",
2250
+ "primaryKey": false,
2251
+ "notNull": true
2252
+ },
2253
+ "effect_type": {
2254
+ "name": "effect_type",
2255
+ "type": "text",
2256
+ "primaryKey": false,
2257
+ "notNull": true
2258
+ },
2259
+ "family": {
2260
+ "name": "family",
2261
+ "type": "text",
2262
+ "primaryKey": false,
2263
+ "notNull": true
2264
+ },
2265
+ "last_error_code": {
2266
+ "name": "last_error_code",
2267
+ "type": "text",
2268
+ "primaryKey": false,
2269
+ "notNull": false
2270
+ },
2271
+ "last_error_detail": {
2272
+ "name": "last_error_detail",
2273
+ "type": "text",
2274
+ "primaryKey": false,
2275
+ "notNull": false
2276
+ },
2277
+ "last_started_at": {
2278
+ "name": "last_started_at",
2279
+ "type": "timestamp with time zone",
2280
+ "primaryKey": false,
2281
+ "notNull": false
2282
+ },
2283
+ "organization_id": {
2284
+ "name": "organization_id",
2285
+ "type": "text",
2286
+ "primaryKey": false,
2287
+ "notNull": true
2288
+ },
2289
+ "payload_bytes": {
2290
+ "name": "payload_bytes",
2291
+ "type": "bytea",
2292
+ "primaryKey": false,
2293
+ "notNull": true
2294
+ },
2295
+ "scheduled_at": {
2296
+ "name": "scheduled_at",
2297
+ "type": "timestamp with time zone",
2298
+ "primaryKey": false,
2299
+ "notNull": true
2300
+ },
2301
+ "scheduled_by_entry_id": {
2302
+ "name": "scheduled_by_entry_id",
2303
+ "type": "text",
2304
+ "primaryKey": false,
2305
+ "notNull": true
2306
+ },
2307
+ "status": {
2308
+ "name": "status",
2309
+ "type": "text",
2310
+ "primaryKey": false,
2311
+ "notNull": true
2312
+ },
2313
+ "stream_id": {
2314
+ "name": "stream_id",
2315
+ "type": "text",
2316
+ "primaryKey": false,
2317
+ "notNull": true
2318
+ },
2319
+ "stream_position": {
2320
+ "name": "stream_position",
2321
+ "type": "integer",
2322
+ "primaryKey": false,
2323
+ "notNull": true
2324
+ }
2325
+ },
2326
+ "indexes": {
2327
+ "idx_pending_workflow_effects_family_effect_unique": {
2328
+ "name": "idx_pending_workflow_effects_family_effect_unique",
2329
+ "columns": [
2330
+ {
2331
+ "expression": "family",
2332
+ "isExpression": false,
2333
+ "asc": true,
2334
+ "nulls": "last"
2335
+ },
2336
+ {
2337
+ "expression": "effect_id",
2338
+ "isExpression": false,
2339
+ "asc": true,
2340
+ "nulls": "last"
2341
+ }
2342
+ ],
2343
+ "isUnique": true,
2344
+ "concurrently": false,
2345
+ "method": "btree",
2346
+ "with": {}
2347
+ },
2348
+ "idx_pending_workflow_effects_worker_scan": {
2349
+ "name": "idx_pending_workflow_effects_worker_scan",
2350
+ "columns": [
2351
+ {
2352
+ "expression": "family",
2353
+ "isExpression": false,
2354
+ "asc": true,
2355
+ "nulls": "last"
2356
+ },
2357
+ {
2358
+ "expression": "organization_id",
2359
+ "isExpression": false,
2360
+ "asc": true,
2361
+ "nulls": "last"
2362
+ },
2363
+ {
2364
+ "expression": "status",
2365
+ "isExpression": false,
2366
+ "asc": true,
2367
+ "nulls": "last"
2368
+ },
2369
+ {
2370
+ "expression": "scheduled_at",
2371
+ "isExpression": false,
2372
+ "asc": true,
2373
+ "nulls": "last"
2374
+ }
2375
+ ],
2376
+ "isUnique": false,
2377
+ "concurrently": false,
2378
+ "method": "btree",
2379
+ "with": {}
2380
+ },
2381
+ "idx_pending_workflow_effects_stream": {
2382
+ "name": "idx_pending_workflow_effects_stream",
2383
+ "columns": [
2384
+ {
2385
+ "expression": "family",
2386
+ "isExpression": false,
2387
+ "asc": true,
2388
+ "nulls": "last"
2389
+ },
2390
+ {
2391
+ "expression": "stream_id",
2392
+ "isExpression": false,
2393
+ "asc": true,
2394
+ "nulls": "last"
2395
+ }
2396
+ ],
2397
+ "isUnique": false,
2398
+ "concurrently": false,
2399
+ "method": "btree",
2400
+ "with": {}
2401
+ }
2402
+ },
2403
+ "foreignKeys": {
2404
+ "pending_workflow_effects_organization_id_organization_id_fk": {
2405
+ "name": "pending_workflow_effects_organization_id_organization_id_fk",
2406
+ "tableFrom": "pending_workflow_effects",
2407
+ "tableTo": "organization",
2408
+ "columnsFrom": ["organization_id"],
2409
+ "columnsTo": ["id"],
2410
+ "onDelete": "cascade",
2411
+ "onUpdate": "no action"
2412
+ }
2413
+ },
2414
+ "compositePrimaryKeys": {},
2415
+ "uniqueConstraints": {},
2416
+ "policies": {},
2417
+ "checkConstraints": {},
2418
+ "isRLSEnabled": true
2419
+ },
2420
+ "public.query_actions": {
2421
+ "name": "query_actions",
2422
+ "schema": "",
2423
+ "columns": {
2424
+ "completed_at": {
2425
+ "name": "completed_at",
2426
+ "type": "timestamp with time zone",
2427
+ "primaryKey": false,
2428
+ "notNull": false
2429
+ },
2430
+ "failure_code": {
2431
+ "name": "failure_code",
2432
+ "type": "text",
2433
+ "primaryKey": false,
2434
+ "notNull": false
2435
+ },
2436
+ "id": {
2437
+ "name": "id",
2438
+ "type": "text",
2439
+ "primaryKey": true,
2440
+ "notNull": true
2441
+ },
2442
+ "last_event_id": {
2443
+ "name": "last_event_id",
2444
+ "type": "text",
2445
+ "primaryKey": false,
2446
+ "notNull": true
2447
+ },
2448
+ "last_event_sequence": {
2449
+ "name": "last_event_sequence",
2450
+ "type": "integer",
2451
+ "primaryKey": false,
2452
+ "notNull": true
2453
+ },
2454
+ "organization_id": {
2455
+ "name": "organization_id",
2456
+ "type": "text",
2457
+ "primaryKey": false,
2458
+ "notNull": true
2459
+ },
2460
+ "outcome": {
2461
+ "name": "outcome",
2462
+ "type": "text",
2463
+ "primaryKey": false,
2464
+ "notNull": true
2465
+ },
2466
+ "phase": {
2467
+ "name": "phase",
2468
+ "type": "text",
2469
+ "primaryKey": false,
2470
+ "notNull": true
2471
+ },
2472
+ "query_mode": {
2473
+ "name": "query_mode",
2474
+ "type": "text",
2475
+ "primaryKey": false,
2476
+ "notNull": true
2477
+ },
2478
+ "query_text": {
2479
+ "name": "query_text",
2480
+ "type": "text",
2481
+ "primaryKey": false,
2482
+ "notNull": true
2483
+ },
2484
+ "source_descriptor_json": {
2485
+ "name": "source_descriptor_json",
2486
+ "type": "jsonb",
2487
+ "primaryKey": false,
2488
+ "notNull": false
2489
+ },
2490
+ "started_at": {
2491
+ "name": "started_at",
2492
+ "type": "timestamp with time zone",
2493
+ "primaryKey": false,
2494
+ "notNull": true
2495
+ },
2496
+ "usage_recording_status": {
2497
+ "name": "usage_recording_status",
2498
+ "type": "text",
2499
+ "primaryKey": false,
2500
+ "notNull": true
2501
+ },
2502
+ "validated_query": {
2503
+ "name": "validated_query",
2504
+ "type": "text",
2505
+ "primaryKey": false,
2506
+ "notNull": false
2507
+ }
2508
+ },
2509
+ "indexes": {
2510
+ "idx_query_actions_org_started": {
2511
+ "name": "idx_query_actions_org_started",
2512
+ "columns": [
2513
+ {
2514
+ "expression": "organization_id",
2515
+ "isExpression": false,
2516
+ "asc": true,
2517
+ "nulls": "last"
2518
+ },
2519
+ {
2520
+ "expression": "started_at",
2521
+ "isExpression": false,
2522
+ "asc": true,
2523
+ "nulls": "last"
2524
+ }
2525
+ ],
2526
+ "isUnique": false,
2527
+ "concurrently": false,
2528
+ "method": "btree",
2529
+ "with": {}
2530
+ }
2531
+ },
2532
+ "foreignKeys": {
2533
+ "query_actions_organization_id_organization_id_fk": {
2534
+ "name": "query_actions_organization_id_organization_id_fk",
2535
+ "tableFrom": "query_actions",
2536
+ "tableTo": "organization",
2537
+ "columnsFrom": ["organization_id"],
2538
+ "columnsTo": ["id"],
2539
+ "onDelete": "cascade",
2540
+ "onUpdate": "no action"
2541
+ }
2542
+ },
2543
+ "compositePrimaryKeys": {},
2544
+ "uniqueConstraints": {},
2545
+ "policies": {},
2546
+ "checkConstraints": {
2547
+ "query_actions_completed_at_outcome_check": {
2548
+ "name": "query_actions_completed_at_outcome_check",
2549
+ "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))"
2550
+ },
2551
+ "query_actions_completed_phase_outcome_check": {
2552
+ "name": "query_actions_completed_phase_outcome_check",
2553
+ "value": "((\"query_actions\".\"outcome\" = 'pending' and \"query_actions\".\"phase\" <> 'completed') or (\"query_actions\".\"outcome\" <> 'pending' and \"query_actions\".\"phase\" = 'completed'))"
2554
+ },
2555
+ "query_actions_failure_code_outcome_check": {
2556
+ "name": "query_actions_failure_code_outcome_check",
2557
+ "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))"
2558
+ },
2559
+ "query_actions_last_event_sequence_positive_check": {
2560
+ "name": "query_actions_last_event_sequence_positive_check",
2561
+ "value": "\"query_actions\".\"last_event_sequence\" > 0"
2562
+ }
2563
+ },
2564
+ "isRLSEnabled": true
2565
+ },
2566
+ "public.user_profiles": {
2567
+ "name": "user_profiles",
2568
+ "schema": "",
2569
+ "columns": {
2570
+ "created_at": {
2571
+ "name": "created_at",
2572
+ "type": "timestamp with time zone",
2573
+ "primaryKey": false,
2574
+ "notNull": true,
2575
+ "default": "now()"
2576
+ },
2577
+ "id": {
2578
+ "name": "id",
2579
+ "type": "text",
2580
+ "primaryKey": true,
2581
+ "notNull": true
2582
+ },
2583
+ "updated_at": {
2584
+ "name": "updated_at",
2585
+ "type": "timestamp with time zone",
2586
+ "primaryKey": false,
2587
+ "notNull": true,
2588
+ "default": "now()"
2589
+ },
2590
+ "user_id": {
2591
+ "name": "user_id",
2592
+ "type": "text",
2593
+ "primaryKey": false,
2594
+ "notNull": true
2595
+ }
2596
+ },
2597
+ "indexes": {
2598
+ "idx_user_profiles_user": {
2599
+ "name": "idx_user_profiles_user",
2600
+ "columns": [
2601
+ {
2602
+ "expression": "user_id",
2603
+ "isExpression": false,
2604
+ "asc": true,
2605
+ "nulls": "last"
2606
+ }
2607
+ ],
2608
+ "isUnique": true,
2609
+ "concurrently": false,
2610
+ "method": "btree",
2611
+ "with": {}
2612
+ }
2613
+ },
2614
+ "foreignKeys": {
2615
+ "user_profiles_user_id_user_id_fk": {
2616
+ "name": "user_profiles_user_id_user_id_fk",
2617
+ "tableFrom": "user_profiles",
2618
+ "tableTo": "user",
2619
+ "columnsFrom": ["user_id"],
2620
+ "columnsTo": ["id"],
2621
+ "onDelete": "cascade",
2622
+ "onUpdate": "no action"
2623
+ }
2624
+ },
2625
+ "compositePrimaryKeys": {},
2626
+ "uniqueConstraints": {},
2627
+ "policies": {},
2628
+ "checkConstraints": {},
2629
+ "isRLSEnabled": true
2630
+ },
2631
+ "public.source_api_actions": {
2632
+ "name": "source_api_actions",
2633
+ "schema": "",
2634
+ "columns": {
2635
+ "attempt_number": {
2636
+ "name": "attempt_number",
2637
+ "type": "integer",
2638
+ "primaryKey": false,
2639
+ "notNull": false
2640
+ },
2641
+ "completed_at": {
2642
+ "name": "completed_at",
2643
+ "type": "timestamp with time zone",
2644
+ "primaryKey": false,
2645
+ "notNull": false
2646
+ },
2647
+ "failure_code": {
2648
+ "name": "failure_code",
2649
+ "type": "text",
2650
+ "primaryKey": false,
2651
+ "notNull": false
2652
+ },
2653
+ "id": {
2654
+ "name": "id",
2655
+ "type": "text",
2656
+ "primaryKey": true,
2657
+ "notNull": true
2658
+ },
2659
+ "invoke_mode": {
2660
+ "name": "invoke_mode",
2661
+ "type": "text",
2662
+ "primaryKey": false,
2663
+ "notNull": false
2664
+ },
2665
+ "last_event_id": {
2666
+ "name": "last_event_id",
2667
+ "type": "text",
2668
+ "primaryKey": false,
2669
+ "notNull": true
2670
+ },
2671
+ "last_event_sequence": {
2672
+ "name": "last_event_sequence",
2673
+ "type": "integer",
2674
+ "primaryKey": false,
2675
+ "notNull": true
2676
+ },
2677
+ "organization_id": {
2678
+ "name": "organization_id",
2679
+ "type": "text",
2680
+ "primaryKey": false,
2681
+ "notNull": true
2682
+ },
2683
+ "outcome": {
2684
+ "name": "outcome",
2685
+ "type": "text",
2686
+ "primaryKey": false,
2687
+ "notNull": true
2688
+ },
2689
+ "page_progress_json": {
2690
+ "name": "page_progress_json",
2691
+ "type": "jsonb",
2692
+ "primaryKey": false,
2693
+ "notNull": false
2694
+ },
2695
+ "phase": {
2696
+ "name": "phase",
2697
+ "type": "text",
2698
+ "primaryKey": false,
2699
+ "notNull": true
2700
+ },
2701
+ "prepared_request_fingerprint": {
2702
+ "name": "prepared_request_fingerprint",
2703
+ "type": "text",
2704
+ "primaryKey": false,
2705
+ "notNull": false
2706
+ },
2707
+ "request_descriptor_json": {
2708
+ "name": "request_descriptor_json",
2709
+ "type": "jsonb",
2710
+ "primaryKey": false,
2711
+ "notNull": false
2712
+ },
2713
+ "request_kind": {
2714
+ "name": "request_kind",
2715
+ "type": "text",
2716
+ "primaryKey": false,
2717
+ "notNull": true
2718
+ },
2719
+ "source_descriptor_json": {
2720
+ "name": "source_descriptor_json",
2721
+ "type": "jsonb",
2722
+ "primaryKey": false,
2723
+ "notNull": false
2724
+ },
2725
+ "started_at": {
2726
+ "name": "started_at",
2727
+ "type": "timestamp with time zone",
2728
+ "primaryKey": false,
2729
+ "notNull": true
2730
+ }
2731
+ },
2732
+ "indexes": {
2733
+ "idx_source_api_actions_org_started": {
2734
+ "name": "idx_source_api_actions_org_started",
2735
+ "columns": [
2736
+ {
2737
+ "expression": "organization_id",
2738
+ "isExpression": false,
2739
+ "asc": true,
2740
+ "nulls": "last"
2741
+ },
2742
+ {
2743
+ "expression": "started_at",
2744
+ "isExpression": false,
2745
+ "asc": true,
2746
+ "nulls": "last"
2747
+ }
2748
+ ],
2749
+ "isUnique": false,
2750
+ "concurrently": false,
2751
+ "method": "btree",
2752
+ "with": {}
2753
+ }
2754
+ },
2755
+ "foreignKeys": {
2756
+ "source_api_actions_organization_id_organization_id_fk": {
2757
+ "name": "source_api_actions_organization_id_organization_id_fk",
2758
+ "tableFrom": "source_api_actions",
2759
+ "tableTo": "organization",
2760
+ "columnsFrom": ["organization_id"],
2761
+ "columnsTo": ["id"],
2762
+ "onDelete": "cascade",
2763
+ "onUpdate": "no action"
2764
+ }
2765
+ },
2766
+ "compositePrimaryKeys": {},
2767
+ "uniqueConstraints": {},
2768
+ "policies": {},
2769
+ "checkConstraints": {
2770
+ "source_api_actions_completed_at_outcome_check": {
2771
+ "name": "source_api_actions_completed_at_outcome_check",
2772
+ "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))"
2773
+ },
2774
+ "source_api_actions_completed_phase_outcome_check": {
2775
+ "name": "source_api_actions_completed_phase_outcome_check",
2776
+ "value": "((\"source_api_actions\".\"outcome\" = 'pending' and \"source_api_actions\".\"phase\" <> 'completed') or (\"source_api_actions\".\"outcome\" <> 'pending' and \"source_api_actions\".\"phase\" = 'completed'))"
2777
+ },
2778
+ "source_api_actions_failure_code_outcome_check": {
2779
+ "name": "source_api_actions_failure_code_outcome_check",
2780
+ "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))"
2781
+ },
2782
+ "source_api_actions_last_event_sequence_positive_check": {
2783
+ "name": "source_api_actions_last_event_sequence_positive_check",
2784
+ "value": "\"source_api_actions\".\"last_event_sequence\" > 0"
2785
+ }
2786
+ },
2787
+ "isRLSEnabled": true
2788
+ },
2789
+ "public.workflow_journal": {
2790
+ "name": "workflow_journal",
2791
+ "schema": "",
2792
+ "columns": {
2793
+ "actor_snapshot_json": {
2794
+ "name": "actor_snapshot_json",
2795
+ "type": "jsonb",
2796
+ "primaryKey": false,
2797
+ "notNull": false
2798
+ },
2799
+ "caused_by_event_id": {
2800
+ "name": "caused_by_event_id",
2801
+ "type": "text",
2802
+ "primaryKey": false,
2803
+ "notNull": false
2804
+ },
2805
+ "command_invocation_id": {
2806
+ "name": "command_invocation_id",
2807
+ "type": "text",
2808
+ "primaryKey": false,
2809
+ "notNull": false
2810
+ },
2811
+ "commit_id": {
2812
+ "name": "commit_id",
2813
+ "type": "text",
2814
+ "primaryKey": false,
2815
+ "notNull": true
2816
+ },
2817
+ "commit_position": {
2818
+ "name": "commit_position",
2819
+ "type": "bigserial",
2820
+ "primaryKey": false,
2821
+ "notNull": true
2822
+ },
2823
+ "entry_kind": {
2824
+ "name": "entry_kind",
2825
+ "type": "text",
2826
+ "primaryKey": false,
2827
+ "notNull": true
2828
+ },
2829
+ "event_id": {
2830
+ "name": "event_id",
2831
+ "type": "text",
2832
+ "primaryKey": false,
2833
+ "notNull": false
2834
+ },
2835
+ "event_type": {
2836
+ "name": "event_type",
2837
+ "type": "text",
2838
+ "primaryKey": false,
2839
+ "notNull": false
2840
+ },
2841
+ "effect_id": {
2842
+ "name": "effect_id",
2843
+ "type": "text",
2844
+ "primaryKey": false,
2845
+ "notNull": false
2846
+ },
2847
+ "effect_type": {
2848
+ "name": "effect_type",
2849
+ "type": "text",
2850
+ "primaryKey": false,
2851
+ "notNull": false
2852
+ },
2853
+ "family": {
2854
+ "name": "family",
2855
+ "type": "text",
2856
+ "primaryKey": false,
2857
+ "notNull": true
2858
+ },
2859
+ "id": {
2860
+ "name": "id",
2861
+ "type": "text",
2862
+ "primaryKey": true,
2863
+ "notNull": true
2864
+ },
2865
+ "occurred_at": {
2866
+ "name": "occurred_at",
2867
+ "type": "timestamp with time zone",
2868
+ "primaryKey": false,
2869
+ "notNull": true
2870
+ },
2871
+ "organization_id": {
2872
+ "name": "organization_id",
2873
+ "type": "text",
2874
+ "primaryKey": false,
2875
+ "notNull": true
2876
+ },
2877
+ "payload_bytes": {
2878
+ "name": "payload_bytes",
2879
+ "type": "bytea",
2880
+ "primaryKey": false,
2881
+ "notNull": false
2882
+ },
2883
+ "payload_type": {
2884
+ "name": "payload_type",
2885
+ "type": "text",
2886
+ "primaryKey": false,
2887
+ "notNull": false
2888
+ },
2889
+ "request_id": {
2890
+ "name": "request_id",
2891
+ "type": "text",
2892
+ "primaryKey": false,
2893
+ "notNull": false
2894
+ },
2895
+ "stream_id": {
2896
+ "name": "stream_id",
2897
+ "type": "text",
2898
+ "primaryKey": false,
2899
+ "notNull": true
2900
+ },
2901
+ "stream_position": {
2902
+ "name": "stream_position",
2903
+ "type": "integer",
2904
+ "primaryKey": false,
2905
+ "notNull": true
2906
+ },
2907
+ "surface": {
2908
+ "name": "surface",
2909
+ "type": "text",
2910
+ "primaryKey": false,
2911
+ "notNull": false
2912
+ }
2913
+ },
2914
+ "indexes": {
2915
+ "idx_workflow_journal_stream_position_unique": {
2916
+ "name": "idx_workflow_journal_stream_position_unique",
2917
+ "columns": [
2918
+ {
2919
+ "expression": "family",
2920
+ "isExpression": false,
2921
+ "asc": true,
2922
+ "nulls": "last"
2923
+ },
2924
+ {
2925
+ "expression": "stream_id",
2926
+ "isExpression": false,
2927
+ "asc": true,
2928
+ "nulls": "last"
2929
+ },
2930
+ {
2931
+ "expression": "stream_position",
2932
+ "isExpression": false,
2933
+ "asc": true,
2934
+ "nulls": "last"
2935
+ }
2936
+ ],
2937
+ "isUnique": true,
2938
+ "concurrently": false,
2939
+ "method": "btree",
2940
+ "with": {}
2941
+ },
2942
+ "idx_workflow_journal_commit_position_unique": {
2943
+ "name": "idx_workflow_journal_commit_position_unique",
2944
+ "columns": [
2945
+ {
2946
+ "expression": "commit_position",
2947
+ "isExpression": false,
2948
+ "asc": true,
2949
+ "nulls": "last"
2950
+ }
2951
+ ],
2952
+ "isUnique": true,
2953
+ "concurrently": false,
2954
+ "method": "btree",
2955
+ "with": {}
2956
+ },
2957
+ "idx_workflow_journal_command_invocation_unique": {
2958
+ "name": "idx_workflow_journal_command_invocation_unique",
2959
+ "columns": [
2960
+ {
2961
+ "expression": "family",
2962
+ "isExpression": false,
2963
+ "asc": true,
2964
+ "nulls": "last"
2965
+ },
2966
+ {
2967
+ "expression": "command_invocation_id",
2968
+ "isExpression": false,
2969
+ "asc": true,
2970
+ "nulls": "last"
2971
+ }
2972
+ ],
2973
+ "isUnique": true,
2974
+ "concurrently": false,
2975
+ "method": "btree",
2976
+ "with": {}
2977
+ },
2978
+ "idx_workflow_journal_commit": {
2979
+ "name": "idx_workflow_journal_commit",
2980
+ "columns": [
2981
+ {
2982
+ "expression": "commit_id",
2983
+ "isExpression": false,
2984
+ "asc": true,
2985
+ "nulls": "last"
2986
+ }
2987
+ ],
2988
+ "isUnique": false,
2989
+ "concurrently": false,
2990
+ "method": "btree",
2991
+ "with": {}
2992
+ },
2993
+ "idx_workflow_journal_stream": {
2994
+ "name": "idx_workflow_journal_stream",
2995
+ "columns": [
2996
+ {
2997
+ "expression": "family",
2998
+ "isExpression": false,
2999
+ "asc": true,
3000
+ "nulls": "last"
3001
+ },
3002
+ {
3003
+ "expression": "stream_id",
3004
+ "isExpression": false,
3005
+ "asc": true,
3006
+ "nulls": "last"
3007
+ },
3008
+ {
3009
+ "expression": "stream_position",
3010
+ "isExpression": false,
3011
+ "asc": true,
3012
+ "nulls": "last"
3013
+ }
3014
+ ],
3015
+ "isUnique": false,
3016
+ "concurrently": false,
3017
+ "method": "btree",
3018
+ "with": {}
3019
+ },
3020
+ "idx_workflow_journal_effect": {
3021
+ "name": "idx_workflow_journal_effect",
3022
+ "columns": [
3023
+ {
3024
+ "expression": "family",
3025
+ "isExpression": false,
3026
+ "asc": true,
3027
+ "nulls": "last"
3028
+ },
3029
+ {
3030
+ "expression": "stream_id",
3031
+ "isExpression": false,
3032
+ "asc": true,
3033
+ "nulls": "last"
3034
+ },
3035
+ {
3036
+ "expression": "effect_id",
3037
+ "isExpression": false,
3038
+ "asc": true,
3039
+ "nulls": "last"
3040
+ }
3041
+ ],
3042
+ "isUnique": false,
3043
+ "concurrently": false,
3044
+ "method": "btree",
3045
+ "with": {}
3046
+ }
3047
+ },
3048
+ "foreignKeys": {
3049
+ "workflow_journal_organization_id_organization_id_fk": {
3050
+ "name": "workflow_journal_organization_id_organization_id_fk",
3051
+ "tableFrom": "workflow_journal",
3052
+ "tableTo": "organization",
3053
+ "columnsFrom": ["organization_id"],
3054
+ "columnsTo": ["id"],
3055
+ "onDelete": "cascade",
3056
+ "onUpdate": "no action"
3057
+ }
3058
+ },
3059
+ "compositePrimaryKeys": {},
3060
+ "uniqueConstraints": {},
3061
+ "policies": {},
3062
+ "checkConstraints": {
3063
+ "workflow_journal_command_invocation_check": {
3064
+ "name": "workflow_journal_command_invocation_check",
3065
+ "value": "(\"workflow_journal\".\"entry_kind\" = 'command' and \"workflow_journal\".\"command_invocation_id\" is not null) or (\"workflow_journal\".\"entry_kind\" <> 'command' and \"workflow_journal\".\"command_invocation_id\" is null)"
3066
+ }
3067
+ },
3068
+ "isRLSEnabled": true
3069
+ }
3070
+ },
3071
+ "enums": {},
3072
+ "schemas": {},
3073
+ "sequences": {},
3074
+ "roles": {},
3075
+ "policies": {},
3076
+ "views": {},
3077
+ "_meta": {
3078
+ "columns": {},
3079
+ "schemas": {},
3080
+ "tables": {}
3081
+ }
3082
+ }