@wraps.dev/cli 2.30.3 → 3.0.0

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 (153) hide show
  1. package/README.md +5 -8
  2. package/dist/cli.js +942 -2211
  3. package/dist/cli.js.map +1 -1
  4. package/dist/console/assets/{index-P0x5JCC4.js → index--39O8UcT.js} +3 -3
  5. package/dist/console/assets/index-D6au_OkL.css +1 -0
  6. package/dist/console/index.html +2 -2
  7. package/dist/lambda/agent-enforcer/.bundled +1 -1
  8. package/dist/lambda/event-processor/.bundled +1 -1
  9. package/dist/lambda/inbound-processor/.bundled +1 -1
  10. package/dist/lambda/sms-event-processor/.bundled +1 -1
  11. package/package.json +4 -5
  12. package/dist/api-lambda.zip +0 -0
  13. package/dist/console/assets/index-BP4FpEpn.css +0 -1
  14. package/dist/selfhost-migrations/0000_absent_rogue.sql +0 -203
  15. package/dist/selfhost-migrations/0001_polite_maverick.sql +0 -17
  16. package/dist/selfhost-migrations/0002_perpetual_scorpion.sql +0 -1
  17. package/dist/selfhost-migrations/0003_wealthy_absorbing_man.sql +0 -1
  18. package/dist/selfhost-migrations/0004_opposite_blur.sql +0 -1
  19. package/dist/selfhost-migrations/0005_clear_terror.sql +0 -4
  20. package/dist/selfhost-migrations/0006_soft_black_widow.sql +0 -20
  21. package/dist/selfhost-migrations/0007_dazzling_saracen.sql +0 -124
  22. package/dist/selfhost-migrations/0008_broad_hannibal_king.sql +0 -33
  23. package/dist/selfhost-migrations/0009_bouncy_mystique.sql +0 -73
  24. package/dist/selfhost-migrations/0010_cheerful_valeria_richards.sql +0 -18
  25. package/dist/selfhost-migrations/0011_absent_thunderbolts.sql +0 -2
  26. package/dist/selfhost-migrations/0012_demonic_donald_blake.sql +0 -1
  27. package/dist/selfhost-migrations/0013_nifty_preak.sql +0 -143
  28. package/dist/selfhost-migrations/0014_hesitant_beast.sql +0 -2
  29. package/dist/selfhost-migrations/0015_blue_giant_girl.sql +0 -1
  30. package/dist/selfhost-migrations/0016_cooing_overlord.sql +0 -1
  31. package/dist/selfhost-migrations/0017_tranquil_ender_wiggin.sql +0 -11
  32. package/dist/selfhost-migrations/0018_talented_groot.sql +0 -8
  33. package/dist/selfhost-migrations/0019_ambitious_devos.sql +0 -3
  34. package/dist/selfhost-migrations/0020_misty_master_mold.sql +0 -95
  35. package/dist/selfhost-migrations/0021_regular_harrier.sql +0 -14
  36. package/dist/selfhost-migrations/0022_sour_blizzard.sql +0 -10
  37. package/dist/selfhost-migrations/0023_flawless_psynapse.sql +0 -1
  38. package/dist/selfhost-migrations/0024_premium_blindfold.sql +0 -1
  39. package/dist/selfhost-migrations/0025_unusual_santa_claus.sql +0 -1
  40. package/dist/selfhost-migrations/0026_volatile_pandemic.sql +0 -2
  41. package/dist/selfhost-migrations/0027_workable_logan.sql +0 -4
  42. package/dist/selfhost-migrations/0028_familiar_prodigy.sql +0 -1
  43. package/dist/selfhost-migrations/0029_cute_maddog.sql +0 -13
  44. package/dist/selfhost-migrations/0030_adorable_scarecrow.sql +0 -1
  45. package/dist/selfhost-migrations/0031_material_slapstick.sql +0 -10
  46. package/dist/selfhost-migrations/0032_hot_dust.sql +0 -11
  47. package/dist/selfhost-migrations/0033_slow_deathbird.sql +0 -1
  48. package/dist/selfhost-migrations/0034_lush_rafael_vega.sql +0 -12
  49. package/dist/selfhost-migrations/0035_normal_red_hulk.sql +0 -8
  50. package/dist/selfhost-migrations/0036_marvelous_ezekiel.sql +0 -1
  51. package/dist/selfhost-migrations/0037_swift_talisman.sql +0 -8
  52. package/dist/selfhost-migrations/0038_first_mandroid.sql +0 -1
  53. package/dist/selfhost-migrations/0039_fixed_stryfe.sql +0 -1
  54. package/dist/selfhost-migrations/0040_add_channel_check_constraints.sql +0 -2
  55. package/dist/selfhost-migrations/0041_black_spencer_smythe.sql +0 -1
  56. package/dist/selfhost-migrations/0042_plain_marvel_zombies.sql +0 -2
  57. package/dist/selfhost-migrations/0043_curved_champions.sql +0 -1
  58. package/dist/selfhost-migrations/0044_clean_iceman.sql +0 -1
  59. package/dist/selfhost-migrations/0045_condemned_steel_serpent.sql +0 -1
  60. package/dist/selfhost-migrations/0046_steep_ultimo.sql +0 -2
  61. package/dist/selfhost-migrations/0047_empty_sleepwalker.sql +0 -2
  62. package/dist/selfhost-migrations/0048_cheerful_multiple_man.sql +0 -1
  63. package/dist/selfhost-migrations/0049_nostalgic_loki.sql +0 -3
  64. package/dist/selfhost-migrations/0050_add_engagement_metadata.sql +0 -4
  65. package/dist/selfhost-migrations/0051_odd_marrow.sql +0 -2
  66. package/dist/selfhost-migrations/0052_redundant_siren.sql +0 -5
  67. package/dist/selfhost-migrations/0053_soft_carnage.sql +0 -31
  68. package/dist/selfhost-migrations/0054_blushing_vin_gonzales.sql +0 -1
  69. package/dist/selfhost-migrations/0055_broadcast_resume_columns.sql +0 -12
  70. package/dist/selfhost-migrations/0056_broadcast_resume_dedup_cleanup.sql +0 -31
  71. package/dist/selfhost-migrations/0057_audit_log_actoremail_jsonb.sql +0 -5
  72. package/dist/selfhost-migrations/0058_email_log_sent_at_idx.sql +0 -1
  73. package/dist/selfhost-migrations/0059_message_send_claimed_at.sql +0 -1
  74. package/dist/selfhost-migrations/0060_harsh_nehzno.sql +0 -1
  75. package/dist/selfhost-migrations/0061_flashy_spirit.sql +0 -1
  76. package/dist/selfhost-migrations/0062_next_timeslip.sql +0 -2
  77. package/dist/selfhost-migrations/0063_greedy_legion.sql +0 -17
  78. package/dist/selfhost-migrations/0064_wise_brood.sql +0 -42
  79. package/dist/selfhost-migrations/0065_public_the_fallen.sql +0 -2
  80. package/dist/selfhost-migrations/0066_odd_yellow_claw.sql +0 -3
  81. package/dist/selfhost-migrations/0067_empty_ultimo.sql +0 -1
  82. package/dist/selfhost-migrations/0068_abandoned_mephisto.sql +0 -1
  83. package/dist/selfhost-migrations/0069_abnormal_zuras.sql +0 -1
  84. package/dist/selfhost-migrations/CLAUDE.md +0 -49
  85. package/dist/selfhost-migrations/meta/0000_snapshot.json +0 -1311
  86. package/dist/selfhost-migrations/meta/0001_snapshot.json +0 -1454
  87. package/dist/selfhost-migrations/meta/0002_snapshot.json +0 -1460
  88. package/dist/selfhost-migrations/meta/0003_snapshot.json +0 -1467
  89. package/dist/selfhost-migrations/meta/0004_snapshot.json +0 -1473
  90. package/dist/selfhost-migrations/meta/0005_snapshot.json +0 -1499
  91. package/dist/selfhost-migrations/meta/0006_snapshot.json +0 -1617
  92. package/dist/selfhost-migrations/meta/0007_snapshot.json +0 -2581
  93. package/dist/selfhost-migrations/meta/0008_snapshot.json +0 -2861
  94. package/dist/selfhost-migrations/meta/0009_snapshot.json +0 -3447
  95. package/dist/selfhost-migrations/meta/0010_snapshot.json +0 -3586
  96. package/dist/selfhost-migrations/meta/0011_snapshot.json +0 -3600
  97. package/dist/selfhost-migrations/meta/0012_snapshot.json +0 -3607
  98. package/dist/selfhost-migrations/meta/0013_snapshot.json +0 -4697
  99. package/dist/selfhost-migrations/meta/0014_snapshot.json +0 -4704
  100. package/dist/selfhost-migrations/meta/0015_snapshot.json +0 -4697
  101. package/dist/selfhost-migrations/meta/0016_snapshot.json +0 -4703
  102. package/dist/selfhost-migrations/meta/0017_snapshot.json +0 -4769
  103. package/dist/selfhost-migrations/meta/0018_snapshot.json +0 -4821
  104. package/dist/selfhost-migrations/meta/0019_snapshot.json +0 -4840
  105. package/dist/selfhost-migrations/meta/0020_snapshot.json +0 -5602
  106. package/dist/selfhost-migrations/meta/0021_snapshot.json +0 -5729
  107. package/dist/selfhost-migrations/meta/0022_snapshot.json +0 -5792
  108. package/dist/selfhost-migrations/meta/0023_snapshot.json +0 -5799
  109. package/dist/selfhost-migrations/meta/0024_snapshot.json +0 -5821
  110. package/dist/selfhost-migrations/meta/0025_snapshot.json +0 -5831
  111. package/dist/selfhost-migrations/meta/0026_snapshot.json +0 -5844
  112. package/dist/selfhost-migrations/meta/0027_snapshot.json +0 -5864
  113. package/dist/selfhost-migrations/meta/0028_snapshot.json +0 -5871
  114. package/dist/selfhost-migrations/meta/0029_snapshot.json +0 -5984
  115. package/dist/selfhost-migrations/meta/0030_snapshot.json +0 -5990
  116. package/dist/selfhost-migrations/meta/0031_snapshot.json +0 -5950
  117. package/dist/selfhost-migrations/meta/0032_snapshot.json +0 -6042
  118. package/dist/selfhost-migrations/meta/0033_snapshot.json +0 -6057
  119. package/dist/selfhost-migrations/meta/0034_snapshot.json +0 -6130
  120. package/dist/selfhost-migrations/meta/0035_snapshot.json +0 -6195
  121. package/dist/selfhost-migrations/meta/0036_snapshot.json +0 -6201
  122. package/dist/selfhost-migrations/meta/0037_snapshot.json +0 -6265
  123. package/dist/selfhost-migrations/meta/0038_snapshot.json +0 -6271
  124. package/dist/selfhost-migrations/meta/0039_snapshot.json +0 -6278
  125. package/dist/selfhost-migrations/meta/0041_snapshot.json +0 -6284
  126. package/dist/selfhost-migrations/meta/0042_snapshot.json +0 -6297
  127. package/dist/selfhost-migrations/meta/0043_snapshot.json +0 -6297
  128. package/dist/selfhost-migrations/meta/0044_snapshot.json +0 -6297
  129. package/dist/selfhost-migrations/meta/0045_snapshot.json +0 -6303
  130. package/dist/selfhost-migrations/meta/0046_snapshot.json +0 -6315
  131. package/dist/selfhost-migrations/meta/0047_snapshot.json +0 -6330
  132. package/dist/selfhost-migrations/meta/0048_snapshot.json +0 -6336
  133. package/dist/selfhost-migrations/meta/0049_snapshot.json +0 -6366
  134. package/dist/selfhost-migrations/meta/0050_snapshot.json +0 -6390
  135. package/dist/selfhost-migrations/meta/0051_snapshot.json +0 -6403
  136. package/dist/selfhost-migrations/meta/0052_snapshot.json +0 -6470
  137. package/dist/selfhost-migrations/meta/0053_snapshot.json +0 -6470
  138. package/dist/selfhost-migrations/meta/0054_snapshot.json +0 -6646
  139. package/dist/selfhost-migrations/meta/0055_snapshot.json +0 -6713
  140. package/dist/selfhost-migrations/meta/0056_snapshot.json +0 -6713
  141. package/dist/selfhost-migrations/meta/0057_snapshot.json +0 -6731
  142. package/dist/selfhost-migrations/meta/0059_snapshot.json +0 -6764
  143. package/dist/selfhost-migrations/meta/0060_snapshot.json +0 -7125
  144. package/dist/selfhost-migrations/meta/0061_snapshot.json +0 -7131
  145. package/dist/selfhost-migrations/meta/0062_snapshot.json +0 -7143
  146. package/dist/selfhost-migrations/meta/0063_snapshot.json +0 -7282
  147. package/dist/selfhost-migrations/meta/0064_snapshot.json +0 -7626
  148. package/dist/selfhost-migrations/meta/0065_snapshot.json +0 -7662
  149. package/dist/selfhost-migrations/meta/0066_snapshot.json +0 -7682
  150. package/dist/selfhost-migrations/meta/0067_snapshot.json +0 -7688
  151. package/dist/selfhost-migrations/meta/0068_snapshot.json +0 -7694
  152. package/dist/selfhost-migrations/meta/0069_snapshot.json +0 -7700
  153. package/dist/selfhost-migrations/meta/_journal.json +0 -496
