@onequery/cli 0.1.1-linux-arm64 → 0.1.1

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