@@ -1,4703 +0,0 @@
1
- {
2
- "id": "77f83414-0f02-4edc-a077-c675cec6b57a",
3
- "prevId": "3a124ad9-f224-4939-bbaf-33920cb5e698",
4
- "version": "7",
5
- "dialect": "postgresql",
6
- "tables": {
7
- "public.api_key": {
8
- "name": "api_key",
9
- "schema": "",
10
- "columns": {
11
- "id": {
12
- "name": "id",
13
- "type": "text",
14
- "primaryKey": true,
15
- "notNull": true
16
- },
17
- "organization_id": {
18
- "name": "organization_id",
19
- "type": "text",
20
- "primaryKey": false,
21
- "notNull": true
22
- },
23
- "name": {
24
- "name": "name",
25
- "type": "text",
26
- "primaryKey": false,
27
- "notNull": true
28
- },
29
- "key_hash": {
30
- "name": "key_hash",
31
- "type": "text",
32
- "primaryKey": false,
33
- "notNull": true
34
- },
35
- "prefix": {
36
- "name": "prefix",
37
- "type": "text",
38
- "primaryKey": false,
39
- "notNull": true
40
- },
41
- "permissions": {
42
- "name": "permissions",
43
- "type": "json",
44
- "primaryKey": false,
45
- "notNull": false,
46
- "default": "'[]'::json"
47
- },
48
- "last_used_at": {
49
- "name": "last_used_at",
50
- "type": "timestamp",
51
- "primaryKey": false,
52
- "notNull": false
53
- },
54
- "expires_at": {
55
- "name": "expires_at",
56
- "type": "timestamp",
57
- "primaryKey": false,
58
- "notNull": false
59
- },
60
- "created_by": {
61
- "name": "created_by",
62
- "type": "text",
63
- "primaryKey": false,
64
- "notNull": false
65
- },
66
- "created_at": {
67
- "name": "created_at",
68
- "type": "timestamp",
69
- "primaryKey": false,
70
- "notNull": true,
71
- "default": "now()"
72
- }
73
- },
74
- "indexes": {
75
- "api_key_org_idx": {
76
- "name": "api_key_org_idx",
77
- "columns": [
78
- {
79
- "expression": "organization_id",
80
- "isExpression": false,
81
- "asc": true,
82
- "nulls": "last"
83
- }
84
- ],
85
- "isUnique": false,
86
- "concurrently": false,
87
- "method": "btree",
88
- "with": {}
89
- },
90
- "api_key_prefix_idx": {
91
- "name": "api_key_prefix_idx",
92
- "columns": [
93
- {
94
- "expression": "prefix",
95
- "isExpression": false,
96
- "asc": true,
97
- "nulls": "last"
98
- }
99
- ],
100
- "isUnique": false,
101
- "concurrently": false,
102
- "method": "btree",
103
- "with": {}
104
- }
105
- },
106
- "foreignKeys": {
107
- "api_key_organization_id_organization_id_fk": {
108
- "name": "api_key_organization_id_organization_id_fk",
109
- "tableFrom": "api_key",
110
- "tableTo": "organization",
111
- "columnsFrom": ["organization_id"],
112
- "columnsTo": ["id"],
113
- "onDelete": "cascade",
114
- "onUpdate": "no action"
115
- },
116
- "api_key_created_by_user_id_fk": {
117
- "name": "api_key_created_by_user_id_fk",
118
- "tableFrom": "api_key",
119
- "tableTo": "user",
120
- "columnsFrom": ["created_by"],
121
- "columnsTo": ["id"],
122
- "onDelete": "no action",
123
- "onUpdate": "no action"
124
- }
125
- },
126
- "compositePrimaryKeys": {},
127
- "uniqueConstraints": {},
128
- "policies": {},
129
- "checkConstraints": {},
130
- "isRLSEnabled": false
131
- },
132
- "public.audit_log": {
133
- "name": "audit_log",
134
- "schema": "",
135
- "columns": {
136
- "id": {
137
- "name": "id",
138
- "type": "text",
139
- "primaryKey": true,
140
- "notNull": true
141
- },
142
- "organization_id": {
143
- "name": "organization_id",
144
- "type": "text",
145
- "primaryKey": false,
146
- "notNull": true
147
- },
148
- "user_id": {
149
- "name": "user_id",
150
- "type": "text",
151
- "primaryKey": false,
152
- "notNull": false
153
- },
154
- "action": {
155
- "name": "action",
156
- "type": "text",
157
- "primaryKey": false,
158
- "notNull": true
159
- },
160
- "resource": {
161
- "name": "resource",
162
- "type": "text",
163
- "primaryKey": false,
164
- "notNull": true
165
- },
166
- "resource_id": {
167
- "name": "resource_id",
168
- "type": "text",
169
- "primaryKey": false,
170
- "notNull": false
171
- },
172
- "metadata": {
173
- "name": "metadata",
174
- "type": "json",
175
- "primaryKey": false,
176
- "notNull": false
177
- },
178
- "ip_address": {
179
- "name": "ip_address",
180
- "type": "text",
181
- "primaryKey": false,
182
- "notNull": false
183
- },
184
- "user_agent": {
185
- "name": "user_agent",
186
- "type": "text",
187
- "primaryKey": false,
188
- "notNull": false
189
- },
190
- "created_at": {
191
- "name": "created_at",
192
- "type": "timestamp",
193
- "primaryKey": false,
194
- "notNull": true,
195
- "default": "now()"
196
- }
197
- },
198
- "indexes": {
199
- "audit_log_org_idx": {
200
- "name": "audit_log_org_idx",
201
- "columns": [
202
- {
203
- "expression": "organization_id",
204
- "isExpression": false,
205
- "asc": true,
206
- "nulls": "last"
207
- }
208
- ],
209
- "isUnique": false,
210
- "concurrently": false,
211
- "method": "btree",
212
- "with": {}
213
- },
214
- "audit_log_timestamp_idx": {
215
- "name": "audit_log_timestamp_idx",
216
- "columns": [
217
- {
218
- "expression": "created_at",
219
- "isExpression": false,
220
- "asc": true,
221
- "nulls": "last"
222
- }
223
- ],
224
- "isUnique": false,
225
- "concurrently": false,
226
- "method": "btree",
227
- "with": {}
228
- }
229
- },
230
- "foreignKeys": {
231
- "audit_log_organization_id_organization_id_fk": {
232
- "name": "audit_log_organization_id_organization_id_fk",
233
- "tableFrom": "audit_log",
234
- "tableTo": "organization",
235
- "columnsFrom": ["organization_id"],
236
- "columnsTo": ["id"],
237
- "onDelete": "cascade",
238
- "onUpdate": "no action"
239
- },
240
- "audit_log_user_id_user_id_fk": {
241
- "name": "audit_log_user_id_user_id_fk",
242
- "tableFrom": "audit_log",
243
- "tableTo": "user",
244
- "columnsFrom": ["user_id"],
245
- "columnsTo": ["id"],
246
- "onDelete": "no action",
247
- "onUpdate": "no action"
248
- }
249
- },
250
- "compositePrimaryKeys": {},
251
- "uniqueConstraints": {},
252
- "policies": {},
253
- "checkConstraints": {},
254
- "isRLSEnabled": false
255
- },
256
- "public.aws_account": {
257
- "name": "aws_account",
258
- "schema": "",
259
- "columns": {
260
- "id": {
261
- "name": "id",
262
- "type": "text",
263
- "primaryKey": true,
264
- "notNull": true
265
- },
266
- "organization_id": {
267
- "name": "organization_id",
268
- "type": "text",
269
- "primaryKey": false,
270
- "notNull": true
271
- },
272
- "name": {
273
- "name": "name",
274
- "type": "text",
275
- "primaryKey": false,
276
- "notNull": true
277
- },
278
- "account_id": {
279
- "name": "account_id",
280
- "type": "text",
281
- "primaryKey": false,
282
- "notNull": true
283
- },
284
- "region": {
285
- "name": "region",
286
- "type": "text",
287
- "primaryKey": false,
288
- "notNull": true
289
- },
290
- "role_arn": {
291
- "name": "role_arn",
292
- "type": "text",
293
- "primaryKey": false,
294
- "notNull": true
295
- },
296
- "external_id": {
297
- "name": "external_id",
298
- "type": "text",
299
- "primaryKey": false,
300
- "notNull": true
301
- },
302
- "webhook_secret": {
303
- "name": "webhook_secret",
304
- "type": "text",
305
- "primaryKey": false,
306
- "notNull": false
307
- },
308
- "is_verified": {
309
- "name": "is_verified",
310
- "type": "boolean",
311
- "primaryKey": false,
312
- "notNull": true,
313
- "default": false
314
- },
315
- "last_verified_at": {
316
- "name": "last_verified_at",
317
- "type": "timestamp",
318
- "primaryKey": false,
319
- "notNull": false
320
- },
321
- "archiving_enabled": {
322
- "name": "archiving_enabled",
323
- "type": "boolean",
324
- "primaryKey": false,
325
- "notNull": true,
326
- "default": false
327
- },
328
- "archive_arn": {
329
- "name": "archive_arn",
330
- "type": "text",
331
- "primaryKey": false,
332
- "notNull": false
333
- },
334
- "event_history_enabled": {
335
- "name": "event_history_enabled",
336
- "type": "boolean",
337
- "primaryKey": false,
338
- "notNull": true,
339
- "default": false
340
- },
341
- "event_tracking_enabled": {
342
- "name": "event_tracking_enabled",
343
- "type": "boolean",
344
- "primaryKey": false,
345
- "notNull": true,
346
- "default": false
347
- },
348
- "config_set_name": {
349
- "name": "config_set_name",
350
- "type": "text",
351
- "primaryKey": false,
352
- "notNull": false
353
- },
354
- "custom_tracking_domain": {
355
- "name": "custom_tracking_domain",
356
- "type": "text",
357
- "primaryKey": false,
358
- "notNull": false
359
- },
360
- "sms_enabled": {
361
- "name": "sms_enabled",
362
- "type": "boolean",
363
- "primaryKey": false,
364
- "notNull": true,
365
- "default": false
366
- },
367
- "sms_phone_number_count": {
368
- "name": "sms_phone_number_count",
369
- "type": "integer",
370
- "primaryKey": false,
371
- "notNull": true,
372
- "default": 0
373
- },
374
- "sms_event_history_enabled": {
375
- "name": "sms_event_history_enabled",
376
- "type": "boolean",
377
- "primaryKey": false,
378
- "notNull": true,
379
- "default": false
380
- },
381
- "created_by": {
382
- "name": "created_by",
383
- "type": "text",
384
- "primaryKey": false,
385
- "notNull": false
386
- },
387
- "created_at": {
388
- "name": "created_at",
389
- "type": "timestamp",
390
- "primaryKey": false,
391
- "notNull": true,
392
- "default": "now()"
393
- },
394
- "updated_at": {
395
- "name": "updated_at",
396
- "type": "timestamp",
397
- "primaryKey": false,
398
- "notNull": true,
399
- "default": "now()"
400
- }
401
- },
402
- "indexes": {
403
- "aws_account_org_idx": {
404
- "name": "aws_account_org_idx",
405
- "columns": [
406
- {
407
- "expression": "organization_id",
408
- "isExpression": false,
409
- "asc": true,
410
- "nulls": "last"
411
- }
412
- ],
413
- "isUnique": false,
414
- "concurrently": false,
415
- "method": "btree",
416
- "with": {}
417
- },
418
- "aws_account_external_id_idx": {
419
- "name": "aws_account_external_id_idx",
420
- "columns": [
421
- {
422
- "expression": "external_id",
423
- "isExpression": false,
424
- "asc": true,
425
- "nulls": "last"
426
- }
427
- ],
428
- "isUnique": false,
429
- "concurrently": false,
430
- "method": "btree",
431
- "with": {}
432
- }
433
- },
434
- "foreignKeys": {
435
- "aws_account_organization_id_organization_id_fk": {
436
- "name": "aws_account_organization_id_organization_id_fk",
437
- "tableFrom": "aws_account",
438
- "tableTo": "organization",
439
- "columnsFrom": ["organization_id"],
440
- "columnsTo": ["id"],
441
- "onDelete": "cascade",
442
- "onUpdate": "no action"
443
- },
444
- "aws_account_created_by_user_id_fk": {
445
- "name": "aws_account_created_by_user_id_fk",
446
- "tableFrom": "aws_account",
447
- "tableTo": "user",
448
- "columnsFrom": ["created_by"],
449
- "columnsTo": ["id"],
450
- "onDelete": "no action",
451
- "onUpdate": "no action"
452
- }
453
- },
454
- "compositePrimaryKeys": {},
455
- "uniqueConstraints": {
456
- "aws_account_external_id_unique": {
457
- "name": "aws_account_external_id_unique",
458
- "nullsNotDistinct": false,
459
- "columns": ["external_id"]
460
- }
461
- },
462
- "policies": {},
463
- "checkConstraints": {},
464
- "isRLSEnabled": false
465
- },
466
- "public.aws_account_permission": {
467
- "name": "aws_account_permission",
468
- "schema": "",
469
- "columns": {
470
- "id": {
471
- "name": "id",
472
- "type": "text",
473
- "primaryKey": true,
474
- "notNull": true
475
- },
476
- "user_id": {
477
- "name": "user_id",
478
- "type": "text",
479
- "primaryKey": false,
480
- "notNull": true
481
- },
482
- "aws_account_id": {
483
- "name": "aws_account_id",
484
- "type": "text",
485
- "primaryKey": false,
486
- "notNull": true
487
- },
488
- "permissions": {
489
- "name": "permissions",
490
- "type": "json",
491
- "primaryKey": false,
492
- "notNull": true
493
- },
494
- "granted_by": {
495
- "name": "granted_by",
496
- "type": "text",
497
- "primaryKey": false,
498
- "notNull": true
499
- },
500
- "expires_at": {
501
- "name": "expires_at",
502
- "type": "timestamp",
503
- "primaryKey": false,
504
- "notNull": false
505
- },
506
- "created_at": {
507
- "name": "created_at",
508
- "type": "timestamp",
509
- "primaryKey": false,
510
- "notNull": true,
511
- "default": "now()"
512
- },
513
- "updated_at": {
514
- "name": "updated_at",
515
- "type": "timestamp",
516
- "primaryKey": false,
517
- "notNull": true,
518
- "default": "now()"
519
- }
520
- },
521
- "indexes": {
522
- "aws_account_permission_user_idx": {
523
- "name": "aws_account_permission_user_idx",
524
- "columns": [
525
- {
526
- "expression": "user_id",
527
- "isExpression": false,
528
- "asc": true,
529
- "nulls": "last"
530
- }
531
- ],
532
- "isUnique": false,
533
- "concurrently": false,
534
- "method": "btree",
535
- "with": {}
536
- },
537
- "aws_account_permission_account_idx": {
538
- "name": "aws_account_permission_account_idx",
539
- "columns": [
540
- {
541
- "expression": "aws_account_id",
542
- "isExpression": false,
543
- "asc": true,
544
- "nulls": "last"
545
- }
546
- ],
547
- "isUnique": false,
548
- "concurrently": false,
549
- "method": "btree",
550
- "with": {}
551
- },
552
- "aws_account_permission_unique_idx": {
553
- "name": "aws_account_permission_unique_idx",
554
- "columns": [
555
- {
556
- "expression": "user_id",
557
- "isExpression": false,
558
- "asc": true,
559
- "nulls": "last"
560
- },
561
- {
562
- "expression": "aws_account_id",
563
- "isExpression": false,
564
- "asc": true,
565
- "nulls": "last"
566
- }
567
- ],
568
- "isUnique": false,
569
- "concurrently": false,
570
- "method": "btree",
571
- "with": {}
572
- }
573
- },
574
- "foreignKeys": {
575
- "aws_account_permission_user_id_user_id_fk": {
576
- "name": "aws_account_permission_user_id_user_id_fk",
577
- "tableFrom": "aws_account_permission",
578
- "tableTo": "user",
579
- "columnsFrom": ["user_id"],
580
- "columnsTo": ["id"],
581
- "onDelete": "cascade",
582
- "onUpdate": "no action"
583
- },
584
- "aws_account_permission_aws_account_id_aws_account_id_fk": {
585
- "name": "aws_account_permission_aws_account_id_aws_account_id_fk",
586
- "tableFrom": "aws_account_permission",
587
- "tableTo": "aws_account",
588
- "columnsFrom": ["aws_account_id"],
589
- "columnsTo": ["id"],
590
- "onDelete": "cascade",
591
- "onUpdate": "no action"
592
- },
593
- "aws_account_permission_granted_by_user_id_fk": {
594
- "name": "aws_account_permission_granted_by_user_id_fk",
595
- "tableFrom": "aws_account_permission",
596
- "tableTo": "user",
597
- "columnsFrom": ["granted_by"],
598
- "columnsTo": ["id"],
599
- "onDelete": "no action",
600
- "onUpdate": "no action"
601
- }
602
- },
603
- "compositePrimaryKeys": {},
604
- "uniqueConstraints": {},
605
- "policies": {},
606
- "checkConstraints": {},
607
- "isRLSEnabled": false
608
- },
609
- "public.email_template": {
610
- "name": "email_template",
611
- "schema": "",
612
- "columns": {
613
- "id": {
614
- "name": "id",
615
- "type": "text",
616
- "primaryKey": true,
617
- "notNull": true
618
- },
619
- "organization_id": {
620
- "name": "organization_id",
621
- "type": "text",
622
- "primaryKey": false,
623
- "notNull": true
624
- },
625
- "name": {
626
- "name": "name",
627
- "type": "text",
628
- "primaryKey": false,
629
- "notNull": true
630
- },
631
- "subject": {
632
- "name": "subject",
633
- "type": "text",
634
- "primaryKey": false,
635
- "notNull": false
636
- },
637
- "html": {
638
- "name": "html",
639
- "type": "text",
640
- "primaryKey": false,
641
- "notNull": false
642
- },
643
- "variables": {
644
- "name": "variables",
645
- "type": "json",
646
- "primaryKey": false,
647
- "notNull": false,
648
- "default": "'[]'::json"
649
- },
650
- "created_by": {
651
- "name": "created_by",
652
- "type": "text",
653
- "primaryKey": false,
654
- "notNull": false
655
- },
656
- "created_at": {
657
- "name": "created_at",
658
- "type": "timestamp",
659
- "primaryKey": false,
660
- "notNull": true,
661
- "default": "now()"
662
- },
663
- "updated_at": {
664
- "name": "updated_at",
665
- "type": "timestamp",
666
- "primaryKey": false,
667
- "notNull": true,
668
- "default": "now()"
669
- }
670
- },
671
- "indexes": {
672
- "email_template_org_idx": {
673
- "name": "email_template_org_idx",
674
- "columns": [
675
- {
676
- "expression": "organization_id",
677
- "isExpression": false,
678
- "asc": true,
679
- "nulls": "last"
680
- }
681
- ],
682
- "isUnique": false,
683
- "concurrently": false,
684
- "method": "btree",
685
- "with": {}
686
- }
687
- },
688
- "foreignKeys": {
689
- "email_template_organization_id_organization_id_fk": {
690
- "name": "email_template_organization_id_organization_id_fk",
691
- "tableFrom": "email_template",
692
- "tableTo": "organization",
693
- "columnsFrom": ["organization_id"],
694
- "columnsTo": ["id"],
695
- "onDelete": "cascade",
696
- "onUpdate": "no action"
697
- },
698
- "email_template_created_by_user_id_fk": {
699
- "name": "email_template_created_by_user_id_fk",
700
- "tableFrom": "email_template",
701
- "tableTo": "user",
702
- "columnsFrom": ["created_by"],
703
- "columnsTo": ["id"],
704
- "onDelete": "no action",
705
- "onUpdate": "no action"
706
- }
707
- },
708
- "compositePrimaryKeys": {},
709
- "uniqueConstraints": {},
710
- "policies": {},
711
- "checkConstraints": {},
712
- "isRLSEnabled": false
713
- },
714
- "public.organization_extension": {
715
- "name": "organization_extension",
716
- "schema": "",
717
- "columns": {
718
- "organization_id": {
719
- "name": "organization_id",
720
- "type": "text",
721
- "primaryKey": true,
722
- "notNull": true
723
- },
724
- "aws_account_count": {
725
- "name": "aws_account_count",
726
- "type": "integer",
727
- "primaryKey": false,
728
- "notNull": true,
729
- "default": 0
730
- },
731
- "member_count": {
732
- "name": "member_count",
733
- "type": "integer",
734
- "primaryKey": false,
735
- "notNull": true,
736
- "default": 1
737
- },
738
- "onboarding_completed": {
739
- "name": "onboarding_completed",
740
- "type": "boolean",
741
- "primaryKey": false,
742
- "notNull": true,
743
- "default": false
744
- },
745
- "onboarding_completed_at": {
746
- "name": "onboarding_completed_at",
747
- "type": "timestamp",
748
- "primaryKey": false,
749
- "notNull": false
750
- },
751
- "updated_at": {
752
- "name": "updated_at",
753
- "type": "timestamp",
754
- "primaryKey": false,
755
- "notNull": true,
756
- "default": "now()"
757
- }
758
- },
759
- "indexes": {},
760
- "foreignKeys": {
761
- "organization_extension_organization_id_organization_id_fk": {
762
- "name": "organization_extension_organization_id_organization_id_fk",
763
- "tableFrom": "organization_extension",
764
- "tableTo": "organization",
765
- "columnsFrom": ["organization_id"],
766
- "columnsTo": ["id"],
767
- "onDelete": "cascade",
768
- "onUpdate": "no action"
769
- }
770
- },
771
- "compositePrimaryKeys": {},
772
- "uniqueConstraints": {},
773
- "policies": {},
774
- "checkConstraints": {},
775
- "isRLSEnabled": false
776
- },
777
- "public.account": {
778
- "name": "account",
779
- "schema": "",
780
- "columns": {
781
- "id": {
782
- "name": "id",
783
- "type": "text",
784
- "primaryKey": true,
785
- "notNull": true
786
- },
787
- "account_id": {
788
- "name": "account_id",
789
- "type": "text",
790
- "primaryKey": false,
791
- "notNull": true
792
- },
793
- "provider_id": {
794
- "name": "provider_id",
795
- "type": "text",
796
- "primaryKey": false,
797
- "notNull": true
798
- },
799
- "user_id": {
800
- "name": "user_id",
801
- "type": "text",
802
- "primaryKey": false,
803
- "notNull": true
804
- },
805
- "access_token": {
806
- "name": "access_token",
807
- "type": "text",
808
- "primaryKey": false,
809
- "notNull": false
810
- },
811
- "refresh_token": {
812
- "name": "refresh_token",
813
- "type": "text",
814
- "primaryKey": false,
815
- "notNull": false
816
- },
817
- "id_token": {
818
- "name": "id_token",
819
- "type": "text",
820
- "primaryKey": false,
821
- "notNull": false
822
- },
823
- "access_token_expires_at": {
824
- "name": "access_token_expires_at",
825
- "type": "timestamp",
826
- "primaryKey": false,
827
- "notNull": false
828
- },
829
- "refresh_token_expires_at": {
830
- "name": "refresh_token_expires_at",
831
- "type": "timestamp",
832
- "primaryKey": false,
833
- "notNull": false
834
- },
835
- "scope": {
836
- "name": "scope",
837
- "type": "text",
838
- "primaryKey": false,
839
- "notNull": false
840
- },
841
- "password": {
842
- "name": "password",
843
- "type": "text",
844
- "primaryKey": false,
845
- "notNull": false
846
- },
847
- "created_at": {
848
- "name": "created_at",
849
- "type": "timestamp",
850
- "primaryKey": false,
851
- "notNull": true
852
- },
853
- "updated_at": {
854
- "name": "updated_at",
855
- "type": "timestamp",
856
- "primaryKey": false,
857
- "notNull": true
858
- }
859
- },
860
- "indexes": {},
861
- "foreignKeys": {
862
- "account_user_id_user_id_fk": {
863
- "name": "account_user_id_user_id_fk",
864
- "tableFrom": "account",
865
- "tableTo": "user",
866
- "columnsFrom": ["user_id"],
867
- "columnsTo": ["id"],
868
- "onDelete": "cascade",
869
- "onUpdate": "no action"
870
- }
871
- },
872
- "compositePrimaryKeys": {},
873
- "uniqueConstraints": {},
874
- "policies": {},
875
- "checkConstraints": {},
876
- "isRLSEnabled": false
877
- },
878
- "public.invitation": {
879
- "name": "invitation",
880
- "schema": "",
881
- "columns": {
882
- "id": {
883
- "name": "id",
884
- "type": "text",
885
- "primaryKey": true,
886
- "notNull": true
887
- },
888
- "organization_id": {
889
- "name": "organization_id",
890
- "type": "text",
891
- "primaryKey": false,
892
- "notNull": true
893
- },
894
- "email": {
895
- "name": "email",
896
- "type": "text",
897
- "primaryKey": false,
898
- "notNull": true
899
- },
900
- "role": {
901
- "name": "role",
902
- "type": "text",
903
- "primaryKey": false,
904
- "notNull": false
905
- },
906
- "status": {
907
- "name": "status",
908
- "type": "text",
909
- "primaryKey": false,
910
- "notNull": true
911
- },
912
- "expires_at": {
913
- "name": "expires_at",
914
- "type": "timestamp",
915
- "primaryKey": false,
916
- "notNull": true
917
- },
918
- "inviter_id": {
919
- "name": "inviter_id",
920
- "type": "text",
921
- "primaryKey": false,
922
- "notNull": true
923
- }
924
- },
925
- "indexes": {},
926
- "foreignKeys": {
927
- "invitation_organization_id_organization_id_fk": {
928
- "name": "invitation_organization_id_organization_id_fk",
929
- "tableFrom": "invitation",
930
- "tableTo": "organization",
931
- "columnsFrom": ["organization_id"],
932
- "columnsTo": ["id"],
933
- "onDelete": "cascade",
934
- "onUpdate": "no action"
935
- },
936
- "invitation_inviter_id_user_id_fk": {
937
- "name": "invitation_inviter_id_user_id_fk",
938
- "tableFrom": "invitation",
939
- "tableTo": "user",
940
- "columnsFrom": ["inviter_id"],
941
- "columnsTo": ["id"],
942
- "onDelete": "cascade",
943
- "onUpdate": "no action"
944
- }
945
- },
946
- "compositePrimaryKeys": {},
947
- "uniqueConstraints": {},
948
- "policies": {},
949
- "checkConstraints": {},
950
- "isRLSEnabled": false
951
- },
952
- "public.member": {
953
- "name": "member",
954
- "schema": "",
955
- "columns": {
956
- "id": {
957
- "name": "id",
958
- "type": "text",
959
- "primaryKey": true,
960
- "notNull": true
961
- },
962
- "organization_id": {
963
- "name": "organization_id",
964
- "type": "text",
965
- "primaryKey": false,
966
- "notNull": true
967
- },
968
- "user_id": {
969
- "name": "user_id",
970
- "type": "text",
971
- "primaryKey": false,
972
- "notNull": true
973
- },
974
- "role": {
975
- "name": "role",
976
- "type": "text",
977
- "primaryKey": false,
978
- "notNull": true
979
- },
980
- "created_at": {
981
- "name": "created_at",
982
- "type": "timestamp",
983
- "primaryKey": false,
984
- "notNull": true
985
- }
986
- },
987
- "indexes": {},
988
- "foreignKeys": {
989
- "member_organization_id_organization_id_fk": {
990
- "name": "member_organization_id_organization_id_fk",
991
- "tableFrom": "member",
992
- "tableTo": "organization",
993
- "columnsFrom": ["organization_id"],
994
- "columnsTo": ["id"],
995
- "onDelete": "cascade",
996
- "onUpdate": "no action"
997
- },
998
- "member_user_id_user_id_fk": {
999
- "name": "member_user_id_user_id_fk",
1000
- "tableFrom": "member",
1001
- "tableTo": "user",
1002
- "columnsFrom": ["user_id"],
1003
- "columnsTo": ["id"],
1004
- "onDelete": "cascade",
1005
- "onUpdate": "no action"
1006
- }
1007
- },
1008
- "compositePrimaryKeys": {},
1009
- "uniqueConstraints": {},
1010
- "policies": {},
1011
- "checkConstraints": {},
1012
- "isRLSEnabled": false
1013
- },
1014
- "public.organization": {
1015
- "name": "organization",
1016
- "schema": "",
1017
- "columns": {
1018
- "id": {
1019
- "name": "id",
1020
- "type": "text",
1021
- "primaryKey": true,
1022
- "notNull": true
1023
- },
1024
- "name": {
1025
- "name": "name",
1026
- "type": "text",
1027
- "primaryKey": false,
1028
- "notNull": true
1029
- },
1030
- "slug": {
1031
- "name": "slug",
1032
- "type": "text",
1033
- "primaryKey": false,
1034
- "notNull": false
1035
- },
1036
- "logo": {
1037
- "name": "logo",
1038
- "type": "text",
1039
- "primaryKey": false,
1040
- "notNull": false
1041
- },
1042
- "brand_color": {
1043
- "name": "brand_color",
1044
- "type": "text",
1045
- "primaryKey": false,
1046
- "notNull": false
1047
- },
1048
- "metadata": {
1049
- "name": "metadata",
1050
- "type": "text",
1051
- "primaryKey": false,
1052
- "notNull": false
1053
- },
1054
- "created_at": {
1055
- "name": "created_at",
1056
- "type": "timestamp",
1057
- "primaryKey": false,
1058
- "notNull": true
1059
- }
1060
- },
1061
- "indexes": {},
1062
- "foreignKeys": {},
1063
- "compositePrimaryKeys": {},
1064
- "uniqueConstraints": {
1065
- "organization_slug_unique": {
1066
- "name": "organization_slug_unique",
1067
- "nullsNotDistinct": false,
1068
- "columns": ["slug"]
1069
- }
1070
- },
1071
- "policies": {},
1072
- "checkConstraints": {},
1073
- "isRLSEnabled": false
1074
- },
1075
- "public.passkey": {
1076
- "name": "passkey",
1077
- "schema": "",
1078
- "columns": {
1079
- "id": {
1080
- "name": "id",
1081
- "type": "text",
1082
- "primaryKey": true,
1083
- "notNull": true
1084
- },
1085
- "name": {
1086
- "name": "name",
1087
- "type": "text",
1088
- "primaryKey": false,
1089
- "notNull": false
1090
- },
1091
- "public_key": {
1092
- "name": "public_key",
1093
- "type": "text",
1094
- "primaryKey": false,
1095
- "notNull": true
1096
- },
1097
- "user_id": {
1098
- "name": "user_id",
1099
- "type": "text",
1100
- "primaryKey": false,
1101
- "notNull": true
1102
- },
1103
- "credential_id": {
1104
- "name": "credential_id",
1105
- "type": "text",
1106
- "primaryKey": false,
1107
- "notNull": true
1108
- },
1109
- "counter": {
1110
- "name": "counter",
1111
- "type": "integer",
1112
- "primaryKey": false,
1113
- "notNull": true
1114
- },
1115
- "device_type": {
1116
- "name": "device_type",
1117
- "type": "text",
1118
- "primaryKey": false,
1119
- "notNull": true
1120
- },
1121
- "backed_up": {
1122
- "name": "backed_up",
1123
- "type": "boolean",
1124
- "primaryKey": false,
1125
- "notNull": true
1126
- },
1127
- "transports": {
1128
- "name": "transports",
1129
- "type": "text",
1130
- "primaryKey": false,
1131
- "notNull": false
1132
- },
1133
- "created_at": {
1134
- "name": "created_at",
1135
- "type": "timestamp",
1136
- "primaryKey": false,
1137
- "notNull": true
1138
- },
1139
- "aaguid": {
1140
- "name": "aaguid",
1141
- "type": "text",
1142
- "primaryKey": false,
1143
- "notNull": false
1144
- }
1145
- },
1146
- "indexes": {},
1147
- "foreignKeys": {
1148
- "passkey_user_id_user_id_fk": {
1149
- "name": "passkey_user_id_user_id_fk",
1150
- "tableFrom": "passkey",
1151
- "tableTo": "user",
1152
- "columnsFrom": ["user_id"],
1153
- "columnsTo": ["id"],
1154
- "onDelete": "cascade",
1155
- "onUpdate": "no action"
1156
- }
1157
- },
1158
- "compositePrimaryKeys": {},
1159
- "uniqueConstraints": {},
1160
- "policies": {},
1161
- "checkConstraints": {},
1162
- "isRLSEnabled": false
1163
- },
1164
- "public.session": {
1165
- "name": "session",
1166
- "schema": "",
1167
- "columns": {
1168
- "id": {
1169
- "name": "id",
1170
- "type": "text",
1171
- "primaryKey": true,
1172
- "notNull": true
1173
- },
1174
- "expires_at": {
1175
- "name": "expires_at",
1176
- "type": "timestamp",
1177
- "primaryKey": false,
1178
- "notNull": true
1179
- },
1180
- "token": {
1181
- "name": "token",
1182
- "type": "text",
1183
- "primaryKey": false,
1184
- "notNull": true
1185
- },
1186
- "created_at": {
1187
- "name": "created_at",
1188
- "type": "timestamp",
1189
- "primaryKey": false,
1190
- "notNull": true
1191
- },
1192
- "updated_at": {
1193
- "name": "updated_at",
1194
- "type": "timestamp",
1195
- "primaryKey": false,
1196
- "notNull": true
1197
- },
1198
- "ip_address": {
1199
- "name": "ip_address",
1200
- "type": "text",
1201
- "primaryKey": false,
1202
- "notNull": false
1203
- },
1204
- "user_agent": {
1205
- "name": "user_agent",
1206
- "type": "text",
1207
- "primaryKey": false,
1208
- "notNull": false
1209
- },
1210
- "user_id": {
1211
- "name": "user_id",
1212
- "type": "text",
1213
- "primaryKey": false,
1214
- "notNull": true
1215
- },
1216
- "active_organization_id": {
1217
- "name": "active_organization_id",
1218
- "type": "text",
1219
- "primaryKey": false,
1220
- "notNull": false
1221
- }
1222
- },
1223
- "indexes": {},
1224
- "foreignKeys": {
1225
- "session_user_id_user_id_fk": {
1226
- "name": "session_user_id_user_id_fk",
1227
- "tableFrom": "session",
1228
- "tableTo": "user",
1229
- "columnsFrom": ["user_id"],
1230
- "columnsTo": ["id"],
1231
- "onDelete": "cascade",
1232
- "onUpdate": "no action"
1233
- }
1234
- },
1235
- "compositePrimaryKeys": {},
1236
- "uniqueConstraints": {
1237
- "session_token_unique": {
1238
- "name": "session_token_unique",
1239
- "nullsNotDistinct": false,
1240
- "columns": ["token"]
1241
- }
1242
- },
1243
- "policies": {},
1244
- "checkConstraints": {},
1245
- "isRLSEnabled": false
1246
- },
1247
- "public.statement": {
1248
- "name": "statement",
1249
- "schema": "",
1250
- "columns": {
1251
- "id": {
1252
- "name": "id",
1253
- "type": "text",
1254
- "primaryKey": true,
1255
- "notNull": true
1256
- },
1257
- "user_id": {
1258
- "name": "user_id",
1259
- "type": "text",
1260
- "primaryKey": false,
1261
- "notNull": false
1262
- },
1263
- "organization_id": {
1264
- "name": "organization_id",
1265
- "type": "text",
1266
- "primaryKey": false,
1267
- "notNull": false
1268
- },
1269
- "role_id": {
1270
- "name": "role_id",
1271
- "type": "text",
1272
- "primaryKey": false,
1273
- "notNull": false
1274
- },
1275
- "effect": {
1276
- "name": "effect",
1277
- "type": "text",
1278
- "primaryKey": false,
1279
- "notNull": true
1280
- },
1281
- "action": {
1282
- "name": "action",
1283
- "type": "text",
1284
- "primaryKey": false,
1285
- "notNull": true
1286
- },
1287
- "resource": {
1288
- "name": "resource",
1289
- "type": "text",
1290
- "primaryKey": false,
1291
- "notNull": true
1292
- },
1293
- "condition": {
1294
- "name": "condition",
1295
- "type": "text",
1296
- "primaryKey": false,
1297
- "notNull": false
1298
- },
1299
- "expires_at": {
1300
- "name": "expires_at",
1301
- "type": "timestamp",
1302
- "primaryKey": false,
1303
- "notNull": false
1304
- },
1305
- "created_at": {
1306
- "name": "created_at",
1307
- "type": "timestamp",
1308
- "primaryKey": false,
1309
- "notNull": true
1310
- },
1311
- "updated_at": {
1312
- "name": "updated_at",
1313
- "type": "timestamp",
1314
- "primaryKey": false,
1315
- "notNull": true
1316
- }
1317
- },
1318
- "indexes": {},
1319
- "foreignKeys": {
1320
- "statement_user_id_user_id_fk": {
1321
- "name": "statement_user_id_user_id_fk",
1322
- "tableFrom": "statement",
1323
- "tableTo": "user",
1324
- "columnsFrom": ["user_id"],
1325
- "columnsTo": ["id"],
1326
- "onDelete": "cascade",
1327
- "onUpdate": "no action"
1328
- },
1329
- "statement_organization_id_organization_id_fk": {
1330
- "name": "statement_organization_id_organization_id_fk",
1331
- "tableFrom": "statement",
1332
- "tableTo": "organization",
1333
- "columnsFrom": ["organization_id"],
1334
- "columnsTo": ["id"],
1335
- "onDelete": "cascade",
1336
- "onUpdate": "no action"
1337
- }
1338
- },
1339
- "compositePrimaryKeys": {},
1340
- "uniqueConstraints": {},
1341
- "policies": {},
1342
- "checkConstraints": {},
1343
- "isRLSEnabled": false
1344
- },
1345
- "public.subscription": {
1346
- "name": "subscription",
1347
- "schema": "",
1348
- "columns": {
1349
- "id": {
1350
- "name": "id",
1351
- "type": "text",
1352
- "primaryKey": true,
1353
- "notNull": true
1354
- },
1355
- "plan": {
1356
- "name": "plan",
1357
- "type": "text",
1358
- "primaryKey": false,
1359
- "notNull": true
1360
- },
1361
- "reference_id": {
1362
- "name": "reference_id",
1363
- "type": "text",
1364
- "primaryKey": false,
1365
- "notNull": true
1366
- },
1367
- "stripe_customer_id": {
1368
- "name": "stripe_customer_id",
1369
- "type": "text",
1370
- "primaryKey": false,
1371
- "notNull": false
1372
- },
1373
- "stripe_subscription_id": {
1374
- "name": "stripe_subscription_id",
1375
- "type": "text",
1376
- "primaryKey": false,
1377
- "notNull": false
1378
- },
1379
- "status": {
1380
- "name": "status",
1381
- "type": "text",
1382
- "primaryKey": false,
1383
- "notNull": true
1384
- },
1385
- "period_start": {
1386
- "name": "period_start",
1387
- "type": "timestamp",
1388
- "primaryKey": false,
1389
- "notNull": false
1390
- },
1391
- "period_end": {
1392
- "name": "period_end",
1393
- "type": "timestamp",
1394
- "primaryKey": false,
1395
- "notNull": false
1396
- },
1397
- "cancel_at_period_end": {
1398
- "name": "cancel_at_period_end",
1399
- "type": "boolean",
1400
- "primaryKey": false,
1401
- "notNull": false
1402
- },
1403
- "seats": {
1404
- "name": "seats",
1405
- "type": "integer",
1406
- "primaryKey": false,
1407
- "notNull": false
1408
- },
1409
- "trial_start": {
1410
- "name": "trial_start",
1411
- "type": "timestamp",
1412
- "primaryKey": false,
1413
- "notNull": false
1414
- },
1415
- "trial_end": {
1416
- "name": "trial_end",
1417
- "type": "timestamp",
1418
- "primaryKey": false,
1419
- "notNull": false
1420
- },
1421
- "created_at": {
1422
- "name": "created_at",
1423
- "type": "timestamp",
1424
- "primaryKey": false,
1425
- "notNull": true,
1426
- "default": "now()"
1427
- },
1428
- "updated_at": {
1429
- "name": "updated_at",
1430
- "type": "timestamp",
1431
- "primaryKey": false,
1432
- "notNull": true,
1433
- "default": "now()"
1434
- }
1435
- },
1436
- "indexes": {},
1437
- "foreignKeys": {},
1438
- "compositePrimaryKeys": {},
1439
- "uniqueConstraints": {},
1440
- "policies": {},
1441
- "checkConstraints": {},
1442
- "isRLSEnabled": false
1443
- },
1444
- "public.two_factor": {
1445
- "name": "two_factor",
1446
- "schema": "",
1447
- "columns": {
1448
- "id": {
1449
- "name": "id",
1450
- "type": "text",
1451
- "primaryKey": true,
1452
- "notNull": true
1453
- },
1454
- "secret": {
1455
- "name": "secret",
1456
- "type": "text",
1457
- "primaryKey": false,
1458
- "notNull": true
1459
- },
1460
- "backup_codes": {
1461
- "name": "backup_codes",
1462
- "type": "text",
1463
- "primaryKey": false,
1464
- "notNull": true
1465
- },
1466
- "user_id": {
1467
- "name": "user_id",
1468
- "type": "text",
1469
- "primaryKey": false,
1470
- "notNull": true
1471
- }
1472
- },
1473
- "indexes": {},
1474
- "foreignKeys": {
1475
- "two_factor_user_id_user_id_fk": {
1476
- "name": "two_factor_user_id_user_id_fk",
1477
- "tableFrom": "two_factor",
1478
- "tableTo": "user",
1479
- "columnsFrom": ["user_id"],
1480
- "columnsTo": ["id"],
1481
- "onDelete": "cascade",
1482
- "onUpdate": "no action"
1483
- }
1484
- },
1485
- "compositePrimaryKeys": {},
1486
- "uniqueConstraints": {},
1487
- "policies": {},
1488
- "checkConstraints": {},
1489
- "isRLSEnabled": false
1490
- },
1491
- "public.user": {
1492
- "name": "user",
1493
- "schema": "",
1494
- "columns": {
1495
- "id": {
1496
- "name": "id",
1497
- "type": "text",
1498
- "primaryKey": true,
1499
- "notNull": true
1500
- },
1501
- "name": {
1502
- "name": "name",
1503
- "type": "text",
1504
- "primaryKey": false,
1505
- "notNull": true
1506
- },
1507
- "email": {
1508
- "name": "email",
1509
- "type": "text",
1510
- "primaryKey": false,
1511
- "notNull": true
1512
- },
1513
- "email_verified": {
1514
- "name": "email_verified",
1515
- "type": "boolean",
1516
- "primaryKey": false,
1517
- "notNull": true
1518
- },
1519
- "image": {
1520
- "name": "image",
1521
- "type": "text",
1522
- "primaryKey": false,
1523
- "notNull": false
1524
- },
1525
- "created_at": {
1526
- "name": "created_at",
1527
- "type": "timestamp",
1528
- "primaryKey": false,
1529
- "notNull": true
1530
- },
1531
- "updated_at": {
1532
- "name": "updated_at",
1533
- "type": "timestamp",
1534
- "primaryKey": false,
1535
- "notNull": true
1536
- },
1537
- "two_factor_enabled": {
1538
- "name": "two_factor_enabled",
1539
- "type": "boolean",
1540
- "primaryKey": false,
1541
- "notNull": false
1542
- },
1543
- "last_login_method": {
1544
- "name": "last_login_method",
1545
- "type": "text",
1546
- "primaryKey": false,
1547
- "notNull": false
1548
- },
1549
- "stripe_customer_id": {
1550
- "name": "stripe_customer_id",
1551
- "type": "text",
1552
- "primaryKey": false,
1553
- "notNull": false
1554
- }
1555
- },
1556
- "indexes": {},
1557
- "foreignKeys": {},
1558
- "compositePrimaryKeys": {},
1559
- "uniqueConstraints": {
1560
- "user_email_unique": {
1561
- "name": "user_email_unique",
1562
- "nullsNotDistinct": false,
1563
- "columns": ["email"]
1564
- }
1565
- },
1566
- "policies": {},
1567
- "checkConstraints": {},
1568
- "isRLSEnabled": false
1569
- },
1570
- "public.verification": {
1571
- "name": "verification",
1572
- "schema": "",
1573
- "columns": {
1574
- "id": {
1575
- "name": "id",
1576
- "type": "text",
1577
- "primaryKey": true,
1578
- "notNull": true
1579
- },
1580
- "identifier": {
1581
- "name": "identifier",
1582
- "type": "text",
1583
- "primaryKey": false,
1584
- "notNull": true
1585
- },
1586
- "value": {
1587
- "name": "value",
1588
- "type": "text",
1589
- "primaryKey": false,
1590
- "notNull": true
1591
- },
1592
- "expires_at": {
1593
- "name": "expires_at",
1594
- "type": "timestamp",
1595
- "primaryKey": false,
1596
- "notNull": true
1597
- },
1598
- "created_at": {
1599
- "name": "created_at",
1600
- "type": "timestamp",
1601
- "primaryKey": false,
1602
- "notNull": false
1603
- },
1604
- "updated_at": {
1605
- "name": "updated_at",
1606
- "type": "timestamp",
1607
- "primaryKey": false,
1608
- "notNull": false
1609
- }
1610
- },
1611
- "indexes": {},
1612
- "foreignKeys": {},
1613
- "compositePrimaryKeys": {},
1614
- "uniqueConstraints": {},
1615
- "policies": {},
1616
- "checkConstraints": {},
1617
- "isRLSEnabled": false
1618
- },
1619
- "public.batch_send": {
1620
- "name": "batch_send",
1621
- "schema": "",
1622
- "columns": {
1623
- "id": {
1624
- "name": "id",
1625
- "type": "text",
1626
- "primaryKey": true,
1627
- "notNull": true
1628
- },
1629
- "organization_id": {
1630
- "name": "organization_id",
1631
- "type": "text",
1632
- "primaryKey": false,
1633
- "notNull": true
1634
- },
1635
- "aws_account_id": {
1636
- "name": "aws_account_id",
1637
- "type": "text",
1638
- "primaryKey": false,
1639
- "notNull": false
1640
- },
1641
- "name": {
1642
- "name": "name",
1643
- "type": "text",
1644
- "primaryKey": false,
1645
- "notNull": false
1646
- },
1647
- "channel": {
1648
- "name": "channel",
1649
- "type": "text",
1650
- "primaryKey": false,
1651
- "notNull": true,
1652
- "default": "'email'"
1653
- },
1654
- "subject": {
1655
- "name": "subject",
1656
- "type": "text",
1657
- "primaryKey": false,
1658
- "notNull": false
1659
- },
1660
- "preview_text": {
1661
- "name": "preview_text",
1662
- "type": "text",
1663
- "primaryKey": false,
1664
- "notNull": false
1665
- },
1666
- "from": {
1667
- "name": "from",
1668
- "type": "text",
1669
- "primaryKey": false,
1670
- "notNull": false
1671
- },
1672
- "from_name": {
1673
- "name": "from_name",
1674
- "type": "text",
1675
- "primaryKey": false,
1676
- "notNull": false
1677
- },
1678
- "reply_to": {
1679
- "name": "reply_to",
1680
- "type": "text",
1681
- "primaryKey": false,
1682
- "notNull": false
1683
- },
1684
- "email_template_id": {
1685
- "name": "email_template_id",
1686
- "type": "text",
1687
- "primaryKey": false,
1688
- "notNull": false
1689
- },
1690
- "html_content": {
1691
- "name": "html_content",
1692
- "type": "text",
1693
- "primaryKey": false,
1694
- "notNull": false
1695
- },
1696
- "text_content": {
1697
- "name": "text_content",
1698
- "type": "text",
1699
- "primaryKey": false,
1700
- "notNull": false
1701
- },
1702
- "body": {
1703
- "name": "body",
1704
- "type": "text",
1705
- "primaryKey": false,
1706
- "notNull": false
1707
- },
1708
- "sender_id": {
1709
- "name": "sender_id",
1710
- "type": "text",
1711
- "primaryKey": false,
1712
- "notNull": false
1713
- },
1714
- "status": {
1715
- "name": "status",
1716
- "type": "batch_send_status",
1717
- "typeSchema": "public",
1718
- "primaryKey": false,
1719
- "notNull": true,
1720
- "default": "'draft'"
1721
- },
1722
- "total_recipients": {
1723
- "name": "total_recipients",
1724
- "type": "integer",
1725
- "primaryKey": false,
1726
- "notNull": true,
1727
- "default": 0
1728
- },
1729
- "processed_recipients": {
1730
- "name": "processed_recipients",
1731
- "type": "integer",
1732
- "primaryKey": false,
1733
- "notNull": true,
1734
- "default": 0
1735
- },
1736
- "sent": {
1737
- "name": "sent",
1738
- "type": "integer",
1739
- "primaryKey": false,
1740
- "notNull": true,
1741
- "default": 0
1742
- },
1743
- "delivered": {
1744
- "name": "delivered",
1745
- "type": "integer",
1746
- "primaryKey": false,
1747
- "notNull": true,
1748
- "default": 0
1749
- },
1750
- "failed": {
1751
- "name": "failed",
1752
- "type": "integer",
1753
- "primaryKey": false,
1754
- "notNull": true,
1755
- "default": 0
1756
- },
1757
- "opened": {
1758
- "name": "opened",
1759
- "type": "integer",
1760
- "primaryKey": false,
1761
- "notNull": true,
1762
- "default": 0
1763
- },
1764
- "clicked": {
1765
- "name": "clicked",
1766
- "type": "integer",
1767
- "primaryKey": false,
1768
- "notNull": true,
1769
- "default": 0
1770
- },
1771
- "bounced": {
1772
- "name": "bounced",
1773
- "type": "integer",
1774
- "primaryKey": false,
1775
- "notNull": true,
1776
- "default": 0
1777
- },
1778
- "complained": {
1779
- "name": "complained",
1780
- "type": "integer",
1781
- "primaryKey": false,
1782
- "notNull": true,
1783
- "default": 0
1784
- },
1785
- "sms_segments": {
1786
- "name": "sms_segments",
1787
- "type": "integer",
1788
- "primaryKey": false,
1789
- "notNull": true,
1790
- "default": 0
1791
- },
1792
- "sms_opted_out": {
1793
- "name": "sms_opted_out",
1794
- "type": "integer",
1795
- "primaryKey": false,
1796
- "notNull": true,
1797
- "default": 0
1798
- },
1799
- "error_message": {
1800
- "name": "error_message",
1801
- "type": "text",
1802
- "primaryKey": false,
1803
- "notNull": false
1804
- },
1805
- "error_details": {
1806
- "name": "error_details",
1807
- "type": "json",
1808
- "primaryKey": false,
1809
- "notNull": false
1810
- },
1811
- "scheduled_for": {
1812
- "name": "scheduled_for",
1813
- "type": "timestamp",
1814
- "primaryKey": false,
1815
- "notNull": false
1816
- },
1817
- "started_at": {
1818
- "name": "started_at",
1819
- "type": "timestamp",
1820
- "primaryKey": false,
1821
- "notNull": false
1822
- },
1823
- "completed_at": {
1824
- "name": "completed_at",
1825
- "type": "timestamp",
1826
- "primaryKey": false,
1827
- "notNull": false
1828
- },
1829
- "created_by": {
1830
- "name": "created_by",
1831
- "type": "text",
1832
- "primaryKey": false,
1833
- "notNull": false
1834
- },
1835
- "created_at": {
1836
- "name": "created_at",
1837
- "type": "timestamp",
1838
- "primaryKey": false,
1839
- "notNull": true,
1840
- "default": "now()"
1841
- },
1842
- "updated_at": {
1843
- "name": "updated_at",
1844
- "type": "timestamp",
1845
- "primaryKey": false,
1846
- "notNull": true,
1847
- "default": "now()"
1848
- }
1849
- },
1850
- "indexes": {
1851
- "batch_send_org_idx": {
1852
- "name": "batch_send_org_idx",
1853
- "columns": [
1854
- {
1855
- "expression": "organization_id",
1856
- "isExpression": false,
1857
- "asc": true,
1858
- "nulls": "last"
1859
- }
1860
- ],
1861
- "isUnique": false,
1862
- "concurrently": false,
1863
- "method": "btree",
1864
- "with": {}
1865
- },
1866
- "batch_send_channel_idx": {
1867
- "name": "batch_send_channel_idx",
1868
- "columns": [
1869
- {
1870
- "expression": "channel",
1871
- "isExpression": false,
1872
- "asc": true,
1873
- "nulls": "last"
1874
- }
1875
- ],
1876
- "isUnique": false,
1877
- "concurrently": false,
1878
- "method": "btree",
1879
- "with": {}
1880
- },
1881
- "batch_send_status_idx": {
1882
- "name": "batch_send_status_idx",
1883
- "columns": [
1884
- {
1885
- "expression": "organization_id",
1886
- "isExpression": false,
1887
- "asc": true,
1888
- "nulls": "last"
1889
- },
1890
- {
1891
- "expression": "status",
1892
- "isExpression": false,
1893
- "asc": true,
1894
- "nulls": "last"
1895
- }
1896
- ],
1897
- "isUnique": false,
1898
- "concurrently": false,
1899
- "method": "btree",
1900
- "with": {}
1901
- },
1902
- "batch_send_created_at_idx": {
1903
- "name": "batch_send_created_at_idx",
1904
- "columns": [
1905
- {
1906
- "expression": "organization_id",
1907
- "isExpression": false,
1908
- "asc": true,
1909
- "nulls": "last"
1910
- },
1911
- {
1912
- "expression": "created_at",
1913
- "isExpression": false,
1914
- "asc": true,
1915
- "nulls": "last"
1916
- }
1917
- ],
1918
- "isUnique": false,
1919
- "concurrently": false,
1920
- "method": "btree",
1921
- "with": {}
1922
- }
1923
- },
1924
- "foreignKeys": {
1925
- "batch_send_organization_id_organization_id_fk": {
1926
- "name": "batch_send_organization_id_organization_id_fk",
1927
- "tableFrom": "batch_send",
1928
- "tableTo": "organization",
1929
- "columnsFrom": ["organization_id"],
1930
- "columnsTo": ["id"],
1931
- "onDelete": "cascade",
1932
- "onUpdate": "no action"
1933
- },
1934
- "batch_send_aws_account_id_aws_account_id_fk": {
1935
- "name": "batch_send_aws_account_id_aws_account_id_fk",
1936
- "tableFrom": "batch_send",
1937
- "tableTo": "aws_account",
1938
- "columnsFrom": ["aws_account_id"],
1939
- "columnsTo": ["id"],
1940
- "onDelete": "set null",
1941
- "onUpdate": "no action"
1942
- },
1943
- "batch_send_email_template_id_template_id_fk": {
1944
- "name": "batch_send_email_template_id_template_id_fk",
1945
- "tableFrom": "batch_send",
1946
- "tableTo": "template",
1947
- "columnsFrom": ["email_template_id"],
1948
- "columnsTo": ["id"],
1949
- "onDelete": "set null",
1950
- "onUpdate": "no action"
1951
- },
1952
- "batch_send_created_by_user_id_fk": {
1953
- "name": "batch_send_created_by_user_id_fk",
1954
- "tableFrom": "batch_send",
1955
- "tableTo": "user",
1956
- "columnsFrom": ["created_by"],
1957
- "columnsTo": ["id"],
1958
- "onDelete": "set null",
1959
- "onUpdate": "no action"
1960
- }
1961
- },
1962
- "compositePrimaryKeys": {},
1963
- "uniqueConstraints": {},
1964
- "policies": {},
1965
- "checkConstraints": {},
1966
- "isRLSEnabled": false
1967
- },
1968
- "public.message_send": {
1969
- "name": "message_send",
1970
- "schema": "",
1971
- "columns": {
1972
- "id": {
1973
- "name": "id",
1974
- "type": "text",
1975
- "primaryKey": true,
1976
- "notNull": true
1977
- },
1978
- "organization_id": {
1979
- "name": "organization_id",
1980
- "type": "text",
1981
- "primaryKey": false,
1982
- "notNull": true
1983
- },
1984
- "contact_id": {
1985
- "name": "contact_id",
1986
- "type": "text",
1987
- "primaryKey": false,
1988
- "notNull": false
1989
- },
1990
- "aws_account_id": {
1991
- "name": "aws_account_id",
1992
- "type": "text",
1993
- "primaryKey": false,
1994
- "notNull": true
1995
- },
1996
- "channel": {
1997
- "name": "channel",
1998
- "type": "text",
1999
- "primaryKey": false,
2000
- "notNull": true,
2001
- "default": "'email'"
2002
- },
2003
- "source_type": {
2004
- "name": "source_type",
2005
- "type": "message_source_type",
2006
- "typeSchema": "public",
2007
- "primaryKey": false,
2008
- "notNull": true
2009
- },
2010
- "batch_send_id": {
2011
- "name": "batch_send_id",
2012
- "type": "text",
2013
- "primaryKey": false,
2014
- "notNull": false
2015
- },
2016
- "recipient": {
2017
- "name": "recipient",
2018
- "type": "text",
2019
- "primaryKey": false,
2020
- "notNull": true
2021
- },
2022
- "subject": {
2023
- "name": "subject",
2024
- "type": "text",
2025
- "primaryKey": false,
2026
- "notNull": false
2027
- },
2028
- "from": {
2029
- "name": "from",
2030
- "type": "text",
2031
- "primaryKey": false,
2032
- "notNull": false
2033
- },
2034
- "from_name": {
2035
- "name": "from_name",
2036
- "type": "text",
2037
- "primaryKey": false,
2038
- "notNull": false
2039
- },
2040
- "email_template_id": {
2041
- "name": "email_template_id",
2042
- "type": "text",
2043
- "primaryKey": false,
2044
- "notNull": false
2045
- },
2046
- "body": {
2047
- "name": "body",
2048
- "type": "text",
2049
- "primaryKey": false,
2050
- "notNull": false
2051
- },
2052
- "sender_id": {
2053
- "name": "sender_id",
2054
- "type": "text",
2055
- "primaryKey": false,
2056
- "notNull": false
2057
- },
2058
- "sms_segment_count": {
2059
- "name": "sms_segment_count",
2060
- "type": "integer",
2061
- "primaryKey": false,
2062
- "notNull": false
2063
- },
2064
- "variables": {
2065
- "name": "variables",
2066
- "type": "json",
2067
- "primaryKey": false,
2068
- "notNull": false,
2069
- "default": "'{}'::json"
2070
- },
2071
- "message_id": {
2072
- "name": "message_id",
2073
- "type": "text",
2074
- "primaryKey": false,
2075
- "notNull": false
2076
- },
2077
- "status": {
2078
- "name": "status",
2079
- "type": "message_send_status",
2080
- "typeSchema": "public",
2081
- "primaryKey": false,
2082
- "notNull": true,
2083
- "default": "'pending'"
2084
- },
2085
- "sent_at": {
2086
- "name": "sent_at",
2087
- "type": "timestamp",
2088
- "primaryKey": false,
2089
- "notNull": false
2090
- },
2091
- "delivered_at": {
2092
- "name": "delivered_at",
2093
- "type": "timestamp",
2094
- "primaryKey": false,
2095
- "notNull": false
2096
- },
2097
- "opened_at": {
2098
- "name": "opened_at",
2099
- "type": "timestamp",
2100
- "primaryKey": false,
2101
- "notNull": false
2102
- },
2103
- "clicked_at": {
2104
- "name": "clicked_at",
2105
- "type": "timestamp",
2106
- "primaryKey": false,
2107
- "notNull": false
2108
- },
2109
- "bounced_at": {
2110
- "name": "bounced_at",
2111
- "type": "timestamp",
2112
- "primaryKey": false,
2113
- "notNull": false
2114
- },
2115
- "complained_at": {
2116
- "name": "complained_at",
2117
- "type": "timestamp",
2118
- "primaryKey": false,
2119
- "notNull": false
2120
- },
2121
- "opted_out_at": {
2122
- "name": "opted_out_at",
2123
- "type": "timestamp",
2124
- "primaryKey": false,
2125
- "notNull": false
2126
- },
2127
- "error": {
2128
- "name": "error",
2129
- "type": "text",
2130
- "primaryKey": false,
2131
- "notNull": false
2132
- },
2133
- "bounce_type": {
2134
- "name": "bounce_type",
2135
- "type": "text",
2136
- "primaryKey": false,
2137
- "notNull": false
2138
- },
2139
- "bounce_sub_type": {
2140
- "name": "bounce_sub_type",
2141
- "type": "text",
2142
- "primaryKey": false,
2143
- "notNull": false
2144
- },
2145
- "created_at": {
2146
- "name": "created_at",
2147
- "type": "timestamp",
2148
- "primaryKey": false,
2149
- "notNull": true,
2150
- "default": "now()"
2151
- }
2152
- },
2153
- "indexes": {
2154
- "message_send_org_idx": {
2155
- "name": "message_send_org_idx",
2156
- "columns": [
2157
- {
2158
- "expression": "organization_id",
2159
- "isExpression": false,
2160
- "asc": true,
2161
- "nulls": "last"
2162
- }
2163
- ],
2164
- "isUnique": false,
2165
- "concurrently": false,
2166
- "method": "btree",
2167
- "with": {}
2168
- },
2169
- "message_send_contact_idx": {
2170
- "name": "message_send_contact_idx",
2171
- "columns": [
2172
- {
2173
- "expression": "contact_id",
2174
- "isExpression": false,
2175
- "asc": true,
2176
- "nulls": "last"
2177
- }
2178
- ],
2179
- "isUnique": false,
2180
- "concurrently": false,
2181
- "method": "btree",
2182
- "with": {}
2183
- },
2184
- "message_send_channel_idx": {
2185
- "name": "message_send_channel_idx",
2186
- "columns": [
2187
- {
2188
- "expression": "channel",
2189
- "isExpression": false,
2190
- "asc": true,
2191
- "nulls": "last"
2192
- }
2193
- ],
2194
- "isUnique": false,
2195
- "concurrently": false,
2196
- "method": "btree",
2197
- "with": {}
2198
- },
2199
- "message_send_batch_idx": {
2200
- "name": "message_send_batch_idx",
2201
- "columns": [
2202
- {
2203
- "expression": "batch_send_id",
2204
- "isExpression": false,
2205
- "asc": true,
2206
- "nulls": "last"
2207
- }
2208
- ],
2209
- "isUnique": false,
2210
- "concurrently": false,
2211
- "method": "btree",
2212
- "with": {}
2213
- },
2214
- "message_send_status_idx": {
2215
- "name": "message_send_status_idx",
2216
- "columns": [
2217
- {
2218
- "expression": "batch_send_id",
2219
- "isExpression": false,
2220
- "asc": true,
2221
- "nulls": "last"
2222
- },
2223
- {
2224
- "expression": "status",
2225
- "isExpression": false,
2226
- "asc": true,
2227
- "nulls": "last"
2228
- }
2229
- ],
2230
- "isUnique": false,
2231
- "concurrently": false,
2232
- "method": "btree",
2233
- "with": {}
2234
- },
2235
- "message_send_message_id_idx": {
2236
- "name": "message_send_message_id_idx",
2237
- "columns": [
2238
- {
2239
- "expression": "message_id",
2240
- "isExpression": false,
2241
- "asc": true,
2242
- "nulls": "last"
2243
- }
2244
- ],
2245
- "isUnique": true,
2246
- "concurrently": false,
2247
- "method": "btree",
2248
- "with": {}
2249
- },
2250
- "message_send_source_type_idx": {
2251
- "name": "message_send_source_type_idx",
2252
- "columns": [
2253
- {
2254
- "expression": "source_type",
2255
- "isExpression": false,
2256
- "asc": true,
2257
- "nulls": "last"
2258
- }
2259
- ],
2260
- "isUnique": false,
2261
- "concurrently": false,
2262
- "method": "btree",
2263
- "with": {}
2264
- },
2265
- "message_send_created_at_idx": {
2266
- "name": "message_send_created_at_idx",
2267
- "columns": [
2268
- {
2269
- "expression": "created_at",
2270
- "isExpression": false,
2271
- "asc": true,
2272
- "nulls": "last"
2273
- }
2274
- ],
2275
- "isUnique": false,
2276
- "concurrently": false,
2277
- "method": "btree",
2278
- "with": {}
2279
- }
2280
- },
2281
- "foreignKeys": {
2282
- "message_send_organization_id_organization_id_fk": {
2283
- "name": "message_send_organization_id_organization_id_fk",
2284
- "tableFrom": "message_send",
2285
- "tableTo": "organization",
2286
- "columnsFrom": ["organization_id"],
2287
- "columnsTo": ["id"],
2288
- "onDelete": "cascade",
2289
- "onUpdate": "no action"
2290
- },
2291
- "message_send_contact_id_contact_id_fk": {
2292
- "name": "message_send_contact_id_contact_id_fk",
2293
- "tableFrom": "message_send",
2294
- "tableTo": "contact",
2295
- "columnsFrom": ["contact_id"],
2296
- "columnsTo": ["id"],
2297
- "onDelete": "set null",
2298
- "onUpdate": "no action"
2299
- },
2300
- "message_send_aws_account_id_aws_account_id_fk": {
2301
- "name": "message_send_aws_account_id_aws_account_id_fk",
2302
- "tableFrom": "message_send",
2303
- "tableTo": "aws_account",
2304
- "columnsFrom": ["aws_account_id"],
2305
- "columnsTo": ["id"],
2306
- "onDelete": "set null",
2307
- "onUpdate": "no action"
2308
- },
2309
- "message_send_batch_send_id_batch_send_id_fk": {
2310
- "name": "message_send_batch_send_id_batch_send_id_fk",
2311
- "tableFrom": "message_send",
2312
- "tableTo": "batch_send",
2313
- "columnsFrom": ["batch_send_id"],
2314
- "columnsTo": ["id"],
2315
- "onDelete": "set null",
2316
- "onUpdate": "no action"
2317
- },
2318
- "message_send_email_template_id_template_id_fk": {
2319
- "name": "message_send_email_template_id_template_id_fk",
2320
- "tableFrom": "message_send",
2321
- "tableTo": "template",
2322
- "columnsFrom": ["email_template_id"],
2323
- "columnsTo": ["id"],
2324
- "onDelete": "set null",
2325
- "onUpdate": "no action"
2326
- }
2327
- },
2328
- "compositePrimaryKeys": {},
2329
- "uniqueConstraints": {},
2330
- "policies": {},
2331
- "checkConstraints": {},
2332
- "isRLSEnabled": false
2333
- },
2334
- "public.contact": {
2335
- "name": "contact",
2336
- "schema": "",
2337
- "columns": {
2338
- "id": {
2339
- "name": "id",
2340
- "type": "text",
2341
- "primaryKey": true,
2342
- "notNull": true
2343
- },
2344
- "organization_id": {
2345
- "name": "organization_id",
2346
- "type": "text",
2347
- "primaryKey": false,
2348
- "notNull": true
2349
- },
2350
- "email": {
2351
- "name": "email",
2352
- "type": "text",
2353
- "primaryKey": false,
2354
- "notNull": false
2355
- },
2356
- "email_hash": {
2357
- "name": "email_hash",
2358
- "type": "text",
2359
- "primaryKey": false,
2360
- "notNull": false
2361
- },
2362
- "email_status": {
2363
- "name": "email_status",
2364
- "type": "text",
2365
- "primaryKey": false,
2366
- "notNull": false
2367
- },
2368
- "email_verified_at": {
2369
- "name": "email_verified_at",
2370
- "type": "timestamp",
2371
- "primaryKey": false,
2372
- "notNull": false
2373
- },
2374
- "email_unsubscribed_at": {
2375
- "name": "email_unsubscribed_at",
2376
- "type": "timestamp",
2377
- "primaryKey": false,
2378
- "notNull": false
2379
- },
2380
- "email_bounced_at": {
2381
- "name": "email_bounced_at",
2382
- "type": "timestamp",
2383
- "primaryKey": false,
2384
- "notNull": false
2385
- },
2386
- "email_complained_at": {
2387
- "name": "email_complained_at",
2388
- "type": "timestamp",
2389
- "primaryKey": false,
2390
- "notNull": false
2391
- },
2392
- "last_email_sent_at": {
2393
- "name": "last_email_sent_at",
2394
- "type": "timestamp",
2395
- "primaryKey": false,
2396
- "notNull": false
2397
- },
2398
- "last_email_opened_at": {
2399
- "name": "last_email_opened_at",
2400
- "type": "timestamp",
2401
- "primaryKey": false,
2402
- "notNull": false
2403
- },
2404
- "last_email_clicked_at": {
2405
- "name": "last_email_clicked_at",
2406
- "type": "timestamp",
2407
- "primaryKey": false,
2408
- "notNull": false
2409
- },
2410
- "emails_sent": {
2411
- "name": "emails_sent",
2412
- "type": "integer",
2413
- "primaryKey": false,
2414
- "notNull": true,
2415
- "default": 0
2416
- },
2417
- "emails_opened": {
2418
- "name": "emails_opened",
2419
- "type": "integer",
2420
- "primaryKey": false,
2421
- "notNull": true,
2422
- "default": 0
2423
- },
2424
- "emails_clicked": {
2425
- "name": "emails_clicked",
2426
- "type": "integer",
2427
- "primaryKey": false,
2428
- "notNull": true,
2429
- "default": 0
2430
- },
2431
- "phone": {
2432
- "name": "phone",
2433
- "type": "text",
2434
- "primaryKey": false,
2435
- "notNull": false
2436
- },
2437
- "phone_hash": {
2438
- "name": "phone_hash",
2439
- "type": "text",
2440
- "primaryKey": false,
2441
- "notNull": false
2442
- },
2443
- "sms_status": {
2444
- "name": "sms_status",
2445
- "type": "text",
2446
- "primaryKey": false,
2447
- "notNull": false
2448
- },
2449
- "sms_consented_at": {
2450
- "name": "sms_consented_at",
2451
- "type": "timestamp",
2452
- "primaryKey": false,
2453
- "notNull": false
2454
- },
2455
- "sms_opted_out_at": {
2456
- "name": "sms_opted_out_at",
2457
- "type": "timestamp",
2458
- "primaryKey": false,
2459
- "notNull": false
2460
- },
2461
- "sms_invalid_at": {
2462
- "name": "sms_invalid_at",
2463
- "type": "timestamp",
2464
- "primaryKey": false,
2465
- "notNull": false
2466
- },
2467
- "last_sms_sent_at": {
2468
- "name": "last_sms_sent_at",
2469
- "type": "timestamp",
2470
- "primaryKey": false,
2471
- "notNull": false
2472
- },
2473
- "last_sms_clicked_at": {
2474
- "name": "last_sms_clicked_at",
2475
- "type": "timestamp",
2476
- "primaryKey": false,
2477
- "notNull": false
2478
- },
2479
- "sms_sent": {
2480
- "name": "sms_sent",
2481
- "type": "integer",
2482
- "primaryKey": false,
2483
- "notNull": true,
2484
- "default": 0
2485
- },
2486
- "sms_clicked": {
2487
- "name": "sms_clicked",
2488
- "type": "integer",
2489
- "primaryKey": false,
2490
- "notNull": true,
2491
- "default": 0
2492
- },
2493
- "properties": {
2494
- "name": "properties",
2495
- "type": "json",
2496
- "primaryKey": false,
2497
- "notNull": true,
2498
- "default": "'{}'::json"
2499
- },
2500
- "last_activity_at": {
2501
- "name": "last_activity_at",
2502
- "type": "timestamp",
2503
- "primaryKey": false,
2504
- "notNull": false
2505
- },
2506
- "created_at": {
2507
- "name": "created_at",
2508
- "type": "timestamp",
2509
- "primaryKey": false,
2510
- "notNull": true,
2511
- "default": "now()"
2512
- },
2513
- "updated_at": {
2514
- "name": "updated_at",
2515
- "type": "timestamp",
2516
- "primaryKey": false,
2517
- "notNull": true,
2518
- "default": "now()"
2519
- },
2520
- "created_by": {
2521
- "name": "created_by",
2522
- "type": "text",
2523
- "primaryKey": false,
2524
- "notNull": false
2525
- },
2526
- "status": {
2527
- "name": "status",
2528
- "type": "text",
2529
- "primaryKey": false,
2530
- "notNull": true,
2531
- "default": "'active'"
2532
- },
2533
- "confirmed_at": {
2534
- "name": "confirmed_at",
2535
- "type": "timestamp",
2536
- "primaryKey": false,
2537
- "notNull": false
2538
- },
2539
- "unsubscribed_at": {
2540
- "name": "unsubscribed_at",
2541
- "type": "timestamp",
2542
- "primaryKey": false,
2543
- "notNull": false
2544
- },
2545
- "bounced_at": {
2546
- "name": "bounced_at",
2547
- "type": "timestamp",
2548
- "primaryKey": false,
2549
- "notNull": false
2550
- },
2551
- "complained_at": {
2552
- "name": "complained_at",
2553
- "type": "timestamp",
2554
- "primaryKey": false,
2555
- "notNull": false
2556
- }
2557
- },
2558
- "indexes": {
2559
- "contact_org_idx": {
2560
- "name": "contact_org_idx",
2561
- "columns": [
2562
- {
2563
- "expression": "organization_id",
2564
- "isExpression": false,
2565
- "asc": true,
2566
- "nulls": "last"
2567
- }
2568
- ],
2569
- "isUnique": false,
2570
- "concurrently": false,
2571
- "method": "btree",
2572
- "with": {}
2573
- },
2574
- "contact_email_idx": {
2575
- "name": "contact_email_idx",
2576
- "columns": [
2577
- {
2578
- "expression": "email",
2579
- "isExpression": false,
2580
- "asc": true,
2581
- "nulls": "last"
2582
- }
2583
- ],
2584
- "isUnique": false,
2585
- "concurrently": false,
2586
- "method": "btree",
2587
- "with": {}
2588
- },
2589
- "contact_unique_org_email_idx": {
2590
- "name": "contact_unique_org_email_idx",
2591
- "columns": [
2592
- {
2593
- "expression": "organization_id",
2594
- "isExpression": false,
2595
- "asc": true,
2596
- "nulls": "last"
2597
- },
2598
- {
2599
- "expression": "email_hash",
2600
- "isExpression": false,
2601
- "asc": true,
2602
- "nulls": "last"
2603
- }
2604
- ],
2605
- "isUnique": true,
2606
- "where": "email_hash IS NOT NULL",
2607
- "concurrently": false,
2608
- "method": "btree",
2609
- "with": {}
2610
- },
2611
- "contact_email_status_idx": {
2612
- "name": "contact_email_status_idx",
2613
- "columns": [
2614
- {
2615
- "expression": "organization_id",
2616
- "isExpression": false,
2617
- "asc": true,
2618
- "nulls": "last"
2619
- },
2620
- {
2621
- "expression": "email_status",
2622
- "isExpression": false,
2623
- "asc": true,
2624
- "nulls": "last"
2625
- }
2626
- ],
2627
- "isUnique": false,
2628
- "concurrently": false,
2629
- "method": "btree",
2630
- "with": {}
2631
- },
2632
- "contact_phone_idx": {
2633
- "name": "contact_phone_idx",
2634
- "columns": [
2635
- {
2636
- "expression": "phone",
2637
- "isExpression": false,
2638
- "asc": true,
2639
- "nulls": "last"
2640
- }
2641
- ],
2642
- "isUnique": false,
2643
- "concurrently": false,
2644
- "method": "btree",
2645
- "with": {}
2646
- },
2647
- "contact_unique_org_phone_idx": {
2648
- "name": "contact_unique_org_phone_idx",
2649
- "columns": [
2650
- {
2651
- "expression": "organization_id",
2652
- "isExpression": false,
2653
- "asc": true,
2654
- "nulls": "last"
2655
- },
2656
- {
2657
- "expression": "phone_hash",
2658
- "isExpression": false,
2659
- "asc": true,
2660
- "nulls": "last"
2661
- }
2662
- ],
2663
- "isUnique": true,
2664
- "where": "phone_hash IS NOT NULL",
2665
- "concurrently": false,
2666
- "method": "btree",
2667
- "with": {}
2668
- },
2669
- "contact_sms_status_idx": {
2670
- "name": "contact_sms_status_idx",
2671
- "columns": [
2672
- {
2673
- "expression": "organization_id",
2674
- "isExpression": false,
2675
- "asc": true,
2676
- "nulls": "last"
2677
- },
2678
- {
2679
- "expression": "sms_status",
2680
- "isExpression": false,
2681
- "asc": true,
2682
- "nulls": "last"
2683
- }
2684
- ],
2685
- "isUnique": false,
2686
- "concurrently": false,
2687
- "method": "btree",
2688
- "with": {}
2689
- },
2690
- "contact_status_idx": {
2691
- "name": "contact_status_idx",
2692
- "columns": [
2693
- {
2694
- "expression": "organization_id",
2695
- "isExpression": false,
2696
- "asc": true,
2697
- "nulls": "last"
2698
- },
2699
- {
2700
- "expression": "status",
2701
- "isExpression": false,
2702
- "asc": true,
2703
- "nulls": "last"
2704
- }
2705
- ],
2706
- "isUnique": false,
2707
- "concurrently": false,
2708
- "method": "btree",
2709
- "with": {}
2710
- }
2711
- },
2712
- "foreignKeys": {
2713
- "contact_organization_id_organization_id_fk": {
2714
- "name": "contact_organization_id_organization_id_fk",
2715
- "tableFrom": "contact",
2716
- "tableTo": "organization",
2717
- "columnsFrom": ["organization_id"],
2718
- "columnsTo": ["id"],
2719
- "onDelete": "cascade",
2720
- "onUpdate": "no action"
2721
- },
2722
- "contact_created_by_user_id_fk": {
2723
- "name": "contact_created_by_user_id_fk",
2724
- "tableFrom": "contact",
2725
- "tableTo": "user",
2726
- "columnsFrom": ["created_by"],
2727
- "columnsTo": ["id"],
2728
- "onDelete": "no action",
2729
- "onUpdate": "no action"
2730
- }
2731
- },
2732
- "compositePrimaryKeys": {},
2733
- "uniqueConstraints": {},
2734
- "policies": {},
2735
- "checkConstraints": {},
2736
- "isRLSEnabled": false
2737
- },
2738
- "public.contact_topic": {
2739
- "name": "contact_topic",
2740
- "schema": "",
2741
- "columns": {
2742
- "contact_id": {
2743
- "name": "contact_id",
2744
- "type": "text",
2745
- "primaryKey": false,
2746
- "notNull": true
2747
- },
2748
- "topic_id": {
2749
- "name": "topic_id",
2750
- "type": "text",
2751
- "primaryKey": false,
2752
- "notNull": true
2753
- },
2754
- "status": {
2755
- "name": "status",
2756
- "type": "text",
2757
- "primaryKey": false,
2758
- "notNull": true,
2759
- "default": "'subscribed'"
2760
- },
2761
- "subscribed_at": {
2762
- "name": "subscribed_at",
2763
- "type": "timestamp",
2764
- "primaryKey": false,
2765
- "notNull": false,
2766
- "default": "now()"
2767
- },
2768
- "unsubscribed_at": {
2769
- "name": "unsubscribed_at",
2770
- "type": "timestamp",
2771
- "primaryKey": false,
2772
- "notNull": false
2773
- },
2774
- "confirmed_at": {
2775
- "name": "confirmed_at",
2776
- "type": "timestamp",
2777
- "primaryKey": false,
2778
- "notNull": false
2779
- }
2780
- },
2781
- "indexes": {
2782
- "contact_topic_topic_idx": {
2783
- "name": "contact_topic_topic_idx",
2784
- "columns": [
2785
- {
2786
- "expression": "topic_id",
2787
- "isExpression": false,
2788
- "asc": true,
2789
- "nulls": "last"
2790
- }
2791
- ],
2792
- "isUnique": false,
2793
- "concurrently": false,
2794
- "method": "btree",
2795
- "with": {}
2796
- },
2797
- "contact_topic_status_idx": {
2798
- "name": "contact_topic_status_idx",
2799
- "columns": [
2800
- {
2801
- "expression": "topic_id",
2802
- "isExpression": false,
2803
- "asc": true,
2804
- "nulls": "last"
2805
- },
2806
- {
2807
- "expression": "status",
2808
- "isExpression": false,
2809
- "asc": true,
2810
- "nulls": "last"
2811
- }
2812
- ],
2813
- "isUnique": false,
2814
- "concurrently": false,
2815
- "method": "btree",
2816
- "with": {}
2817
- }
2818
- },
2819
- "foreignKeys": {
2820
- "contact_topic_contact_id_contact_id_fk": {
2821
- "name": "contact_topic_contact_id_contact_id_fk",
2822
- "tableFrom": "contact_topic",
2823
- "tableTo": "contact",
2824
- "columnsFrom": ["contact_id"],
2825
- "columnsTo": ["id"],
2826
- "onDelete": "cascade",
2827
- "onUpdate": "no action"
2828
- },
2829
- "contact_topic_topic_id_topic_id_fk": {
2830
- "name": "contact_topic_topic_id_topic_id_fk",
2831
- "tableFrom": "contact_topic",
2832
- "tableTo": "topic",
2833
- "columnsFrom": ["topic_id"],
2834
- "columnsTo": ["id"],
2835
- "onDelete": "cascade",
2836
- "onUpdate": "no action"
2837
- }
2838
- },
2839
- "compositePrimaryKeys": {
2840
- "contact_topic_contact_id_topic_id_pk": {
2841
- "name": "contact_topic_contact_id_topic_id_pk",
2842
- "columns": ["contact_id", "topic_id"]
2843
- }
2844
- },
2845
- "uniqueConstraints": {},
2846
- "policies": {},
2847
- "checkConstraints": {},
2848
- "isRLSEnabled": false
2849
- },
2850
- "public.topic": {
2851
- "name": "topic",
2852
- "schema": "",
2853
- "columns": {
2854
- "id": {
2855
- "name": "id",
2856
- "type": "text",
2857
- "primaryKey": true,
2858
- "notNull": true
2859
- },
2860
- "organization_id": {
2861
- "name": "organization_id",
2862
- "type": "text",
2863
- "primaryKey": false,
2864
- "notNull": true
2865
- },
2866
- "name": {
2867
- "name": "name",
2868
- "type": "text",
2869
- "primaryKey": false,
2870
- "notNull": true
2871
- },
2872
- "slug": {
2873
- "name": "slug",
2874
- "type": "text",
2875
- "primaryKey": false,
2876
- "notNull": true
2877
- },
2878
- "description": {
2879
- "name": "description",
2880
- "type": "text",
2881
- "primaryKey": false,
2882
- "notNull": false
2883
- },
2884
- "public": {
2885
- "name": "public",
2886
- "type": "boolean",
2887
- "primaryKey": false,
2888
- "notNull": true,
2889
- "default": true
2890
- },
2891
- "double_opt_in": {
2892
- "name": "double_opt_in",
2893
- "type": "boolean",
2894
- "primaryKey": false,
2895
- "notNull": true,
2896
- "default": false
2897
- },
2898
- "created_at": {
2899
- "name": "created_at",
2900
- "type": "timestamp",
2901
- "primaryKey": false,
2902
- "notNull": true,
2903
- "default": "now()"
2904
- },
2905
- "updated_at": {
2906
- "name": "updated_at",
2907
- "type": "timestamp",
2908
- "primaryKey": false,
2909
- "notNull": true,
2910
- "default": "now()"
2911
- },
2912
- "created_by": {
2913
- "name": "created_by",
2914
- "type": "text",
2915
- "primaryKey": false,
2916
- "notNull": false
2917
- }
2918
- },
2919
- "indexes": {
2920
- "topic_org_idx": {
2921
- "name": "topic_org_idx",
2922
- "columns": [
2923
- {
2924
- "expression": "organization_id",
2925
- "isExpression": false,
2926
- "asc": true,
2927
- "nulls": "last"
2928
- }
2929
- ],
2930
- "isUnique": false,
2931
- "concurrently": false,
2932
- "method": "btree",
2933
- "with": {}
2934
- },
2935
- "topic_unique_org_slug_idx": {
2936
- "name": "topic_unique_org_slug_idx",
2937
- "columns": [
2938
- {
2939
- "expression": "organization_id",
2940
- "isExpression": false,
2941
- "asc": true,
2942
- "nulls": "last"
2943
- },
2944
- {
2945
- "expression": "slug",
2946
- "isExpression": false,
2947
- "asc": true,
2948
- "nulls": "last"
2949
- }
2950
- ],
2951
- "isUnique": true,
2952
- "concurrently": false,
2953
- "method": "btree",
2954
- "with": {}
2955
- }
2956
- },
2957
- "foreignKeys": {
2958
- "topic_organization_id_organization_id_fk": {
2959
- "name": "topic_organization_id_organization_id_fk",
2960
- "tableFrom": "topic",
2961
- "tableTo": "organization",
2962
- "columnsFrom": ["organization_id"],
2963
- "columnsTo": ["id"],
2964
- "onDelete": "cascade",
2965
- "onUpdate": "no action"
2966
- },
2967
- "topic_created_by_user_id_fk": {
2968
- "name": "topic_created_by_user_id_fk",
2969
- "tableFrom": "topic",
2970
- "tableTo": "user",
2971
- "columnsFrom": ["created_by"],
2972
- "columnsTo": ["id"],
2973
- "onDelete": "no action",
2974
- "onUpdate": "no action"
2975
- }
2976
- },
2977
- "compositePrimaryKeys": {},
2978
- "uniqueConstraints": {},
2979
- "policies": {},
2980
- "checkConstraints": {},
2981
- "isRLSEnabled": false
2982
- },
2983
- "public.segment": {
2984
- "name": "segment",
2985
- "schema": "",
2986
- "columns": {
2987
- "id": {
2988
- "name": "id",
2989
- "type": "text",
2990
- "primaryKey": true,
2991
- "notNull": true
2992
- },
2993
- "organization_id": {
2994
- "name": "organization_id",
2995
- "type": "text",
2996
- "primaryKey": false,
2997
- "notNull": true
2998
- },
2999
- "name": {
3000
- "name": "name",
3001
- "type": "text",
3002
- "primaryKey": false,
3003
- "notNull": true
3004
- },
3005
- "description": {
3006
- "name": "description",
3007
- "type": "text",
3008
- "primaryKey": false,
3009
- "notNull": false
3010
- },
3011
- "condition": {
3012
- "name": "condition",
3013
- "type": "json",
3014
- "primaryKey": false,
3015
- "notNull": true
3016
- },
3017
- "track_membership": {
3018
- "name": "track_membership",
3019
- "type": "boolean",
3020
- "primaryKey": false,
3021
- "notNull": true,
3022
- "default": false
3023
- },
3024
- "member_count": {
3025
- "name": "member_count",
3026
- "type": "integer",
3027
- "primaryKey": false,
3028
- "notNull": true,
3029
- "default": 0
3030
- },
3031
- "last_computed_at": {
3032
- "name": "last_computed_at",
3033
- "type": "timestamp",
3034
- "primaryKey": false,
3035
- "notNull": false
3036
- },
3037
- "created_by": {
3038
- "name": "created_by",
3039
- "type": "text",
3040
- "primaryKey": false,
3041
- "notNull": false
3042
- },
3043
- "created_at": {
3044
- "name": "created_at",
3045
- "type": "timestamp",
3046
- "primaryKey": false,
3047
- "notNull": true,
3048
- "default": "now()"
3049
- },
3050
- "updated_at": {
3051
- "name": "updated_at",
3052
- "type": "timestamp",
3053
- "primaryKey": false,
3054
- "notNull": true,
3055
- "default": "now()"
3056
- }
3057
- },
3058
- "indexes": {
3059
- "segment_org_idx": {
3060
- "name": "segment_org_idx",
3061
- "columns": [
3062
- {
3063
- "expression": "organization_id",
3064
- "isExpression": false,
3065
- "asc": true,
3066
- "nulls": "last"
3067
- }
3068
- ],
3069
- "isUnique": false,
3070
- "concurrently": false,
3071
- "method": "btree",
3072
- "with": {}
3073
- },
3074
- "segment_name_idx": {
3075
- "name": "segment_name_idx",
3076
- "columns": [
3077
- {
3078
- "expression": "organization_id",
3079
- "isExpression": false,
3080
- "asc": true,
3081
- "nulls": "last"
3082
- },
3083
- {
3084
- "expression": "name",
3085
- "isExpression": false,
3086
- "asc": true,
3087
- "nulls": "last"
3088
- }
3089
- ],
3090
- "isUnique": false,
3091
- "concurrently": false,
3092
- "method": "btree",
3093
- "with": {}
3094
- }
3095
- },
3096
- "foreignKeys": {
3097
- "segment_organization_id_organization_id_fk": {
3098
- "name": "segment_organization_id_organization_id_fk",
3099
- "tableFrom": "segment",
3100
- "tableTo": "organization",
3101
- "columnsFrom": ["organization_id"],
3102
- "columnsTo": ["id"],
3103
- "onDelete": "cascade",
3104
- "onUpdate": "no action"
3105
- },
3106
- "segment_created_by_user_id_fk": {
3107
- "name": "segment_created_by_user_id_fk",
3108
- "tableFrom": "segment",
3109
- "tableTo": "user",
3110
- "columnsFrom": ["created_by"],
3111
- "columnsTo": ["id"],
3112
- "onDelete": "no action",
3113
- "onUpdate": "no action"
3114
- }
3115
- },
3116
- "compositePrimaryKeys": {},
3117
- "uniqueConstraints": {},
3118
- "policies": {},
3119
- "checkConstraints": {},
3120
- "isRLSEnabled": false
3121
- },
3122
- "public.ai_conversation": {
3123
- "name": "ai_conversation",
3124
- "schema": "",
3125
- "columns": {
3126
- "id": {
3127
- "name": "id",
3128
- "type": "text",
3129
- "primaryKey": true,
3130
- "notNull": true
3131
- },
3132
- "organization_id": {
3133
- "name": "organization_id",
3134
- "type": "text",
3135
- "primaryKey": false,
3136
- "notNull": true
3137
- },
3138
- "template_id": {
3139
- "name": "template_id",
3140
- "type": "text",
3141
- "primaryKey": false,
3142
- "notNull": false
3143
- },
3144
- "messages": {
3145
- "name": "messages",
3146
- "type": "jsonb",
3147
- "primaryKey": false,
3148
- "notNull": false,
3149
- "default": "'[]'::jsonb"
3150
- },
3151
- "total_tokens": {
3152
- "name": "total_tokens",
3153
- "type": "integer",
3154
- "primaryKey": false,
3155
- "notNull": true,
3156
- "default": 0
3157
- },
3158
- "created_at": {
3159
- "name": "created_at",
3160
- "type": "timestamp",
3161
- "primaryKey": false,
3162
- "notNull": true,
3163
- "default": "now()"
3164
- },
3165
- "updated_at": {
3166
- "name": "updated_at",
3167
- "type": "timestamp",
3168
- "primaryKey": false,
3169
- "notNull": true,
3170
- "default": "now()"
3171
- },
3172
- "created_by": {
3173
- "name": "created_by",
3174
- "type": "text",
3175
- "primaryKey": false,
3176
- "notNull": true
3177
- }
3178
- },
3179
- "indexes": {
3180
- "ai_conversation_org_idx": {
3181
- "name": "ai_conversation_org_idx",
3182
- "columns": [
3183
- {
3184
- "expression": "organization_id",
3185
- "isExpression": false,
3186
- "asc": true,
3187
- "nulls": "last"
3188
- }
3189
- ],
3190
- "isUnique": false,
3191
- "concurrently": false,
3192
- "method": "btree",
3193
- "with": {}
3194
- },
3195
- "ai_conversation_template_idx": {
3196
- "name": "ai_conversation_template_idx",
3197
- "columns": [
3198
- {
3199
- "expression": "template_id",
3200
- "isExpression": false,
3201
- "asc": true,
3202
- "nulls": "last"
3203
- }
3204
- ],
3205
- "isUnique": false,
3206
- "concurrently": false,
3207
- "method": "btree",
3208
- "with": {}
3209
- }
3210
- },
3211
- "foreignKeys": {
3212
- "ai_conversation_organization_id_organization_id_fk": {
3213
- "name": "ai_conversation_organization_id_organization_id_fk",
3214
- "tableFrom": "ai_conversation",
3215
- "tableTo": "organization",
3216
- "columnsFrom": ["organization_id"],
3217
- "columnsTo": ["id"],
3218
- "onDelete": "cascade",
3219
- "onUpdate": "no action"
3220
- },
3221
- "ai_conversation_template_id_template_id_fk": {
3222
- "name": "ai_conversation_template_id_template_id_fk",
3223
- "tableFrom": "ai_conversation",
3224
- "tableTo": "template",
3225
- "columnsFrom": ["template_id"],
3226
- "columnsTo": ["id"],
3227
- "onDelete": "cascade",
3228
- "onUpdate": "no action"
3229
- },
3230
- "ai_conversation_created_by_user_id_fk": {
3231
- "name": "ai_conversation_created_by_user_id_fk",
3232
- "tableFrom": "ai_conversation",
3233
- "tableTo": "user",
3234
- "columnsFrom": ["created_by"],
3235
- "columnsTo": ["id"],
3236
- "onDelete": "set null",
3237
- "onUpdate": "no action"
3238
- }
3239
- },
3240
- "compositePrimaryKeys": {},
3241
- "uniqueConstraints": {},
3242
- "policies": {},
3243
- "checkConstraints": {},
3244
- "isRLSEnabled": false
3245
- },
3246
- "public.brand_kit": {
3247
- "name": "brand_kit",
3248
- "schema": "",
3249
- "columns": {
3250
- "id": {
3251
- "name": "id",
3252
- "type": "text",
3253
- "primaryKey": true,
3254
- "notNull": true
3255
- },
3256
- "organization_id": {
3257
- "name": "organization_id",
3258
- "type": "text",
3259
- "primaryKey": false,
3260
- "notNull": true
3261
- },
3262
- "name": {
3263
- "name": "name",
3264
- "type": "text",
3265
- "primaryKey": false,
3266
- "notNull": true,
3267
- "default": "'Default'"
3268
- },
3269
- "logo_url": {
3270
- "name": "logo_url",
3271
- "type": "text",
3272
- "primaryKey": false,
3273
- "notNull": false
3274
- },
3275
- "primary_color": {
3276
- "name": "primary_color",
3277
- "type": "text",
3278
- "primaryKey": false,
3279
- "notNull": true,
3280
- "default": "'#5046e5'"
3281
- },
3282
- "secondary_color": {
3283
- "name": "secondary_color",
3284
- "type": "text",
3285
- "primaryKey": false,
3286
- "notNull": true,
3287
- "default": "'#6366f1'"
3288
- },
3289
- "background_color": {
3290
- "name": "background_color",
3291
- "type": "text",
3292
- "primaryKey": false,
3293
- "notNull": true,
3294
- "default": "'#ffffff'"
3295
- },
3296
- "text_color": {
3297
- "name": "text_color",
3298
- "type": "text",
3299
- "primaryKey": false,
3300
- "notNull": true,
3301
- "default": "'#1f2937'"
3302
- },
3303
- "font_family": {
3304
- "name": "font_family",
3305
- "type": "text",
3306
- "primaryKey": false,
3307
- "notNull": true,
3308
- "default": "'system-ui, sans-serif'"
3309
- },
3310
- "heading_font_family": {
3311
- "name": "heading_font_family",
3312
- "type": "text",
3313
- "primaryKey": false,
3314
- "notNull": false
3315
- },
3316
- "button_style": {
3317
- "name": "button_style",
3318
- "type": "text",
3319
- "primaryKey": false,
3320
- "notNull": true,
3321
- "default": "'rounded'"
3322
- },
3323
- "button_radius": {
3324
- "name": "button_radius",
3325
- "type": "text",
3326
- "primaryKey": false,
3327
- "notNull": true,
3328
- "default": "'4px'"
3329
- },
3330
- "company_name": {
3331
- "name": "company_name",
3332
- "type": "text",
3333
- "primaryKey": false,
3334
- "notNull": false
3335
- },
3336
- "company_address": {
3337
- "name": "company_address",
3338
- "type": "text",
3339
- "primaryKey": false,
3340
- "notNull": false
3341
- },
3342
- "social_links": {
3343
- "name": "social_links",
3344
- "type": "jsonb",
3345
- "primaryKey": false,
3346
- "notNull": false,
3347
- "default": "'[]'::jsonb"
3348
- },
3349
- "source_domain": {
3350
- "name": "source_domain",
3351
- "type": "text",
3352
- "primaryKey": false,
3353
- "notNull": false
3354
- },
3355
- "auto_extracted": {
3356
- "name": "auto_extracted",
3357
- "type": "boolean",
3358
- "primaryKey": false,
3359
- "notNull": true,
3360
- "default": false
3361
- },
3362
- "is_default": {
3363
- "name": "is_default",
3364
- "type": "boolean",
3365
- "primaryKey": false,
3366
- "notNull": true,
3367
- "default": false
3368
- },
3369
- "created_at": {
3370
- "name": "created_at",
3371
- "type": "timestamp",
3372
- "primaryKey": false,
3373
- "notNull": true,
3374
- "default": "now()"
3375
- },
3376
- "updated_at": {
3377
- "name": "updated_at",
3378
- "type": "timestamp",
3379
- "primaryKey": false,
3380
- "notNull": true,
3381
- "default": "now()"
3382
- }
3383
- },
3384
- "indexes": {
3385
- "brand_kit_org_idx": {
3386
- "name": "brand_kit_org_idx",
3387
- "columns": [
3388
- {
3389
- "expression": "organization_id",
3390
- "isExpression": false,
3391
- "asc": true,
3392
- "nulls": "last"
3393
- }
3394
- ],
3395
- "isUnique": false,
3396
- "concurrently": false,
3397
- "method": "btree",
3398
- "with": {}
3399
- },
3400
- "brand_kit_default_idx": {
3401
- "name": "brand_kit_default_idx",
3402
- "columns": [
3403
- {
3404
- "expression": "organization_id",
3405
- "isExpression": false,
3406
- "asc": true,
3407
- "nulls": "last"
3408
- },
3409
- {
3410
- "expression": "is_default",
3411
- "isExpression": false,
3412
- "asc": true,
3413
- "nulls": "last"
3414
- }
3415
- ],
3416
- "isUnique": false,
3417
- "concurrently": false,
3418
- "method": "btree",
3419
- "with": {}
3420
- }
3421
- },
3422
- "foreignKeys": {
3423
- "brand_kit_organization_id_organization_id_fk": {
3424
- "name": "brand_kit_organization_id_organization_id_fk",
3425
- "tableFrom": "brand_kit",
3426
- "tableTo": "organization",
3427
- "columnsFrom": ["organization_id"],
3428
- "columnsTo": ["id"],
3429
- "onDelete": "cascade",
3430
- "onUpdate": "no action"
3431
- }
3432
- },
3433
- "compositePrimaryKeys": {},
3434
- "uniqueConstraints": {},
3435
- "policies": {},
3436
- "checkConstraints": {},
3437
- "isRLSEnabled": false
3438
- },
3439
- "public.reusable_block": {
3440
- "name": "reusable_block",
3441
- "schema": "",
3442
- "columns": {
3443
- "id": {
3444
- "name": "id",
3445
- "type": "text",
3446
- "primaryKey": true,
3447
- "notNull": true
3448
- },
3449
- "organization_id": {
3450
- "name": "organization_id",
3451
- "type": "text",
3452
- "primaryKey": false,
3453
- "notNull": true
3454
- },
3455
- "name": {
3456
- "name": "name",
3457
- "type": "text",
3458
- "primaryKey": false,
3459
- "notNull": true
3460
- },
3461
- "description": {
3462
- "name": "description",
3463
- "type": "text",
3464
- "primaryKey": false,
3465
- "notNull": false
3466
- },
3467
- "category": {
3468
- "name": "category",
3469
- "type": "text",
3470
- "primaryKey": false,
3471
- "notNull": true,
3472
- "default": "'custom'"
3473
- },
3474
- "content": {
3475
- "name": "content",
3476
- "type": "jsonb",
3477
- "primaryKey": false,
3478
- "notNull": true
3479
- },
3480
- "thumbnail": {
3481
- "name": "thumbnail",
3482
- "type": "text",
3483
- "primaryKey": false,
3484
- "notNull": false
3485
- },
3486
- "is_public": {
3487
- "name": "is_public",
3488
- "type": "boolean",
3489
- "primaryKey": false,
3490
- "notNull": true,
3491
- "default": false
3492
- },
3493
- "usage_count": {
3494
- "name": "usage_count",
3495
- "type": "integer",
3496
- "primaryKey": false,
3497
- "notNull": true,
3498
- "default": 0
3499
- },
3500
- "created_at": {
3501
- "name": "created_at",
3502
- "type": "timestamp",
3503
- "primaryKey": false,
3504
- "notNull": true,
3505
- "default": "now()"
3506
- },
3507
- "updated_at": {
3508
- "name": "updated_at",
3509
- "type": "timestamp",
3510
- "primaryKey": false,
3511
- "notNull": true,
3512
- "default": "now()"
3513
- },
3514
- "created_by": {
3515
- "name": "created_by",
3516
- "type": "text",
3517
- "primaryKey": false,
3518
- "notNull": true
3519
- }
3520
- },
3521
- "indexes": {
3522
- "reusable_block_org_idx": {
3523
- "name": "reusable_block_org_idx",
3524
- "columns": [
3525
- {
3526
- "expression": "organization_id",
3527
- "isExpression": false,
3528
- "asc": true,
3529
- "nulls": "last"
3530
- }
3531
- ],
3532
- "isUnique": false,
3533
- "concurrently": false,
3534
- "method": "btree",
3535
- "with": {}
3536
- },
3537
- "reusable_block_created_by_category_idx": {
3538
- "name": "reusable_block_created_by_category_idx",
3539
- "columns": [
3540
- {
3541
- "expression": "created_by",
3542
- "isExpression": false,
3543
- "asc": true,
3544
- "nulls": "last"
3545
- },
3546
- {
3547
- "expression": "category",
3548
- "isExpression": false,
3549
- "asc": true,
3550
- "nulls": "last"
3551
- }
3552
- ],
3553
- "isUnique": false,
3554
- "concurrently": false,
3555
- "method": "btree",
3556
- "with": {}
3557
- },
3558
- "reusable_block_public_category_idx": {
3559
- "name": "reusable_block_public_category_idx",
3560
- "columns": [
3561
- {
3562
- "expression": "is_public",
3563
- "isExpression": false,
3564
- "asc": true,
3565
- "nulls": "last"
3566
- },
3567
- {
3568
- "expression": "category",
3569
- "isExpression": false,
3570
- "asc": true,
3571
- "nulls": "last"
3572
- }
3573
- ],
3574
- "isUnique": false,
3575
- "concurrently": false,
3576
- "method": "btree",
3577
- "with": {}
3578
- }
3579
- },
3580
- "foreignKeys": {
3581
- "reusable_block_organization_id_organization_id_fk": {
3582
- "name": "reusable_block_organization_id_organization_id_fk",
3583
- "tableFrom": "reusable_block",
3584
- "tableTo": "organization",
3585
- "columnsFrom": ["organization_id"],
3586
- "columnsTo": ["id"],
3587
- "onDelete": "cascade",
3588
- "onUpdate": "no action"
3589
- },
3590
- "reusable_block_created_by_user_id_fk": {
3591
- "name": "reusable_block_created_by_user_id_fk",
3592
- "tableFrom": "reusable_block",
3593
- "tableTo": "user",
3594
- "columnsFrom": ["created_by"],
3595
- "columnsTo": ["id"],
3596
- "onDelete": "set null",
3597
- "onUpdate": "no action"
3598
- }
3599
- },
3600
- "compositePrimaryKeys": {},
3601
- "uniqueConstraints": {},
3602
- "policies": {},
3603
- "checkConstraints": {},
3604
- "isRLSEnabled": false
3605
- },
3606
- "public.template": {
3607
- "name": "template",
3608
- "schema": "",
3609
- "columns": {
3610
- "id": {
3611
- "name": "id",
3612
- "type": "text",
3613
- "primaryKey": true,
3614
- "notNull": true
3615
- },
3616
- "organization_id": {
3617
- "name": "organization_id",
3618
- "type": "text",
3619
- "primaryKey": false,
3620
- "notNull": true
3621
- },
3622
- "name": {
3623
- "name": "name",
3624
- "type": "text",
3625
- "primaryKey": false,
3626
- "notNull": true
3627
- },
3628
- "description": {
3629
- "name": "description",
3630
- "type": "text",
3631
- "primaryKey": false,
3632
- "notNull": false
3633
- },
3634
- "subject": {
3635
- "name": "subject",
3636
- "type": "text",
3637
- "primaryKey": false,
3638
- "notNull": false
3639
- },
3640
- "content": {
3641
- "name": "content",
3642
- "type": "jsonb",
3643
- "primaryKey": false,
3644
- "notNull": true
3645
- },
3646
- "compiled_html": {
3647
- "name": "compiled_html",
3648
- "type": "text",
3649
- "primaryKey": false,
3650
- "notNull": false
3651
- },
3652
- "compiled_text": {
3653
- "name": "compiled_text",
3654
- "type": "text",
3655
- "primaryKey": false,
3656
- "notNull": false
3657
- },
3658
- "variables": {
3659
- "name": "variables",
3660
- "type": "jsonb",
3661
- "primaryKey": false,
3662
- "notNull": false,
3663
- "default": "'[]'::jsonb"
3664
- },
3665
- "test_data": {
3666
- "name": "test_data",
3667
- "type": "jsonb",
3668
- "primaryKey": false,
3669
- "notNull": false,
3670
- "default": "'{}'::jsonb"
3671
- },
3672
- "room_id": {
3673
- "name": "room_id",
3674
- "type": "text",
3675
- "primaryKey": false,
3676
- "notNull": false
3677
- },
3678
- "is_collaborative": {
3679
- "name": "is_collaborative",
3680
- "type": "boolean",
3681
- "primaryKey": false,
3682
- "notNull": true,
3683
- "default": false
3684
- },
3685
- "ai_generated": {
3686
- "name": "ai_generated",
3687
- "type": "boolean",
3688
- "primaryKey": false,
3689
- "notNull": true,
3690
- "default": false
3691
- },
3692
- "ai_conversation_id": {
3693
- "name": "ai_conversation_id",
3694
- "type": "text",
3695
- "primaryKey": false,
3696
- "notNull": false
3697
- },
3698
- "ses_template_name": {
3699
- "name": "ses_template_name",
3700
- "type": "text",
3701
- "primaryKey": false,
3702
- "notNull": false
3703
- },
3704
- "published_at": {
3705
- "name": "published_at",
3706
- "type": "timestamp",
3707
- "primaryKey": false,
3708
- "notNull": false
3709
- },
3710
- "status": {
3711
- "name": "status",
3712
- "type": "template_status",
3713
- "typeSchema": "public",
3714
- "primaryKey": false,
3715
- "notNull": true,
3716
- "default": "'DRAFT'"
3717
- },
3718
- "created_at": {
3719
- "name": "created_at",
3720
- "type": "timestamp",
3721
- "primaryKey": false,
3722
- "notNull": true,
3723
- "default": "now()"
3724
- },
3725
- "updated_at": {
3726
- "name": "updated_at",
3727
- "type": "timestamp",
3728
- "primaryKey": false,
3729
- "notNull": true,
3730
- "default": "now()"
3731
- },
3732
- "created_by": {
3733
- "name": "created_by",
3734
- "type": "text",
3735
- "primaryKey": false,
3736
- "notNull": true
3737
- },
3738
- "last_edited_by": {
3739
- "name": "last_edited_by",
3740
- "type": "text",
3741
- "primaryKey": false,
3742
- "notNull": false
3743
- }
3744
- },
3745
- "indexes": {
3746
- "template_org_idx": {
3747
- "name": "template_org_idx",
3748
- "columns": [
3749
- {
3750
- "expression": "organization_id",
3751
- "isExpression": false,
3752
- "asc": true,
3753
- "nulls": "last"
3754
- }
3755
- ],
3756
- "isUnique": false,
3757
- "concurrently": false,
3758
- "method": "btree",
3759
- "with": {}
3760
- },
3761
- "template_status_updated_at_idx": {
3762
- "name": "template_status_updated_at_idx",
3763
- "columns": [
3764
- {
3765
- "expression": "status",
3766
- "isExpression": false,
3767
- "asc": true,
3768
- "nulls": "last"
3769
- },
3770
- {
3771
- "expression": "updated_at",
3772
- "isExpression": false,
3773
- "asc": true,
3774
- "nulls": "last"
3775
- }
3776
- ],
3777
- "isUnique": false,
3778
- "concurrently": false,
3779
- "method": "btree",
3780
- "with": {}
3781
- },
3782
- "template_created_by_idx": {
3783
- "name": "template_created_by_idx",
3784
- "columns": [
3785
- {
3786
- "expression": "created_by",
3787
- "isExpression": false,
3788
- "asc": true,
3789
- "nulls": "last"
3790
- }
3791
- ],
3792
- "isUnique": false,
3793
- "concurrently": false,
3794
- "method": "btree",
3795
- "with": {}
3796
- },
3797
- "template_room_id_idx": {
3798
- "name": "template_room_id_idx",
3799
- "columns": [
3800
- {
3801
- "expression": "room_id",
3802
- "isExpression": false,
3803
- "asc": true,
3804
- "nulls": "last"
3805
- }
3806
- ],
3807
- "isUnique": true,
3808
- "concurrently": false,
3809
- "method": "btree",
3810
- "with": {}
3811
- }
3812
- },
3813
- "foreignKeys": {
3814
- "template_organization_id_organization_id_fk": {
3815
- "name": "template_organization_id_organization_id_fk",
3816
- "tableFrom": "template",
3817
- "tableTo": "organization",
3818
- "columnsFrom": ["organization_id"],
3819
- "columnsTo": ["id"],
3820
- "onDelete": "cascade",
3821
- "onUpdate": "no action"
3822
- },
3823
- "template_created_by_user_id_fk": {
3824
- "name": "template_created_by_user_id_fk",
3825
- "tableFrom": "template",
3826
- "tableTo": "user",
3827
- "columnsFrom": ["created_by"],
3828
- "columnsTo": ["id"],
3829
- "onDelete": "set null",
3830
- "onUpdate": "no action"
3831
- },
3832
- "template_last_edited_by_user_id_fk": {
3833
- "name": "template_last_edited_by_user_id_fk",
3834
- "tableFrom": "template",
3835
- "tableTo": "user",
3836
- "columnsFrom": ["last_edited_by"],
3837
- "columnsTo": ["id"],
3838
- "onDelete": "set null",
3839
- "onUpdate": "no action"
3840
- }
3841
- },
3842
- "compositePrimaryKeys": {},
3843
- "uniqueConstraints": {},
3844
- "policies": {},
3845
- "checkConstraints": {},
3846
- "isRLSEnabled": false
3847
- },
3848
- "public.template_variable": {
3849
- "name": "template_variable",
3850
- "schema": "",
3851
- "columns": {
3852
- "id": {
3853
- "name": "id",
3854
- "type": "text",
3855
- "primaryKey": true,
3856
- "notNull": true
3857
- },
3858
- "organization_id": {
3859
- "name": "organization_id",
3860
- "type": "text",
3861
- "primaryKey": false,
3862
- "notNull": true
3863
- },
3864
- "name": {
3865
- "name": "name",
3866
- "type": "text",
3867
- "primaryKey": false,
3868
- "notNull": true
3869
- },
3870
- "label": {
3871
- "name": "label",
3872
- "type": "text",
3873
- "primaryKey": false,
3874
- "notNull": true
3875
- },
3876
- "type": {
3877
- "name": "type",
3878
- "type": "variable_type",
3879
- "typeSchema": "public",
3880
- "primaryKey": false,
3881
- "notNull": true
3882
- },
3883
- "required": {
3884
- "name": "required",
3885
- "type": "boolean",
3886
- "primaryKey": false,
3887
- "notNull": true,
3888
- "default": false
3889
- },
3890
- "fallback": {
3891
- "name": "fallback",
3892
- "type": "text",
3893
- "primaryKey": false,
3894
- "notNull": false
3895
- },
3896
- "validation": {
3897
- "name": "validation",
3898
- "type": "jsonb",
3899
- "primaryKey": false,
3900
- "notNull": false
3901
- },
3902
- "created_at": {
3903
- "name": "created_at",
3904
- "type": "timestamp",
3905
- "primaryKey": false,
3906
- "notNull": true,
3907
- "default": "now()"
3908
- },
3909
- "updated_at": {
3910
- "name": "updated_at",
3911
- "type": "timestamp",
3912
- "primaryKey": false,
3913
- "notNull": true,
3914
- "default": "now()"
3915
- }
3916
- },
3917
- "indexes": {
3918
- "template_variable_org_name_idx": {
3919
- "name": "template_variable_org_name_idx",
3920
- "columns": [
3921
- {
3922
- "expression": "organization_id",
3923
- "isExpression": false,
3924
- "asc": true,
3925
- "nulls": "last"
3926
- },
3927
- {
3928
- "expression": "name",
3929
- "isExpression": false,
3930
- "asc": true,
3931
- "nulls": "last"
3932
- }
3933
- ],
3934
- "isUnique": true,
3935
- "concurrently": false,
3936
- "method": "btree",
3937
- "with": {}
3938
- }
3939
- },
3940
- "foreignKeys": {
3941
- "template_variable_organization_id_organization_id_fk": {
3942
- "name": "template_variable_organization_id_organization_id_fk",
3943
- "tableFrom": "template_variable",
3944
- "tableTo": "organization",
3945
- "columnsFrom": ["organization_id"],
3946
- "columnsTo": ["id"],
3947
- "onDelete": "cascade",
3948
- "onUpdate": "no action"
3949
- }
3950
- },
3951
- "compositePrimaryKeys": {},
3952
- "uniqueConstraints": {},
3953
- "policies": {},
3954
- "checkConstraints": {},
3955
- "isRLSEnabled": false
3956
- },
3957
- "public.template_version": {
3958
- "name": "template_version",
3959
- "schema": "",
3960
- "columns": {
3961
- "id": {
3962
- "name": "id",
3963
- "type": "text",
3964
- "primaryKey": true,
3965
- "notNull": true
3966
- },
3967
- "template_id": {
3968
- "name": "template_id",
3969
- "type": "text",
3970
- "primaryKey": false,
3971
- "notNull": true
3972
- },
3973
- "content": {
3974
- "name": "content",
3975
- "type": "jsonb",
3976
- "primaryKey": false,
3977
- "notNull": true
3978
- },
3979
- "version": {
3980
- "name": "version",
3981
- "type": "integer",
3982
- "primaryKey": false,
3983
- "notNull": true
3984
- },
3985
- "created_at": {
3986
- "name": "created_at",
3987
- "type": "timestamp",
3988
- "primaryKey": false,
3989
- "notNull": true,
3990
- "default": "now()"
3991
- },
3992
- "created_by": {
3993
- "name": "created_by",
3994
- "type": "text",
3995
- "primaryKey": false,
3996
- "notNull": true
3997
- },
3998
- "change_note": {
3999
- "name": "change_note",
4000
- "type": "text",
4001
- "primaryKey": false,
4002
- "notNull": false
4003
- }
4004
- },
4005
- "indexes": {
4006
- "template_version_template_version_idx": {
4007
- "name": "template_version_template_version_idx",
4008
- "columns": [
4009
- {
4010
- "expression": "template_id",
4011
- "isExpression": false,
4012
- "asc": true,
4013
- "nulls": "last"
4014
- },
4015
- {
4016
- "expression": "version",
4017
- "isExpression": false,
4018
- "asc": true,
4019
- "nulls": "last"
4020
- }
4021
- ],
4022
- "isUnique": true,
4023
- "concurrently": false,
4024
- "method": "btree",
4025
- "with": {}
4026
- },
4027
- "template_version_template_created_at_idx": {
4028
- "name": "template_version_template_created_at_idx",
4029
- "columns": [
4030
- {
4031
- "expression": "template_id",
4032
- "isExpression": false,
4033
- "asc": true,
4034
- "nulls": "last"
4035
- },
4036
- {
4037
- "expression": "created_at",
4038
- "isExpression": false,
4039
- "asc": true,
4040
- "nulls": "last"
4041
- }
4042
- ],
4043
- "isUnique": false,
4044
- "concurrently": false,
4045
- "method": "btree",
4046
- "with": {}
4047
- }
4048
- },
4049
- "foreignKeys": {
4050
- "template_version_template_id_template_id_fk": {
4051
- "name": "template_version_template_id_template_id_fk",
4052
- "tableFrom": "template_version",
4053
- "tableTo": "template",
4054
- "columnsFrom": ["template_id"],
4055
- "columnsTo": ["id"],
4056
- "onDelete": "cascade",
4057
- "onUpdate": "no action"
4058
- },
4059
- "template_version_created_by_user_id_fk": {
4060
- "name": "template_version_created_by_user_id_fk",
4061
- "tableFrom": "template_version",
4062
- "tableTo": "user",
4063
- "columnsFrom": ["created_by"],
4064
- "columnsTo": ["id"],
4065
- "onDelete": "set null",
4066
- "onUpdate": "no action"
4067
- }
4068
- },
4069
- "compositePrimaryKeys": {},
4070
- "uniqueConstraints": {},
4071
- "policies": {},
4072
- "checkConstraints": {},
4073
- "isRLSEnabled": false
4074
- },
4075
- "public.ai_usage_log": {
4076
- "name": "ai_usage_log",
4077
- "schema": "",
4078
- "columns": {
4079
- "id": {
4080
- "name": "id",
4081
- "type": "text",
4082
- "primaryKey": true,
4083
- "notNull": true
4084
- },
4085
- "organization_id": {
4086
- "name": "organization_id",
4087
- "type": "text",
4088
- "primaryKey": false,
4089
- "notNull": true
4090
- },
4091
- "user_id": {
4092
- "name": "user_id",
4093
- "type": "text",
4094
- "primaryKey": false,
4095
- "notNull": false
4096
- },
4097
- "period_key": {
4098
- "name": "period_key",
4099
- "type": "text",
4100
- "primaryKey": false,
4101
- "notNull": true
4102
- },
4103
- "feature_type": {
4104
- "name": "feature_type",
4105
- "type": "text",
4106
- "primaryKey": false,
4107
- "notNull": true,
4108
- "default": "'ai_chat'"
4109
- },
4110
- "template_id": {
4111
- "name": "template_id",
4112
- "type": "text",
4113
- "primaryKey": false,
4114
- "notNull": false
4115
- },
4116
- "input_tokens": {
4117
- "name": "input_tokens",
4118
- "type": "integer",
4119
- "primaryKey": false,
4120
- "notNull": false
4121
- },
4122
- "output_tokens": {
4123
- "name": "output_tokens",
4124
- "type": "integer",
4125
- "primaryKey": false,
4126
- "notNull": false
4127
- },
4128
- "total_tokens": {
4129
- "name": "total_tokens",
4130
- "type": "integer",
4131
- "primaryKey": false,
4132
- "notNull": false
4133
- },
4134
- "model": {
4135
- "name": "model",
4136
- "type": "text",
4137
- "primaryKey": false,
4138
- "notNull": false
4139
- },
4140
- "duration_ms": {
4141
- "name": "duration_ms",
4142
- "type": "integer",
4143
- "primaryKey": false,
4144
- "notNull": false
4145
- },
4146
- "created_at": {
4147
- "name": "created_at",
4148
- "type": "timestamp",
4149
- "primaryKey": false,
4150
- "notNull": true,
4151
- "default": "now()"
4152
- }
4153
- },
4154
- "indexes": {
4155
- "ai_usage_log_org_idx": {
4156
- "name": "ai_usage_log_org_idx",
4157
- "columns": [
4158
- {
4159
- "expression": "organization_id",
4160
- "isExpression": false,
4161
- "asc": true,
4162
- "nulls": "last"
4163
- }
4164
- ],
4165
- "isUnique": false,
4166
- "concurrently": false,
4167
- "method": "btree",
4168
- "with": {}
4169
- },
4170
- "ai_usage_log_period_idx": {
4171
- "name": "ai_usage_log_period_idx",
4172
- "columns": [
4173
- {
4174
- "expression": "period_key",
4175
- "isExpression": false,
4176
- "asc": true,
4177
- "nulls": "last"
4178
- }
4179
- ],
4180
- "isUnique": false,
4181
- "concurrently": false,
4182
- "method": "btree",
4183
- "with": {}
4184
- },
4185
- "ai_usage_log_org_period_idx": {
4186
- "name": "ai_usage_log_org_period_idx",
4187
- "columns": [
4188
- {
4189
- "expression": "organization_id",
4190
- "isExpression": false,
4191
- "asc": true,
4192
- "nulls": "last"
4193
- },
4194
- {
4195
- "expression": "period_key",
4196
- "isExpression": false,
4197
- "asc": true,
4198
- "nulls": "last"
4199
- }
4200
- ],
4201
- "isUnique": false,
4202
- "concurrently": false,
4203
- "method": "btree",
4204
- "with": {}
4205
- },
4206
- "ai_usage_log_user_idx": {
4207
- "name": "ai_usage_log_user_idx",
4208
- "columns": [
4209
- {
4210
- "expression": "user_id",
4211
- "isExpression": false,
4212
- "asc": true,
4213
- "nulls": "last"
4214
- }
4215
- ],
4216
- "isUnique": false,
4217
- "concurrently": false,
4218
- "method": "btree",
4219
- "with": {}
4220
- },
4221
- "ai_usage_log_created_idx": {
4222
- "name": "ai_usage_log_created_idx",
4223
- "columns": [
4224
- {
4225
- "expression": "created_at",
4226
- "isExpression": false,
4227
- "asc": true,
4228
- "nulls": "last"
4229
- }
4230
- ],
4231
- "isUnique": false,
4232
- "concurrently": false,
4233
- "method": "btree",
4234
- "with": {}
4235
- }
4236
- },
4237
- "foreignKeys": {
4238
- "ai_usage_log_organization_id_organization_id_fk": {
4239
- "name": "ai_usage_log_organization_id_organization_id_fk",
4240
- "tableFrom": "ai_usage_log",
4241
- "tableTo": "organization",
4242
- "columnsFrom": ["organization_id"],
4243
- "columnsTo": ["id"],
4244
- "onDelete": "cascade",
4245
- "onUpdate": "no action"
4246
- },
4247
- "ai_usage_log_user_id_user_id_fk": {
4248
- "name": "ai_usage_log_user_id_user_id_fk",
4249
- "tableFrom": "ai_usage_log",
4250
- "tableTo": "user",
4251
- "columnsFrom": ["user_id"],
4252
- "columnsTo": ["id"],
4253
- "onDelete": "set null",
4254
- "onUpdate": "no action"
4255
- }
4256
- },
4257
- "compositePrimaryKeys": {},
4258
- "uniqueConstraints": {},
4259
- "policies": {},
4260
- "checkConstraints": {},
4261
- "isRLSEnabled": false
4262
- },
4263
- "public.ai_usage_monthly": {
4264
- "name": "ai_usage_monthly",
4265
- "schema": "",
4266
- "columns": {
4267
- "id": {
4268
- "name": "id",
4269
- "type": "text",
4270
- "primaryKey": true,
4271
- "notNull": true
4272
- },
4273
- "organization_id": {
4274
- "name": "organization_id",
4275
- "type": "text",
4276
- "primaryKey": false,
4277
- "notNull": true
4278
- },
4279
- "period_key": {
4280
- "name": "period_key",
4281
- "type": "text",
4282
- "primaryKey": false,
4283
- "notNull": true
4284
- },
4285
- "message_count": {
4286
- "name": "message_count",
4287
- "type": "integer",
4288
- "primaryKey": false,
4289
- "notNull": true,
4290
- "default": 0
4291
- },
4292
- "updated_at": {
4293
- "name": "updated_at",
4294
- "type": "timestamp",
4295
- "primaryKey": false,
4296
- "notNull": true,
4297
- "default": "now()"
4298
- }
4299
- },
4300
- "indexes": {
4301
- "ai_usage_monthly_org_period_idx": {
4302
- "name": "ai_usage_monthly_org_period_idx",
4303
- "columns": [
4304
- {
4305
- "expression": "organization_id",
4306
- "isExpression": false,
4307
- "asc": true,
4308
- "nulls": "last"
4309
- },
4310
- {
4311
- "expression": "period_key",
4312
- "isExpression": false,
4313
- "asc": true,
4314
- "nulls": "last"
4315
- }
4316
- ],
4317
- "isUnique": true,
4318
- "concurrently": false,
4319
- "method": "btree",
4320
- "with": {}
4321
- },
4322
- "ai_usage_monthly_period_idx": {
4323
- "name": "ai_usage_monthly_period_idx",
4324
- "columns": [
4325
- {
4326
- "expression": "period_key",
4327
- "isExpression": false,
4328
- "asc": true,
4329
- "nulls": "last"
4330
- }
4331
- ],
4332
- "isUnique": false,
4333
- "concurrently": false,
4334
- "method": "btree",
4335
- "with": {}
4336
- }
4337
- },
4338
- "foreignKeys": {
4339
- "ai_usage_monthly_organization_id_organization_id_fk": {
4340
- "name": "ai_usage_monthly_organization_id_organization_id_fk",
4341
- "tableFrom": "ai_usage_monthly",
4342
- "tableTo": "organization",
4343
- "columnsFrom": ["organization_id"],
4344
- "columnsTo": ["id"],
4345
- "onDelete": "cascade",
4346
- "onUpdate": "no action"
4347
- }
4348
- },
4349
- "compositePrimaryKeys": {},
4350
- "uniqueConstraints": {},
4351
- "policies": {},
4352
- "checkConstraints": {},
4353
- "isRLSEnabled": false
4354
- },
4355
- "public.api_rate_limit_window": {
4356
- "name": "api_rate_limit_window",
4357
- "schema": "",
4358
- "columns": {
4359
- "id": {
4360
- "name": "id",
4361
- "type": "text",
4362
- "primaryKey": true,
4363
- "notNull": true
4364
- },
4365
- "organization_id": {
4366
- "name": "organization_id",
4367
- "type": "text",
4368
- "primaryKey": false,
4369
- "notNull": true
4370
- },
4371
- "minute_key": {
4372
- "name": "minute_key",
4373
- "type": "text",
4374
- "primaryKey": false,
4375
- "notNull": true
4376
- },
4377
- "request_count": {
4378
- "name": "request_count",
4379
- "type": "integer",
4380
- "primaryKey": false,
4381
- "notNull": true,
4382
- "default": 0
4383
- },
4384
- "expires_at": {
4385
- "name": "expires_at",
4386
- "type": "timestamp",
4387
- "primaryKey": false,
4388
- "notNull": true
4389
- }
4390
- },
4391
- "indexes": {
4392
- "api_rate_limit_org_minute_idx": {
4393
- "name": "api_rate_limit_org_minute_idx",
4394
- "columns": [
4395
- {
4396
- "expression": "organization_id",
4397
- "isExpression": false,
4398
- "asc": true,
4399
- "nulls": "last"
4400
- },
4401
- {
4402
- "expression": "minute_key",
4403
- "isExpression": false,
4404
- "asc": true,
4405
- "nulls": "last"
4406
- }
4407
- ],
4408
- "isUnique": true,
4409
- "concurrently": false,
4410
- "method": "btree",
4411
- "with": {}
4412
- },
4413
- "api_rate_limit_expires_idx": {
4414
- "name": "api_rate_limit_expires_idx",
4415
- "columns": [
4416
- {
4417
- "expression": "expires_at",
4418
- "isExpression": false,
4419
- "asc": true,
4420
- "nulls": "last"
4421
- }
4422
- ],
4423
- "isUnique": false,
4424
- "concurrently": false,
4425
- "method": "btree",
4426
- "with": {}
4427
- }
4428
- },
4429
- "foreignKeys": {
4430
- "api_rate_limit_window_organization_id_organization_id_fk": {
4431
- "name": "api_rate_limit_window_organization_id_organization_id_fk",
4432
- "tableFrom": "api_rate_limit_window",
4433
- "tableTo": "organization",
4434
- "columnsFrom": ["organization_id"],
4435
- "columnsTo": ["id"],
4436
- "onDelete": "cascade",
4437
- "onUpdate": "no action"
4438
- }
4439
- },
4440
- "compositePrimaryKeys": {},
4441
- "uniqueConstraints": {},
4442
- "policies": {},
4443
- "checkConstraints": {},
4444
- "isRLSEnabled": false
4445
- },
4446
- "public.api_usage_daily": {
4447
- "name": "api_usage_daily",
4448
- "schema": "",
4449
- "columns": {
4450
- "id": {
4451
- "name": "id",
4452
- "type": "text",
4453
- "primaryKey": true,
4454
- "notNull": true
4455
- },
4456
- "organization_id": {
4457
- "name": "organization_id",
4458
- "type": "text",
4459
- "primaryKey": false,
4460
- "notNull": true
4461
- },
4462
- "date_key": {
4463
- "name": "date_key",
4464
- "type": "text",
4465
- "primaryKey": false,
4466
- "notNull": true
4467
- },
4468
- "request_count": {
4469
- "name": "request_count",
4470
- "type": "integer",
4471
- "primaryKey": false,
4472
- "notNull": true,
4473
- "default": 0
4474
- },
4475
- "updated_at": {
4476
- "name": "updated_at",
4477
- "type": "timestamp",
4478
- "primaryKey": false,
4479
- "notNull": true,
4480
- "default": "now()"
4481
- }
4482
- },
4483
- "indexes": {
4484
- "api_usage_daily_org_date_idx": {
4485
- "name": "api_usage_daily_org_date_idx",
4486
- "columns": [
4487
- {
4488
- "expression": "organization_id",
4489
- "isExpression": false,
4490
- "asc": true,
4491
- "nulls": "last"
4492
- },
4493
- {
4494
- "expression": "date_key",
4495
- "isExpression": false,
4496
- "asc": true,
4497
- "nulls": "last"
4498
- }
4499
- ],
4500
- "isUnique": true,
4501
- "concurrently": false,
4502
- "method": "btree",
4503
- "with": {}
4504
- },
4505
- "api_usage_daily_date_idx": {
4506
- "name": "api_usage_daily_date_idx",
4507
- "columns": [
4508
- {
4509
- "expression": "date_key",
4510
- "isExpression": false,
4511
- "asc": true,
4512
- "nulls": "last"
4513
- }
4514
- ],
4515
- "isUnique": false,
4516
- "concurrently": false,
4517
- "method": "btree",
4518
- "with": {}
4519
- }
4520
- },
4521
- "foreignKeys": {
4522
- "api_usage_daily_organization_id_organization_id_fk": {
4523
- "name": "api_usage_daily_organization_id_organization_id_fk",
4524
- "tableFrom": "api_usage_daily",
4525
- "tableTo": "organization",
4526
- "columnsFrom": ["organization_id"],
4527
- "columnsTo": ["id"],
4528
- "onDelete": "cascade",
4529
- "onUpdate": "no action"
4530
- }
4531
- },
4532
- "compositePrimaryKeys": {},
4533
- "uniqueConstraints": {},
4534
- "policies": {},
4535
- "checkConstraints": {},
4536
- "isRLSEnabled": false
4537
- },
4538
- "public.waitlist": {
4539
- "name": "waitlist",
4540
- "schema": "",
4541
- "columns": {
4542
- "id": {
4543
- "name": "id",
4544
- "type": "text",
4545
- "primaryKey": true,
4546
- "notNull": true
4547
- },
4548
- "email": {
4549
- "name": "email",
4550
- "type": "text",
4551
- "primaryKey": false,
4552
- "notNull": true
4553
- },
4554
- "email_hash": {
4555
- "name": "email_hash",
4556
- "type": "text",
4557
- "primaryKey": false,
4558
- "notNull": true
4559
- },
4560
- "product": {
4561
- "name": "product",
4562
- "type": "text",
4563
- "primaryKey": false,
4564
- "notNull": true
4565
- },
4566
- "source": {
4567
- "name": "source",
4568
- "type": "text",
4569
- "primaryKey": false,
4570
- "notNull": false
4571
- },
4572
- "referrer": {
4573
- "name": "referrer",
4574
- "type": "text",
4575
- "primaryKey": false,
4576
- "notNull": false
4577
- },
4578
- "created_at": {
4579
- "name": "created_at",
4580
- "type": "timestamp",
4581
- "primaryKey": false,
4582
- "notNull": true,
4583
- "default": "now()"
4584
- }
4585
- },
4586
- "indexes": {
4587
- "waitlist_email_product_idx": {
4588
- "name": "waitlist_email_product_idx",
4589
- "columns": [
4590
- {
4591
- "expression": "email_hash",
4592
- "isExpression": false,
4593
- "asc": true,
4594
- "nulls": "last"
4595
- },
4596
- {
4597
- "expression": "product",
4598
- "isExpression": false,
4599
- "asc": true,
4600
- "nulls": "last"
4601
- }
4602
- ],
4603
- "isUnique": true,
4604
- "concurrently": false,
4605
- "method": "btree",
4606
- "with": {}
4607
- },
4608
- "waitlist_product_idx": {
4609
- "name": "waitlist_product_idx",
4610
- "columns": [
4611
- {
4612
- "expression": "product",
4613
- "isExpression": false,
4614
- "asc": true,
4615
- "nulls": "last"
4616
- }
4617
- ],
4618
- "isUnique": false,
4619
- "concurrently": false,
4620
- "method": "btree",
4621
- "with": {}
4622
- },
4623
- "waitlist_created_at_idx": {
4624
- "name": "waitlist_created_at_idx",
4625
- "columns": [
4626
- {
4627
- "expression": "created_at",
4628
- "isExpression": false,
4629
- "asc": true,
4630
- "nulls": "last"
4631
- }
4632
- ],
4633
- "isUnique": false,
4634
- "concurrently": false,
4635
- "method": "btree",
4636
- "with": {}
4637
- }
4638
- },
4639
- "foreignKeys": {},
4640
- "compositePrimaryKeys": {},
4641
- "uniqueConstraints": {},
4642
- "policies": {},
4643
- "checkConstraints": {},
4644
- "isRLSEnabled": false
4645
- }
4646
- },
4647
- "enums": {
4648
- "public.batch_send_status": {
4649
- "name": "batch_send_status",
4650
- "schema": "public",
4651
- "values": [
4652
- "draft",
4653
- "scheduled",
4654
- "queued",
4655
- "processing",
4656
- "completed",
4657
- "failed",
4658
- "cancelled"
4659
- ]
4660
- },
4661
- "public.message_send_status": {
4662
- "name": "message_send_status",
4663
- "schema": "public",
4664
- "values": [
4665
- "pending",
4666
- "queued",
4667
- "sent",
4668
- "delivered",
4669
- "opened",
4670
- "clicked",
4671
- "bounced",
4672
- "complained",
4673
- "failed",
4674
- "opted_out"
4675
- ]
4676
- },
4677
- "public.message_source_type": {
4678
- "name": "message_source_type",
4679
- "schema": "public",
4680
- "values": ["transactional", "batch", "campaign", "workflow"]
4681
- },
4682
- "public.template_status": {
4683
- "name": "template_status",
4684
- "schema": "public",
4685
- "values": ["DRAFT", "PUBLISHED", "ARCHIVED"]
4686
- },
4687
- "public.variable_type": {
4688
- "name": "variable_type",
4689
- "schema": "public",
4690
- "values": ["TEXT", "NUMBER", "BOOLEAN", "DATE", "URL", "EMAIL"]
4691
- }
4692
- },
4693
- "schemas": {},
4694
- "sequences": {},
4695
- "roles": {},
4696
- "policies": {},
4697
- "views": {},
4698
- "_meta": {
4699
- "columns": {},
4700
- "schemas": {},
4701
- "tables": {}
4702
- }
4703
- }