@hogsend/db 0.6.0 → 0.7.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.
@@ -0,0 +1,3262 @@
1
+ {
2
+ "id": "a470381a-b8a4-4a76-928e-ba47fa7dc183",
3
+ "prevId": "1f52ccb7-610e-4eb6-89bb-a873fafa5528",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.alert_history": {
8
+ "name": "alert_history",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "uuid",
14
+ "primaryKey": true,
15
+ "notNull": true,
16
+ "default": "gen_random_uuid()"
17
+ },
18
+ "alert_rule_id": {
19
+ "name": "alert_rule_id",
20
+ "type": "uuid",
21
+ "primaryKey": false,
22
+ "notNull": true
23
+ },
24
+ "payload": {
25
+ "name": "payload",
26
+ "type": "jsonb",
27
+ "primaryKey": false,
28
+ "notNull": false
29
+ },
30
+ "delivery_status": {
31
+ "name": "delivery_status",
32
+ "type": "text",
33
+ "primaryKey": false,
34
+ "notNull": true
35
+ },
36
+ "error": {
37
+ "name": "error",
38
+ "type": "text",
39
+ "primaryKey": false,
40
+ "notNull": false
41
+ },
42
+ "created_at": {
43
+ "name": "created_at",
44
+ "type": "timestamp with time zone",
45
+ "primaryKey": false,
46
+ "notNull": true,
47
+ "default": "now()"
48
+ },
49
+ "updated_at": {
50
+ "name": "updated_at",
51
+ "type": "timestamp with time zone",
52
+ "primaryKey": false,
53
+ "notNull": true,
54
+ "default": "now()"
55
+ }
56
+ },
57
+ "indexes": {
58
+ "alert_history_rule_id_idx": {
59
+ "name": "alert_history_rule_id_idx",
60
+ "columns": [
61
+ {
62
+ "expression": "alert_rule_id",
63
+ "isExpression": false,
64
+ "asc": true,
65
+ "nulls": "last"
66
+ }
67
+ ],
68
+ "isUnique": false,
69
+ "concurrently": false,
70
+ "method": "btree",
71
+ "with": {}
72
+ },
73
+ "alert_history_created_at_idx": {
74
+ "name": "alert_history_created_at_idx",
75
+ "columns": [
76
+ {
77
+ "expression": "created_at",
78
+ "isExpression": false,
79
+ "asc": true,
80
+ "nulls": "last"
81
+ }
82
+ ],
83
+ "isUnique": false,
84
+ "concurrently": false,
85
+ "method": "btree",
86
+ "with": {}
87
+ }
88
+ },
89
+ "foreignKeys": {
90
+ "alert_history_alert_rule_id_alert_rules_id_fk": {
91
+ "name": "alert_history_alert_rule_id_alert_rules_id_fk",
92
+ "tableFrom": "alert_history",
93
+ "tableTo": "alert_rules",
94
+ "columnsFrom": [
95
+ "alert_rule_id"
96
+ ],
97
+ "columnsTo": [
98
+ "id"
99
+ ],
100
+ "onDelete": "no action",
101
+ "onUpdate": "no action"
102
+ }
103
+ },
104
+ "compositePrimaryKeys": {},
105
+ "uniqueConstraints": {},
106
+ "policies": {},
107
+ "checkConstraints": {},
108
+ "isRLSEnabled": false
109
+ },
110
+ "public.alert_rules": {
111
+ "name": "alert_rules",
112
+ "schema": "",
113
+ "columns": {
114
+ "id": {
115
+ "name": "id",
116
+ "type": "uuid",
117
+ "primaryKey": true,
118
+ "notNull": true,
119
+ "default": "gen_random_uuid()"
120
+ },
121
+ "name": {
122
+ "name": "name",
123
+ "type": "text",
124
+ "primaryKey": false,
125
+ "notNull": true
126
+ },
127
+ "type": {
128
+ "name": "type",
129
+ "type": "alert_rule_type",
130
+ "typeSchema": "public",
131
+ "primaryKey": false,
132
+ "notNull": true
133
+ },
134
+ "threshold": {
135
+ "name": "threshold",
136
+ "type": "jsonb",
137
+ "primaryKey": false,
138
+ "notNull": true
139
+ },
140
+ "channel": {
141
+ "name": "channel",
142
+ "type": "alert_channel",
143
+ "typeSchema": "public",
144
+ "primaryKey": false,
145
+ "notNull": true
146
+ },
147
+ "channel_config": {
148
+ "name": "channel_config",
149
+ "type": "jsonb",
150
+ "primaryKey": false,
151
+ "notNull": true
152
+ },
153
+ "enabled": {
154
+ "name": "enabled",
155
+ "type": "boolean",
156
+ "primaryKey": false,
157
+ "notNull": true,
158
+ "default": true
159
+ },
160
+ "cooldown_minutes": {
161
+ "name": "cooldown_minutes",
162
+ "type": "integer",
163
+ "primaryKey": false,
164
+ "notNull": true,
165
+ "default": 60
166
+ },
167
+ "last_fired_at": {
168
+ "name": "last_fired_at",
169
+ "type": "timestamp with time zone",
170
+ "primaryKey": false,
171
+ "notNull": false
172
+ },
173
+ "created_at": {
174
+ "name": "created_at",
175
+ "type": "timestamp with time zone",
176
+ "primaryKey": false,
177
+ "notNull": true,
178
+ "default": "now()"
179
+ },
180
+ "updated_at": {
181
+ "name": "updated_at",
182
+ "type": "timestamp with time zone",
183
+ "primaryKey": false,
184
+ "notNull": true,
185
+ "default": "now()"
186
+ }
187
+ },
188
+ "indexes": {
189
+ "alert_rules_type_idx": {
190
+ "name": "alert_rules_type_idx",
191
+ "columns": [
192
+ {
193
+ "expression": "type",
194
+ "isExpression": false,
195
+ "asc": true,
196
+ "nulls": "last"
197
+ }
198
+ ],
199
+ "isUnique": false,
200
+ "concurrently": false,
201
+ "method": "btree",
202
+ "with": {}
203
+ },
204
+ "alert_rules_enabled_idx": {
205
+ "name": "alert_rules_enabled_idx",
206
+ "columns": [
207
+ {
208
+ "expression": "enabled",
209
+ "isExpression": false,
210
+ "asc": true,
211
+ "nulls": "last"
212
+ }
213
+ ],
214
+ "isUnique": false,
215
+ "concurrently": false,
216
+ "method": "btree",
217
+ "with": {}
218
+ }
219
+ },
220
+ "foreignKeys": {},
221
+ "compositePrimaryKeys": {},
222
+ "uniqueConstraints": {},
223
+ "policies": {},
224
+ "checkConstraints": {},
225
+ "isRLSEnabled": false
226
+ },
227
+ "public.api_keys": {
228
+ "name": "api_keys",
229
+ "schema": "",
230
+ "columns": {
231
+ "id": {
232
+ "name": "id",
233
+ "type": "uuid",
234
+ "primaryKey": true,
235
+ "notNull": true,
236
+ "default": "gen_random_uuid()"
237
+ },
238
+ "organization_id": {
239
+ "name": "organization_id",
240
+ "type": "text",
241
+ "primaryKey": false,
242
+ "notNull": false
243
+ },
244
+ "name": {
245
+ "name": "name",
246
+ "type": "text",
247
+ "primaryKey": false,
248
+ "notNull": true
249
+ },
250
+ "key_prefix": {
251
+ "name": "key_prefix",
252
+ "type": "text",
253
+ "primaryKey": false,
254
+ "notNull": true
255
+ },
256
+ "key_hash": {
257
+ "name": "key_hash",
258
+ "type": "text",
259
+ "primaryKey": false,
260
+ "notNull": true
261
+ },
262
+ "scopes": {
263
+ "name": "scopes",
264
+ "type": "jsonb",
265
+ "primaryKey": false,
266
+ "notNull": true,
267
+ "default": "'[\"read\"]'::jsonb"
268
+ },
269
+ "created_by": {
270
+ "name": "created_by",
271
+ "type": "text",
272
+ "primaryKey": false,
273
+ "notNull": false
274
+ },
275
+ "last_used_at": {
276
+ "name": "last_used_at",
277
+ "type": "timestamp with time zone",
278
+ "primaryKey": false,
279
+ "notNull": false
280
+ },
281
+ "revoked_at": {
282
+ "name": "revoked_at",
283
+ "type": "timestamp with time zone",
284
+ "primaryKey": false,
285
+ "notNull": false
286
+ },
287
+ "expires_at": {
288
+ "name": "expires_at",
289
+ "type": "timestamp with time zone",
290
+ "primaryKey": false,
291
+ "notNull": false
292
+ },
293
+ "created_at": {
294
+ "name": "created_at",
295
+ "type": "timestamp with time zone",
296
+ "primaryKey": false,
297
+ "notNull": true,
298
+ "default": "now()"
299
+ },
300
+ "updated_at": {
301
+ "name": "updated_at",
302
+ "type": "timestamp with time zone",
303
+ "primaryKey": false,
304
+ "notNull": true,
305
+ "default": "now()"
306
+ }
307
+ },
308
+ "indexes": {
309
+ "api_keys_key_hash_idx": {
310
+ "name": "api_keys_key_hash_idx",
311
+ "columns": [
312
+ {
313
+ "expression": "key_hash",
314
+ "isExpression": false,
315
+ "asc": true,
316
+ "nulls": "last"
317
+ }
318
+ ],
319
+ "isUnique": false,
320
+ "concurrently": false,
321
+ "method": "btree",
322
+ "with": {}
323
+ },
324
+ "api_keys_revoked_at_idx": {
325
+ "name": "api_keys_revoked_at_idx",
326
+ "columns": [
327
+ {
328
+ "expression": "revoked_at",
329
+ "isExpression": false,
330
+ "asc": true,
331
+ "nulls": "last"
332
+ }
333
+ ],
334
+ "isUnique": false,
335
+ "concurrently": false,
336
+ "method": "btree",
337
+ "with": {}
338
+ }
339
+ },
340
+ "foreignKeys": {},
341
+ "compositePrimaryKeys": {},
342
+ "uniqueConstraints": {
343
+ "api_keys_key_hash_unique": {
344
+ "name": "api_keys_key_hash_unique",
345
+ "nullsNotDistinct": false,
346
+ "columns": [
347
+ "key_hash"
348
+ ]
349
+ }
350
+ },
351
+ "policies": {},
352
+ "checkConstraints": {},
353
+ "isRLSEnabled": false
354
+ },
355
+ "public.audit_logs": {
356
+ "name": "audit_logs",
357
+ "schema": "",
358
+ "columns": {
359
+ "id": {
360
+ "name": "id",
361
+ "type": "uuid",
362
+ "primaryKey": true,
363
+ "notNull": true,
364
+ "default": "gen_random_uuid()"
365
+ },
366
+ "actor": {
367
+ "name": "actor",
368
+ "type": "text",
369
+ "primaryKey": false,
370
+ "notNull": true
371
+ },
372
+ "actor_key_id": {
373
+ "name": "actor_key_id",
374
+ "type": "uuid",
375
+ "primaryKey": false,
376
+ "notNull": false
377
+ },
378
+ "action": {
379
+ "name": "action",
380
+ "type": "text",
381
+ "primaryKey": false,
382
+ "notNull": true
383
+ },
384
+ "resource": {
385
+ "name": "resource",
386
+ "type": "text",
387
+ "primaryKey": false,
388
+ "notNull": true
389
+ },
390
+ "resource_id": {
391
+ "name": "resource_id",
392
+ "type": "text",
393
+ "primaryKey": false,
394
+ "notNull": false
395
+ },
396
+ "detail": {
397
+ "name": "detail",
398
+ "type": "jsonb",
399
+ "primaryKey": false,
400
+ "notNull": false
401
+ },
402
+ "ip_address": {
403
+ "name": "ip_address",
404
+ "type": "text",
405
+ "primaryKey": false,
406
+ "notNull": false
407
+ },
408
+ "created_at": {
409
+ "name": "created_at",
410
+ "type": "timestamp with time zone",
411
+ "primaryKey": false,
412
+ "notNull": true,
413
+ "default": "now()"
414
+ },
415
+ "updated_at": {
416
+ "name": "updated_at",
417
+ "type": "timestamp with time zone",
418
+ "primaryKey": false,
419
+ "notNull": true,
420
+ "default": "now()"
421
+ }
422
+ },
423
+ "indexes": {
424
+ "audit_logs_actor_idx": {
425
+ "name": "audit_logs_actor_idx",
426
+ "columns": [
427
+ {
428
+ "expression": "actor",
429
+ "isExpression": false,
430
+ "asc": true,
431
+ "nulls": "last"
432
+ }
433
+ ],
434
+ "isUnique": false,
435
+ "concurrently": false,
436
+ "method": "btree",
437
+ "with": {}
438
+ },
439
+ "audit_logs_resource_idx": {
440
+ "name": "audit_logs_resource_idx",
441
+ "columns": [
442
+ {
443
+ "expression": "resource",
444
+ "isExpression": false,
445
+ "asc": true,
446
+ "nulls": "last"
447
+ },
448
+ {
449
+ "expression": "resource_id",
450
+ "isExpression": false,
451
+ "asc": true,
452
+ "nulls": "last"
453
+ }
454
+ ],
455
+ "isUnique": false,
456
+ "concurrently": false,
457
+ "method": "btree",
458
+ "with": {}
459
+ },
460
+ "audit_logs_created_at_idx": {
461
+ "name": "audit_logs_created_at_idx",
462
+ "columns": [
463
+ {
464
+ "expression": "created_at",
465
+ "isExpression": false,
466
+ "asc": true,
467
+ "nulls": "last"
468
+ }
469
+ ],
470
+ "isUnique": false,
471
+ "concurrently": false,
472
+ "method": "btree",
473
+ "with": {}
474
+ }
475
+ },
476
+ "foreignKeys": {},
477
+ "compositePrimaryKeys": {},
478
+ "uniqueConstraints": {},
479
+ "policies": {},
480
+ "checkConstraints": {},
481
+ "isRLSEnabled": false
482
+ },
483
+ "public.account": {
484
+ "name": "account",
485
+ "schema": "",
486
+ "columns": {
487
+ "id": {
488
+ "name": "id",
489
+ "type": "text",
490
+ "primaryKey": true,
491
+ "notNull": true
492
+ },
493
+ "account_id": {
494
+ "name": "account_id",
495
+ "type": "text",
496
+ "primaryKey": false,
497
+ "notNull": true
498
+ },
499
+ "provider_id": {
500
+ "name": "provider_id",
501
+ "type": "text",
502
+ "primaryKey": false,
503
+ "notNull": true
504
+ },
505
+ "user_id": {
506
+ "name": "user_id",
507
+ "type": "text",
508
+ "primaryKey": false,
509
+ "notNull": true
510
+ },
511
+ "access_token": {
512
+ "name": "access_token",
513
+ "type": "text",
514
+ "primaryKey": false,
515
+ "notNull": false
516
+ },
517
+ "refresh_token": {
518
+ "name": "refresh_token",
519
+ "type": "text",
520
+ "primaryKey": false,
521
+ "notNull": false
522
+ },
523
+ "id_token": {
524
+ "name": "id_token",
525
+ "type": "text",
526
+ "primaryKey": false,
527
+ "notNull": false
528
+ },
529
+ "access_token_expires_at": {
530
+ "name": "access_token_expires_at",
531
+ "type": "timestamp with time zone",
532
+ "primaryKey": false,
533
+ "notNull": false
534
+ },
535
+ "refresh_token_expires_at": {
536
+ "name": "refresh_token_expires_at",
537
+ "type": "timestamp with time zone",
538
+ "primaryKey": false,
539
+ "notNull": false
540
+ },
541
+ "scope": {
542
+ "name": "scope",
543
+ "type": "text",
544
+ "primaryKey": false,
545
+ "notNull": false
546
+ },
547
+ "password": {
548
+ "name": "password",
549
+ "type": "text",
550
+ "primaryKey": false,
551
+ "notNull": false
552
+ },
553
+ "created_at": {
554
+ "name": "created_at",
555
+ "type": "timestamp with time zone",
556
+ "primaryKey": false,
557
+ "notNull": true,
558
+ "default": "now()"
559
+ },
560
+ "updated_at": {
561
+ "name": "updated_at",
562
+ "type": "timestamp with time zone",
563
+ "primaryKey": false,
564
+ "notNull": true,
565
+ "default": "now()"
566
+ }
567
+ },
568
+ "indexes": {},
569
+ "foreignKeys": {
570
+ "account_user_id_user_id_fk": {
571
+ "name": "account_user_id_user_id_fk",
572
+ "tableFrom": "account",
573
+ "tableTo": "user",
574
+ "columnsFrom": [
575
+ "user_id"
576
+ ],
577
+ "columnsTo": [
578
+ "id"
579
+ ],
580
+ "onDelete": "cascade",
581
+ "onUpdate": "no action"
582
+ }
583
+ },
584
+ "compositePrimaryKeys": {},
585
+ "uniqueConstraints": {},
586
+ "policies": {},
587
+ "checkConstraints": {},
588
+ "isRLSEnabled": false
589
+ },
590
+ "public.invitation": {
591
+ "name": "invitation",
592
+ "schema": "",
593
+ "columns": {
594
+ "id": {
595
+ "name": "id",
596
+ "type": "text",
597
+ "primaryKey": true,
598
+ "notNull": true
599
+ },
600
+ "organization_id": {
601
+ "name": "organization_id",
602
+ "type": "text",
603
+ "primaryKey": false,
604
+ "notNull": true
605
+ },
606
+ "email": {
607
+ "name": "email",
608
+ "type": "text",
609
+ "primaryKey": false,
610
+ "notNull": true
611
+ },
612
+ "role": {
613
+ "name": "role",
614
+ "type": "text",
615
+ "primaryKey": false,
616
+ "notNull": false
617
+ },
618
+ "status": {
619
+ "name": "status",
620
+ "type": "text",
621
+ "primaryKey": false,
622
+ "notNull": true,
623
+ "default": "'pending'"
624
+ },
625
+ "expires_at": {
626
+ "name": "expires_at",
627
+ "type": "timestamp with time zone",
628
+ "primaryKey": false,
629
+ "notNull": true
630
+ },
631
+ "inviter_id": {
632
+ "name": "inviter_id",
633
+ "type": "text",
634
+ "primaryKey": false,
635
+ "notNull": true
636
+ },
637
+ "created_at": {
638
+ "name": "created_at",
639
+ "type": "timestamp with time zone",
640
+ "primaryKey": false,
641
+ "notNull": true,
642
+ "default": "now()"
643
+ },
644
+ "updated_at": {
645
+ "name": "updated_at",
646
+ "type": "timestamp with time zone",
647
+ "primaryKey": false,
648
+ "notNull": true,
649
+ "default": "now()"
650
+ }
651
+ },
652
+ "indexes": {},
653
+ "foreignKeys": {
654
+ "invitation_organization_id_organization_id_fk": {
655
+ "name": "invitation_organization_id_organization_id_fk",
656
+ "tableFrom": "invitation",
657
+ "tableTo": "organization",
658
+ "columnsFrom": [
659
+ "organization_id"
660
+ ],
661
+ "columnsTo": [
662
+ "id"
663
+ ],
664
+ "onDelete": "cascade",
665
+ "onUpdate": "no action"
666
+ },
667
+ "invitation_inviter_id_user_id_fk": {
668
+ "name": "invitation_inviter_id_user_id_fk",
669
+ "tableFrom": "invitation",
670
+ "tableTo": "user",
671
+ "columnsFrom": [
672
+ "inviter_id"
673
+ ],
674
+ "columnsTo": [
675
+ "id"
676
+ ],
677
+ "onDelete": "cascade",
678
+ "onUpdate": "no action"
679
+ }
680
+ },
681
+ "compositePrimaryKeys": {},
682
+ "uniqueConstraints": {},
683
+ "policies": {},
684
+ "checkConstraints": {},
685
+ "isRLSEnabled": false
686
+ },
687
+ "public.member": {
688
+ "name": "member",
689
+ "schema": "",
690
+ "columns": {
691
+ "id": {
692
+ "name": "id",
693
+ "type": "text",
694
+ "primaryKey": true,
695
+ "notNull": true
696
+ },
697
+ "organization_id": {
698
+ "name": "organization_id",
699
+ "type": "text",
700
+ "primaryKey": false,
701
+ "notNull": true
702
+ },
703
+ "user_id": {
704
+ "name": "user_id",
705
+ "type": "text",
706
+ "primaryKey": false,
707
+ "notNull": true
708
+ },
709
+ "role": {
710
+ "name": "role",
711
+ "type": "text",
712
+ "primaryKey": false,
713
+ "notNull": true,
714
+ "default": "'member'"
715
+ },
716
+ "created_at": {
717
+ "name": "created_at",
718
+ "type": "timestamp with time zone",
719
+ "primaryKey": false,
720
+ "notNull": true,
721
+ "default": "now()"
722
+ },
723
+ "updated_at": {
724
+ "name": "updated_at",
725
+ "type": "timestamp with time zone",
726
+ "primaryKey": false,
727
+ "notNull": true,
728
+ "default": "now()"
729
+ }
730
+ },
731
+ "indexes": {},
732
+ "foreignKeys": {
733
+ "member_organization_id_organization_id_fk": {
734
+ "name": "member_organization_id_organization_id_fk",
735
+ "tableFrom": "member",
736
+ "tableTo": "organization",
737
+ "columnsFrom": [
738
+ "organization_id"
739
+ ],
740
+ "columnsTo": [
741
+ "id"
742
+ ],
743
+ "onDelete": "cascade",
744
+ "onUpdate": "no action"
745
+ },
746
+ "member_user_id_user_id_fk": {
747
+ "name": "member_user_id_user_id_fk",
748
+ "tableFrom": "member",
749
+ "tableTo": "user",
750
+ "columnsFrom": [
751
+ "user_id"
752
+ ],
753
+ "columnsTo": [
754
+ "id"
755
+ ],
756
+ "onDelete": "cascade",
757
+ "onUpdate": "no action"
758
+ }
759
+ },
760
+ "compositePrimaryKeys": {},
761
+ "uniqueConstraints": {},
762
+ "policies": {},
763
+ "checkConstraints": {},
764
+ "isRLSEnabled": false
765
+ },
766
+ "public.organization": {
767
+ "name": "organization",
768
+ "schema": "",
769
+ "columns": {
770
+ "id": {
771
+ "name": "id",
772
+ "type": "text",
773
+ "primaryKey": true,
774
+ "notNull": true
775
+ },
776
+ "name": {
777
+ "name": "name",
778
+ "type": "text",
779
+ "primaryKey": false,
780
+ "notNull": true
781
+ },
782
+ "slug": {
783
+ "name": "slug",
784
+ "type": "text",
785
+ "primaryKey": false,
786
+ "notNull": false
787
+ },
788
+ "logo": {
789
+ "name": "logo",
790
+ "type": "text",
791
+ "primaryKey": false,
792
+ "notNull": false
793
+ },
794
+ "metadata": {
795
+ "name": "metadata",
796
+ "type": "text",
797
+ "primaryKey": false,
798
+ "notNull": false
799
+ },
800
+ "created_at": {
801
+ "name": "created_at",
802
+ "type": "timestamp with time zone",
803
+ "primaryKey": false,
804
+ "notNull": true,
805
+ "default": "now()"
806
+ },
807
+ "updated_at": {
808
+ "name": "updated_at",
809
+ "type": "timestamp with time zone",
810
+ "primaryKey": false,
811
+ "notNull": true,
812
+ "default": "now()"
813
+ }
814
+ },
815
+ "indexes": {},
816
+ "foreignKeys": {},
817
+ "compositePrimaryKeys": {},
818
+ "uniqueConstraints": {
819
+ "organization_slug_unique": {
820
+ "name": "organization_slug_unique",
821
+ "nullsNotDistinct": false,
822
+ "columns": [
823
+ "slug"
824
+ ]
825
+ }
826
+ },
827
+ "policies": {},
828
+ "checkConstraints": {},
829
+ "isRLSEnabled": false
830
+ },
831
+ "public.session": {
832
+ "name": "session",
833
+ "schema": "",
834
+ "columns": {
835
+ "id": {
836
+ "name": "id",
837
+ "type": "text",
838
+ "primaryKey": true,
839
+ "notNull": true
840
+ },
841
+ "expires_at": {
842
+ "name": "expires_at",
843
+ "type": "timestamp with time zone",
844
+ "primaryKey": false,
845
+ "notNull": true
846
+ },
847
+ "token": {
848
+ "name": "token",
849
+ "type": "text",
850
+ "primaryKey": false,
851
+ "notNull": true
852
+ },
853
+ "ip_address": {
854
+ "name": "ip_address",
855
+ "type": "text",
856
+ "primaryKey": false,
857
+ "notNull": false
858
+ },
859
+ "user_agent": {
860
+ "name": "user_agent",
861
+ "type": "text",
862
+ "primaryKey": false,
863
+ "notNull": false
864
+ },
865
+ "user_id": {
866
+ "name": "user_id",
867
+ "type": "text",
868
+ "primaryKey": false,
869
+ "notNull": true
870
+ },
871
+ "active_organization_id": {
872
+ "name": "active_organization_id",
873
+ "type": "text",
874
+ "primaryKey": false,
875
+ "notNull": false
876
+ },
877
+ "created_at": {
878
+ "name": "created_at",
879
+ "type": "timestamp with time zone",
880
+ "primaryKey": false,
881
+ "notNull": true,
882
+ "default": "now()"
883
+ },
884
+ "updated_at": {
885
+ "name": "updated_at",
886
+ "type": "timestamp with time zone",
887
+ "primaryKey": false,
888
+ "notNull": true,
889
+ "default": "now()"
890
+ }
891
+ },
892
+ "indexes": {},
893
+ "foreignKeys": {
894
+ "session_user_id_user_id_fk": {
895
+ "name": "session_user_id_user_id_fk",
896
+ "tableFrom": "session",
897
+ "tableTo": "user",
898
+ "columnsFrom": [
899
+ "user_id"
900
+ ],
901
+ "columnsTo": [
902
+ "id"
903
+ ],
904
+ "onDelete": "cascade",
905
+ "onUpdate": "no action"
906
+ }
907
+ },
908
+ "compositePrimaryKeys": {},
909
+ "uniqueConstraints": {
910
+ "session_token_unique": {
911
+ "name": "session_token_unique",
912
+ "nullsNotDistinct": false,
913
+ "columns": [
914
+ "token"
915
+ ]
916
+ }
917
+ },
918
+ "policies": {},
919
+ "checkConstraints": {},
920
+ "isRLSEnabled": false
921
+ },
922
+ "public.user": {
923
+ "name": "user",
924
+ "schema": "",
925
+ "columns": {
926
+ "id": {
927
+ "name": "id",
928
+ "type": "text",
929
+ "primaryKey": true,
930
+ "notNull": true
931
+ },
932
+ "name": {
933
+ "name": "name",
934
+ "type": "text",
935
+ "primaryKey": false,
936
+ "notNull": true
937
+ },
938
+ "email": {
939
+ "name": "email",
940
+ "type": "text",
941
+ "primaryKey": false,
942
+ "notNull": true
943
+ },
944
+ "email_verified": {
945
+ "name": "email_verified",
946
+ "type": "boolean",
947
+ "primaryKey": false,
948
+ "notNull": true,
949
+ "default": false
950
+ },
951
+ "image": {
952
+ "name": "image",
953
+ "type": "text",
954
+ "primaryKey": false,
955
+ "notNull": false
956
+ },
957
+ "created_at": {
958
+ "name": "created_at",
959
+ "type": "timestamp with time zone",
960
+ "primaryKey": false,
961
+ "notNull": true,
962
+ "default": "now()"
963
+ },
964
+ "updated_at": {
965
+ "name": "updated_at",
966
+ "type": "timestamp with time zone",
967
+ "primaryKey": false,
968
+ "notNull": true,
969
+ "default": "now()"
970
+ }
971
+ },
972
+ "indexes": {},
973
+ "foreignKeys": {},
974
+ "compositePrimaryKeys": {},
975
+ "uniqueConstraints": {
976
+ "user_email_unique": {
977
+ "name": "user_email_unique",
978
+ "nullsNotDistinct": false,
979
+ "columns": [
980
+ "email"
981
+ ]
982
+ }
983
+ },
984
+ "policies": {},
985
+ "checkConstraints": {},
986
+ "isRLSEnabled": false
987
+ },
988
+ "public.verification": {
989
+ "name": "verification",
990
+ "schema": "",
991
+ "columns": {
992
+ "id": {
993
+ "name": "id",
994
+ "type": "text",
995
+ "primaryKey": true,
996
+ "notNull": true
997
+ },
998
+ "identifier": {
999
+ "name": "identifier",
1000
+ "type": "text",
1001
+ "primaryKey": false,
1002
+ "notNull": true
1003
+ },
1004
+ "value": {
1005
+ "name": "value",
1006
+ "type": "text",
1007
+ "primaryKey": false,
1008
+ "notNull": true
1009
+ },
1010
+ "expires_at": {
1011
+ "name": "expires_at",
1012
+ "type": "timestamp with time zone",
1013
+ "primaryKey": false,
1014
+ "notNull": true
1015
+ },
1016
+ "created_at": {
1017
+ "name": "created_at",
1018
+ "type": "timestamp with time zone",
1019
+ "primaryKey": false,
1020
+ "notNull": true,
1021
+ "default": "now()"
1022
+ },
1023
+ "updated_at": {
1024
+ "name": "updated_at",
1025
+ "type": "timestamp with time zone",
1026
+ "primaryKey": false,
1027
+ "notNull": true,
1028
+ "default": "now()"
1029
+ }
1030
+ },
1031
+ "indexes": {},
1032
+ "foreignKeys": {},
1033
+ "compositePrimaryKeys": {},
1034
+ "uniqueConstraints": {},
1035
+ "policies": {},
1036
+ "checkConstraints": {},
1037
+ "isRLSEnabled": false
1038
+ },
1039
+ "public.bucket_configs": {
1040
+ "name": "bucket_configs",
1041
+ "schema": "",
1042
+ "columns": {
1043
+ "id": {
1044
+ "name": "id",
1045
+ "type": "uuid",
1046
+ "primaryKey": true,
1047
+ "notNull": true,
1048
+ "default": "gen_random_uuid()"
1049
+ },
1050
+ "bucket_id": {
1051
+ "name": "bucket_id",
1052
+ "type": "text",
1053
+ "primaryKey": false,
1054
+ "notNull": true
1055
+ },
1056
+ "enabled": {
1057
+ "name": "enabled",
1058
+ "type": "boolean",
1059
+ "primaryKey": false,
1060
+ "notNull": true,
1061
+ "default": true
1062
+ },
1063
+ "criteria_hash": {
1064
+ "name": "criteria_hash",
1065
+ "type": "text",
1066
+ "primaryKey": false,
1067
+ "notNull": false
1068
+ },
1069
+ "created_at": {
1070
+ "name": "created_at",
1071
+ "type": "timestamp with time zone",
1072
+ "primaryKey": false,
1073
+ "notNull": true,
1074
+ "default": "now()"
1075
+ },
1076
+ "updated_at": {
1077
+ "name": "updated_at",
1078
+ "type": "timestamp with time zone",
1079
+ "primaryKey": false,
1080
+ "notNull": true,
1081
+ "default": "now()"
1082
+ }
1083
+ },
1084
+ "indexes": {
1085
+ "bucket_configs_bucket_id_idx": {
1086
+ "name": "bucket_configs_bucket_id_idx",
1087
+ "columns": [
1088
+ {
1089
+ "expression": "bucket_id",
1090
+ "isExpression": false,
1091
+ "asc": true,
1092
+ "nulls": "last"
1093
+ }
1094
+ ],
1095
+ "isUnique": true,
1096
+ "concurrently": false,
1097
+ "method": "btree",
1098
+ "with": {}
1099
+ }
1100
+ },
1101
+ "foreignKeys": {},
1102
+ "compositePrimaryKeys": {},
1103
+ "uniqueConstraints": {},
1104
+ "policies": {},
1105
+ "checkConstraints": {},
1106
+ "isRLSEnabled": false
1107
+ },
1108
+ "public.bucket_memberships": {
1109
+ "name": "bucket_memberships",
1110
+ "schema": "",
1111
+ "columns": {
1112
+ "id": {
1113
+ "name": "id",
1114
+ "type": "uuid",
1115
+ "primaryKey": true,
1116
+ "notNull": true,
1117
+ "default": "gen_random_uuid()"
1118
+ },
1119
+ "organization_id": {
1120
+ "name": "organization_id",
1121
+ "type": "text",
1122
+ "primaryKey": false,
1123
+ "notNull": false
1124
+ },
1125
+ "user_id": {
1126
+ "name": "user_id",
1127
+ "type": "text",
1128
+ "primaryKey": false,
1129
+ "notNull": true
1130
+ },
1131
+ "user_email": {
1132
+ "name": "user_email",
1133
+ "type": "text",
1134
+ "primaryKey": false,
1135
+ "notNull": false
1136
+ },
1137
+ "bucket_id": {
1138
+ "name": "bucket_id",
1139
+ "type": "text",
1140
+ "primaryKey": false,
1141
+ "notNull": true
1142
+ },
1143
+ "status": {
1144
+ "name": "status",
1145
+ "type": "bucket_membership_status",
1146
+ "typeSchema": "public",
1147
+ "primaryKey": false,
1148
+ "notNull": true,
1149
+ "default": "'active'"
1150
+ },
1151
+ "entered_at": {
1152
+ "name": "entered_at",
1153
+ "type": "timestamp with time zone",
1154
+ "primaryKey": false,
1155
+ "notNull": true,
1156
+ "default": "now()"
1157
+ },
1158
+ "left_at": {
1159
+ "name": "left_at",
1160
+ "type": "timestamp with time zone",
1161
+ "primaryKey": false,
1162
+ "notNull": false
1163
+ },
1164
+ "expires_at": {
1165
+ "name": "expires_at",
1166
+ "type": "timestamp with time zone",
1167
+ "primaryKey": false,
1168
+ "notNull": false
1169
+ },
1170
+ "max_dwell_at": {
1171
+ "name": "max_dwell_at",
1172
+ "type": "timestamp with time zone",
1173
+ "primaryKey": false,
1174
+ "notNull": false
1175
+ },
1176
+ "last_evaluated_at": {
1177
+ "name": "last_evaluated_at",
1178
+ "type": "timestamp with time zone",
1179
+ "primaryKey": false,
1180
+ "notNull": false
1181
+ },
1182
+ "entry_count": {
1183
+ "name": "entry_count",
1184
+ "type": "integer",
1185
+ "primaryKey": false,
1186
+ "notNull": true,
1187
+ "default": 1
1188
+ },
1189
+ "source": {
1190
+ "name": "source",
1191
+ "type": "text",
1192
+ "primaryKey": false,
1193
+ "notNull": false
1194
+ },
1195
+ "context": {
1196
+ "name": "context",
1197
+ "type": "jsonb",
1198
+ "primaryKey": false,
1199
+ "notNull": false,
1200
+ "default": "'{}'::jsonb"
1201
+ },
1202
+ "dwell_state": {
1203
+ "name": "dwell_state",
1204
+ "type": "jsonb",
1205
+ "primaryKey": false,
1206
+ "notNull": false,
1207
+ "default": "'{}'::jsonb"
1208
+ },
1209
+ "dwell_anchor_at": {
1210
+ "name": "dwell_anchor_at",
1211
+ "type": "timestamp with time zone",
1212
+ "primaryKey": false,
1213
+ "notNull": false
1214
+ },
1215
+ "deleted_at": {
1216
+ "name": "deleted_at",
1217
+ "type": "timestamp with time zone",
1218
+ "primaryKey": false,
1219
+ "notNull": false
1220
+ },
1221
+ "created_at": {
1222
+ "name": "created_at",
1223
+ "type": "timestamp with time zone",
1224
+ "primaryKey": false,
1225
+ "notNull": true,
1226
+ "default": "now()"
1227
+ },
1228
+ "updated_at": {
1229
+ "name": "updated_at",
1230
+ "type": "timestamp with time zone",
1231
+ "primaryKey": false,
1232
+ "notNull": true,
1233
+ "default": "now()"
1234
+ }
1235
+ },
1236
+ "indexes": {
1237
+ "uq_user_bucket_active": {
1238
+ "name": "uq_user_bucket_active",
1239
+ "columns": [
1240
+ {
1241
+ "expression": "user_id",
1242
+ "isExpression": false,
1243
+ "asc": true,
1244
+ "nulls": "last"
1245
+ },
1246
+ {
1247
+ "expression": "bucket_id",
1248
+ "isExpression": false,
1249
+ "asc": true,
1250
+ "nulls": "last"
1251
+ }
1252
+ ],
1253
+ "isUnique": true,
1254
+ "where": "status = 'active' AND deleted_at IS NULL",
1255
+ "concurrently": false,
1256
+ "method": "btree",
1257
+ "with": {}
1258
+ },
1259
+ "bucket_memberships_bucket_id_status_idx": {
1260
+ "name": "bucket_memberships_bucket_id_status_idx",
1261
+ "columns": [
1262
+ {
1263
+ "expression": "bucket_id",
1264
+ "isExpression": false,
1265
+ "asc": true,
1266
+ "nulls": "last"
1267
+ },
1268
+ {
1269
+ "expression": "status",
1270
+ "isExpression": false,
1271
+ "asc": true,
1272
+ "nulls": "last"
1273
+ }
1274
+ ],
1275
+ "isUnique": false,
1276
+ "concurrently": false,
1277
+ "method": "btree",
1278
+ "with": {}
1279
+ },
1280
+ "bucket_memberships_user_id_idx": {
1281
+ "name": "bucket_memberships_user_id_idx",
1282
+ "columns": [
1283
+ {
1284
+ "expression": "user_id",
1285
+ "isExpression": false,
1286
+ "asc": true,
1287
+ "nulls": "last"
1288
+ }
1289
+ ],
1290
+ "isUnique": false,
1291
+ "concurrently": false,
1292
+ "method": "btree",
1293
+ "with": {}
1294
+ },
1295
+ "bucket_memberships_last_evaluated_idx": {
1296
+ "name": "bucket_memberships_last_evaluated_idx",
1297
+ "columns": [
1298
+ {
1299
+ "expression": "last_evaluated_at",
1300
+ "isExpression": false,
1301
+ "asc": true,
1302
+ "nulls": "last"
1303
+ }
1304
+ ],
1305
+ "isUnique": false,
1306
+ "concurrently": false,
1307
+ "method": "btree",
1308
+ "with": {}
1309
+ },
1310
+ "bucket_memberships_expires_at_idx": {
1311
+ "name": "bucket_memberships_expires_at_idx",
1312
+ "columns": [
1313
+ {
1314
+ "expression": "expires_at",
1315
+ "isExpression": false,
1316
+ "asc": true,
1317
+ "nulls": "last"
1318
+ }
1319
+ ],
1320
+ "isUnique": false,
1321
+ "concurrently": false,
1322
+ "method": "btree",
1323
+ "with": {}
1324
+ },
1325
+ "bucket_memberships_max_dwell_at_idx": {
1326
+ "name": "bucket_memberships_max_dwell_at_idx",
1327
+ "columns": [
1328
+ {
1329
+ "expression": "max_dwell_at",
1330
+ "isExpression": false,
1331
+ "asc": true,
1332
+ "nulls": "last"
1333
+ }
1334
+ ],
1335
+ "isUnique": false,
1336
+ "concurrently": false,
1337
+ "method": "btree",
1338
+ "with": {}
1339
+ },
1340
+ "bucket_memberships_dwell_idx": {
1341
+ "name": "bucket_memberships_dwell_idx",
1342
+ "columns": [
1343
+ {
1344
+ "expression": "bucket_id",
1345
+ "isExpression": false,
1346
+ "asc": true,
1347
+ "nulls": "last"
1348
+ },
1349
+ {
1350
+ "expression": "status",
1351
+ "isExpression": false,
1352
+ "asc": true,
1353
+ "nulls": "last"
1354
+ },
1355
+ {
1356
+ "expression": "entered_at",
1357
+ "isExpression": false,
1358
+ "asc": true,
1359
+ "nulls": "last"
1360
+ }
1361
+ ],
1362
+ "isUnique": false,
1363
+ "concurrently": false,
1364
+ "method": "btree",
1365
+ "with": {}
1366
+ },
1367
+ "bucket_memberships_bucket_id_status_id_idx": {
1368
+ "name": "bucket_memberships_bucket_id_status_id_idx",
1369
+ "columns": [
1370
+ {
1371
+ "expression": "bucket_id",
1372
+ "isExpression": false,
1373
+ "asc": true,
1374
+ "nulls": "last"
1375
+ },
1376
+ {
1377
+ "expression": "status",
1378
+ "isExpression": false,
1379
+ "asc": true,
1380
+ "nulls": "last"
1381
+ },
1382
+ {
1383
+ "expression": "id",
1384
+ "isExpression": false,
1385
+ "asc": true,
1386
+ "nulls": "last"
1387
+ }
1388
+ ],
1389
+ "isUnique": false,
1390
+ "concurrently": false,
1391
+ "method": "btree",
1392
+ "with": {}
1393
+ },
1394
+ "bucket_memberships_dwell_lastfired_idx": {
1395
+ "name": "bucket_memberships_dwell_lastfired_idx",
1396
+ "columns": [
1397
+ {
1398
+ "expression": "bucket_id",
1399
+ "isExpression": false,
1400
+ "asc": true,
1401
+ "nulls": "last"
1402
+ },
1403
+ {
1404
+ "expression": "status",
1405
+ "isExpression": false,
1406
+ "asc": true,
1407
+ "nulls": "last"
1408
+ },
1409
+ {
1410
+ "expression": "last_evaluated_at",
1411
+ "isExpression": false,
1412
+ "asc": true,
1413
+ "nulls": "last"
1414
+ }
1415
+ ],
1416
+ "isUnique": false,
1417
+ "concurrently": false,
1418
+ "method": "btree",
1419
+ "with": {}
1420
+ }
1421
+ },
1422
+ "foreignKeys": {},
1423
+ "compositePrimaryKeys": {},
1424
+ "uniqueConstraints": {},
1425
+ "policies": {},
1426
+ "checkConstraints": {},
1427
+ "isRLSEnabled": false
1428
+ },
1429
+ "public.campaigns": {
1430
+ "name": "campaigns",
1431
+ "schema": "",
1432
+ "columns": {
1433
+ "id": {
1434
+ "name": "id",
1435
+ "type": "uuid",
1436
+ "primaryKey": true,
1437
+ "notNull": true,
1438
+ "default": "gen_random_uuid()"
1439
+ },
1440
+ "organization_id": {
1441
+ "name": "organization_id",
1442
+ "type": "text",
1443
+ "primaryKey": false,
1444
+ "notNull": false
1445
+ },
1446
+ "name": {
1447
+ "name": "name",
1448
+ "type": "text",
1449
+ "primaryKey": false,
1450
+ "notNull": true
1451
+ },
1452
+ "status": {
1453
+ "name": "status",
1454
+ "type": "text",
1455
+ "primaryKey": false,
1456
+ "notNull": true,
1457
+ "default": "'queued'"
1458
+ },
1459
+ "audience_kind": {
1460
+ "name": "audience_kind",
1461
+ "type": "text",
1462
+ "primaryKey": false,
1463
+ "notNull": true
1464
+ },
1465
+ "audience_id": {
1466
+ "name": "audience_id",
1467
+ "type": "text",
1468
+ "primaryKey": false,
1469
+ "notNull": true
1470
+ },
1471
+ "template_key": {
1472
+ "name": "template_key",
1473
+ "type": "text",
1474
+ "primaryKey": false,
1475
+ "notNull": true
1476
+ },
1477
+ "props": {
1478
+ "name": "props",
1479
+ "type": "jsonb",
1480
+ "primaryKey": false,
1481
+ "notNull": false,
1482
+ "default": "'{}'::jsonb"
1483
+ },
1484
+ "from_email": {
1485
+ "name": "from_email",
1486
+ "type": "text",
1487
+ "primaryKey": false,
1488
+ "notNull": false
1489
+ },
1490
+ "subject": {
1491
+ "name": "subject",
1492
+ "type": "text",
1493
+ "primaryKey": false,
1494
+ "notNull": false
1495
+ },
1496
+ "total_recipients": {
1497
+ "name": "total_recipients",
1498
+ "type": "integer",
1499
+ "primaryKey": false,
1500
+ "notNull": true,
1501
+ "default": 0
1502
+ },
1503
+ "sent_count": {
1504
+ "name": "sent_count",
1505
+ "type": "integer",
1506
+ "primaryKey": false,
1507
+ "notNull": true,
1508
+ "default": 0
1509
+ },
1510
+ "skipped_count": {
1511
+ "name": "skipped_count",
1512
+ "type": "integer",
1513
+ "primaryKey": false,
1514
+ "notNull": true,
1515
+ "default": 0
1516
+ },
1517
+ "failed_count": {
1518
+ "name": "failed_count",
1519
+ "type": "integer",
1520
+ "primaryKey": false,
1521
+ "notNull": true,
1522
+ "default": 0
1523
+ },
1524
+ "started_at": {
1525
+ "name": "started_at",
1526
+ "type": "timestamp with time zone",
1527
+ "primaryKey": false,
1528
+ "notNull": false
1529
+ },
1530
+ "completed_at": {
1531
+ "name": "completed_at",
1532
+ "type": "timestamp with time zone",
1533
+ "primaryKey": false,
1534
+ "notNull": false
1535
+ },
1536
+ "created_at": {
1537
+ "name": "created_at",
1538
+ "type": "timestamp with time zone",
1539
+ "primaryKey": false,
1540
+ "notNull": true,
1541
+ "default": "now()"
1542
+ },
1543
+ "updated_at": {
1544
+ "name": "updated_at",
1545
+ "type": "timestamp with time zone",
1546
+ "primaryKey": false,
1547
+ "notNull": true,
1548
+ "default": "now()"
1549
+ }
1550
+ },
1551
+ "indexes": {
1552
+ "campaigns_status_idx": {
1553
+ "name": "campaigns_status_idx",
1554
+ "columns": [
1555
+ {
1556
+ "expression": "status",
1557
+ "isExpression": false,
1558
+ "asc": true,
1559
+ "nulls": "last"
1560
+ }
1561
+ ],
1562
+ "isUnique": false,
1563
+ "concurrently": false,
1564
+ "method": "btree",
1565
+ "with": {}
1566
+ },
1567
+ "campaigns_created_at_idx": {
1568
+ "name": "campaigns_created_at_idx",
1569
+ "columns": [
1570
+ {
1571
+ "expression": "created_at",
1572
+ "isExpression": false,
1573
+ "asc": true,
1574
+ "nulls": "last"
1575
+ }
1576
+ ],
1577
+ "isUnique": false,
1578
+ "concurrently": false,
1579
+ "method": "btree",
1580
+ "with": {}
1581
+ }
1582
+ },
1583
+ "foreignKeys": {},
1584
+ "compositePrimaryKeys": {},
1585
+ "uniqueConstraints": {},
1586
+ "policies": {},
1587
+ "checkConstraints": {},
1588
+ "isRLSEnabled": false
1589
+ },
1590
+ "public.contact_aliases": {
1591
+ "name": "contact_aliases",
1592
+ "schema": "",
1593
+ "columns": {
1594
+ "id": {
1595
+ "name": "id",
1596
+ "type": "uuid",
1597
+ "primaryKey": true,
1598
+ "notNull": true,
1599
+ "default": "gen_random_uuid()"
1600
+ },
1601
+ "contact_id": {
1602
+ "name": "contact_id",
1603
+ "type": "uuid",
1604
+ "primaryKey": false,
1605
+ "notNull": true
1606
+ },
1607
+ "alias_kind": {
1608
+ "name": "alias_kind",
1609
+ "type": "text",
1610
+ "primaryKey": false,
1611
+ "notNull": true
1612
+ },
1613
+ "alias_value": {
1614
+ "name": "alias_value",
1615
+ "type": "text",
1616
+ "primaryKey": false,
1617
+ "notNull": true
1618
+ },
1619
+ "from_contact_id": {
1620
+ "name": "from_contact_id",
1621
+ "type": "uuid",
1622
+ "primaryKey": false,
1623
+ "notNull": false
1624
+ },
1625
+ "reason": {
1626
+ "name": "reason",
1627
+ "type": "text",
1628
+ "primaryKey": false,
1629
+ "notNull": true
1630
+ },
1631
+ "created_at": {
1632
+ "name": "created_at",
1633
+ "type": "timestamp with time zone",
1634
+ "primaryKey": false,
1635
+ "notNull": true,
1636
+ "default": "now()"
1637
+ },
1638
+ "updated_at": {
1639
+ "name": "updated_at",
1640
+ "type": "timestamp with time zone",
1641
+ "primaryKey": false,
1642
+ "notNull": true,
1643
+ "default": "now()"
1644
+ }
1645
+ },
1646
+ "indexes": {
1647
+ "contact_aliases_kind_value_idx": {
1648
+ "name": "contact_aliases_kind_value_idx",
1649
+ "columns": [
1650
+ {
1651
+ "expression": "alias_kind",
1652
+ "isExpression": false,
1653
+ "asc": true,
1654
+ "nulls": "last"
1655
+ },
1656
+ {
1657
+ "expression": "alias_value",
1658
+ "isExpression": false,
1659
+ "asc": true,
1660
+ "nulls": "last"
1661
+ }
1662
+ ],
1663
+ "isUnique": true,
1664
+ "concurrently": false,
1665
+ "method": "btree",
1666
+ "with": {}
1667
+ },
1668
+ "contact_aliases_contact_id_idx": {
1669
+ "name": "contact_aliases_contact_id_idx",
1670
+ "columns": [
1671
+ {
1672
+ "expression": "contact_id",
1673
+ "isExpression": false,
1674
+ "asc": true,
1675
+ "nulls": "last"
1676
+ }
1677
+ ],
1678
+ "isUnique": false,
1679
+ "concurrently": false,
1680
+ "method": "btree",
1681
+ "with": {}
1682
+ }
1683
+ },
1684
+ "foreignKeys": {
1685
+ "contact_aliases_contact_id_contacts_id_fk": {
1686
+ "name": "contact_aliases_contact_id_contacts_id_fk",
1687
+ "tableFrom": "contact_aliases",
1688
+ "tableTo": "contacts",
1689
+ "columnsFrom": [
1690
+ "contact_id"
1691
+ ],
1692
+ "columnsTo": [
1693
+ "id"
1694
+ ],
1695
+ "onDelete": "cascade",
1696
+ "onUpdate": "no action"
1697
+ }
1698
+ },
1699
+ "compositePrimaryKeys": {},
1700
+ "uniqueConstraints": {},
1701
+ "policies": {},
1702
+ "checkConstraints": {},
1703
+ "isRLSEnabled": false
1704
+ },
1705
+ "public.contacts": {
1706
+ "name": "contacts",
1707
+ "schema": "",
1708
+ "columns": {
1709
+ "id": {
1710
+ "name": "id",
1711
+ "type": "uuid",
1712
+ "primaryKey": true,
1713
+ "notNull": true,
1714
+ "default": "gen_random_uuid()"
1715
+ },
1716
+ "organization_id": {
1717
+ "name": "organization_id",
1718
+ "type": "text",
1719
+ "primaryKey": false,
1720
+ "notNull": false
1721
+ },
1722
+ "external_id": {
1723
+ "name": "external_id",
1724
+ "type": "text",
1725
+ "primaryKey": false,
1726
+ "notNull": false
1727
+ },
1728
+ "email": {
1729
+ "name": "email",
1730
+ "type": "text",
1731
+ "primaryKey": false,
1732
+ "notNull": false
1733
+ },
1734
+ "anonymous_id": {
1735
+ "name": "anonymous_id",
1736
+ "type": "text",
1737
+ "primaryKey": false,
1738
+ "notNull": false
1739
+ },
1740
+ "timezone": {
1741
+ "name": "timezone",
1742
+ "type": "text",
1743
+ "primaryKey": false,
1744
+ "notNull": false
1745
+ },
1746
+ "properties": {
1747
+ "name": "properties",
1748
+ "type": "jsonb",
1749
+ "primaryKey": false,
1750
+ "notNull": false,
1751
+ "default": "'{}'::jsonb"
1752
+ },
1753
+ "first_seen_at": {
1754
+ "name": "first_seen_at",
1755
+ "type": "timestamp with time zone",
1756
+ "primaryKey": false,
1757
+ "notNull": true,
1758
+ "default": "now()"
1759
+ },
1760
+ "last_seen_at": {
1761
+ "name": "last_seen_at",
1762
+ "type": "timestamp with time zone",
1763
+ "primaryKey": false,
1764
+ "notNull": true,
1765
+ "default": "now()"
1766
+ },
1767
+ "deleted_at": {
1768
+ "name": "deleted_at",
1769
+ "type": "timestamp with time zone",
1770
+ "primaryKey": false,
1771
+ "notNull": false
1772
+ },
1773
+ "created_at": {
1774
+ "name": "created_at",
1775
+ "type": "timestamp with time zone",
1776
+ "primaryKey": false,
1777
+ "notNull": true,
1778
+ "default": "now()"
1779
+ },
1780
+ "updated_at": {
1781
+ "name": "updated_at",
1782
+ "type": "timestamp with time zone",
1783
+ "primaryKey": false,
1784
+ "notNull": true,
1785
+ "default": "now()"
1786
+ }
1787
+ },
1788
+ "indexes": {
1789
+ "contacts_email_idx": {
1790
+ "name": "contacts_email_idx",
1791
+ "columns": [
1792
+ {
1793
+ "expression": "email",
1794
+ "isExpression": false,
1795
+ "asc": true,
1796
+ "nulls": "last"
1797
+ }
1798
+ ],
1799
+ "isUnique": false,
1800
+ "concurrently": false,
1801
+ "method": "btree",
1802
+ "with": {}
1803
+ },
1804
+ "contacts_external_id_unique_idx": {
1805
+ "name": "contacts_external_id_unique_idx",
1806
+ "columns": [
1807
+ {
1808
+ "expression": "external_id",
1809
+ "isExpression": false,
1810
+ "asc": true,
1811
+ "nulls": "last"
1812
+ }
1813
+ ],
1814
+ "isUnique": true,
1815
+ "where": "external_id IS NOT NULL AND deleted_at IS NULL",
1816
+ "concurrently": false,
1817
+ "method": "btree",
1818
+ "with": {}
1819
+ },
1820
+ "contacts_email_unique_idx": {
1821
+ "name": "contacts_email_unique_idx",
1822
+ "columns": [
1823
+ {
1824
+ "expression": "lower(email)",
1825
+ "asc": true,
1826
+ "isExpression": true,
1827
+ "nulls": "last"
1828
+ }
1829
+ ],
1830
+ "isUnique": true,
1831
+ "where": "email IS NOT NULL AND deleted_at IS NULL",
1832
+ "concurrently": false,
1833
+ "method": "btree",
1834
+ "with": {}
1835
+ },
1836
+ "contacts_anonymous_id_unique_idx": {
1837
+ "name": "contacts_anonymous_id_unique_idx",
1838
+ "columns": [
1839
+ {
1840
+ "expression": "anonymous_id",
1841
+ "isExpression": false,
1842
+ "asc": true,
1843
+ "nulls": "last"
1844
+ }
1845
+ ],
1846
+ "isUnique": true,
1847
+ "where": "anonymous_id IS NOT NULL AND deleted_at IS NULL",
1848
+ "concurrently": false,
1849
+ "method": "btree",
1850
+ "with": {}
1851
+ }
1852
+ },
1853
+ "foreignKeys": {},
1854
+ "compositePrimaryKeys": {},
1855
+ "uniqueConstraints": {},
1856
+ "policies": {},
1857
+ "checkConstraints": {},
1858
+ "isRLSEnabled": false
1859
+ },
1860
+ "public.dead_letter_queue": {
1861
+ "name": "dead_letter_queue",
1862
+ "schema": "",
1863
+ "columns": {
1864
+ "id": {
1865
+ "name": "id",
1866
+ "type": "uuid",
1867
+ "primaryKey": true,
1868
+ "notNull": true,
1869
+ "default": "gen_random_uuid()"
1870
+ },
1871
+ "source": {
1872
+ "name": "source",
1873
+ "type": "text",
1874
+ "primaryKey": false,
1875
+ "notNull": true
1876
+ },
1877
+ "source_id": {
1878
+ "name": "source_id",
1879
+ "type": "text",
1880
+ "primaryKey": false,
1881
+ "notNull": false
1882
+ },
1883
+ "payload": {
1884
+ "name": "payload",
1885
+ "type": "jsonb",
1886
+ "primaryKey": false,
1887
+ "notNull": true
1888
+ },
1889
+ "error": {
1890
+ "name": "error",
1891
+ "type": "text",
1892
+ "primaryKey": false,
1893
+ "notNull": true
1894
+ },
1895
+ "retry_count": {
1896
+ "name": "retry_count",
1897
+ "type": "integer",
1898
+ "primaryKey": false,
1899
+ "notNull": true,
1900
+ "default": 0
1901
+ },
1902
+ "status": {
1903
+ "name": "status",
1904
+ "type": "dlq_status",
1905
+ "typeSchema": "public",
1906
+ "primaryKey": false,
1907
+ "notNull": true,
1908
+ "default": "'pending'"
1909
+ },
1910
+ "retried_at": {
1911
+ "name": "retried_at",
1912
+ "type": "timestamp with time zone",
1913
+ "primaryKey": false,
1914
+ "notNull": false
1915
+ },
1916
+ "created_at": {
1917
+ "name": "created_at",
1918
+ "type": "timestamp with time zone",
1919
+ "primaryKey": false,
1920
+ "notNull": true,
1921
+ "default": "now()"
1922
+ },
1923
+ "updated_at": {
1924
+ "name": "updated_at",
1925
+ "type": "timestamp with time zone",
1926
+ "primaryKey": false,
1927
+ "notNull": true,
1928
+ "default": "now()"
1929
+ }
1930
+ },
1931
+ "indexes": {
1932
+ "dlq_source_idx": {
1933
+ "name": "dlq_source_idx",
1934
+ "columns": [
1935
+ {
1936
+ "expression": "source",
1937
+ "isExpression": false,
1938
+ "asc": true,
1939
+ "nulls": "last"
1940
+ }
1941
+ ],
1942
+ "isUnique": false,
1943
+ "concurrently": false,
1944
+ "method": "btree",
1945
+ "with": {}
1946
+ },
1947
+ "dlq_status_idx": {
1948
+ "name": "dlq_status_idx",
1949
+ "columns": [
1950
+ {
1951
+ "expression": "status",
1952
+ "isExpression": false,
1953
+ "asc": true,
1954
+ "nulls": "last"
1955
+ }
1956
+ ],
1957
+ "isUnique": false,
1958
+ "concurrently": false,
1959
+ "method": "btree",
1960
+ "with": {}
1961
+ },
1962
+ "dlq_created_at_idx": {
1963
+ "name": "dlq_created_at_idx",
1964
+ "columns": [
1965
+ {
1966
+ "expression": "created_at",
1967
+ "isExpression": false,
1968
+ "asc": true,
1969
+ "nulls": "last"
1970
+ }
1971
+ ],
1972
+ "isUnique": false,
1973
+ "concurrently": false,
1974
+ "method": "btree",
1975
+ "with": {}
1976
+ }
1977
+ },
1978
+ "foreignKeys": {},
1979
+ "compositePrimaryKeys": {},
1980
+ "uniqueConstraints": {},
1981
+ "policies": {},
1982
+ "checkConstraints": {},
1983
+ "isRLSEnabled": false
1984
+ },
1985
+ "public.email_preferences": {
1986
+ "name": "email_preferences",
1987
+ "schema": "",
1988
+ "columns": {
1989
+ "id": {
1990
+ "name": "id",
1991
+ "type": "uuid",
1992
+ "primaryKey": true,
1993
+ "notNull": true,
1994
+ "default": "gen_random_uuid()"
1995
+ },
1996
+ "user_id": {
1997
+ "name": "user_id",
1998
+ "type": "text",
1999
+ "primaryKey": false,
2000
+ "notNull": true
2001
+ },
2002
+ "email": {
2003
+ "name": "email",
2004
+ "type": "text",
2005
+ "primaryKey": false,
2006
+ "notNull": true
2007
+ },
2008
+ "unsubscribed_all": {
2009
+ "name": "unsubscribed_all",
2010
+ "type": "boolean",
2011
+ "primaryKey": false,
2012
+ "notNull": true,
2013
+ "default": false
2014
+ },
2015
+ "suppressed": {
2016
+ "name": "suppressed",
2017
+ "type": "boolean",
2018
+ "primaryKey": false,
2019
+ "notNull": true,
2020
+ "default": false
2021
+ },
2022
+ "bounce_count": {
2023
+ "name": "bounce_count",
2024
+ "type": "integer",
2025
+ "primaryKey": false,
2026
+ "notNull": true,
2027
+ "default": 0
2028
+ },
2029
+ "categories": {
2030
+ "name": "categories",
2031
+ "type": "jsonb",
2032
+ "primaryKey": false,
2033
+ "notNull": false,
2034
+ "default": "'{}'::jsonb"
2035
+ },
2036
+ "suppressed_at": {
2037
+ "name": "suppressed_at",
2038
+ "type": "timestamp with time zone",
2039
+ "primaryKey": false,
2040
+ "notNull": false
2041
+ },
2042
+ "last_bounce_at": {
2043
+ "name": "last_bounce_at",
2044
+ "type": "timestamp with time zone",
2045
+ "primaryKey": false,
2046
+ "notNull": false
2047
+ },
2048
+ "created_at": {
2049
+ "name": "created_at",
2050
+ "type": "timestamp with time zone",
2051
+ "primaryKey": false,
2052
+ "notNull": true,
2053
+ "default": "now()"
2054
+ },
2055
+ "updated_at": {
2056
+ "name": "updated_at",
2057
+ "type": "timestamp with time zone",
2058
+ "primaryKey": false,
2059
+ "notNull": true,
2060
+ "default": "now()"
2061
+ }
2062
+ },
2063
+ "indexes": {
2064
+ "email_preferences_user_email_idx": {
2065
+ "name": "email_preferences_user_email_idx",
2066
+ "columns": [
2067
+ {
2068
+ "expression": "user_id",
2069
+ "isExpression": false,
2070
+ "asc": true,
2071
+ "nulls": "last"
2072
+ },
2073
+ {
2074
+ "expression": "email",
2075
+ "isExpression": false,
2076
+ "asc": true,
2077
+ "nulls": "last"
2078
+ }
2079
+ ],
2080
+ "isUnique": true,
2081
+ "concurrently": false,
2082
+ "method": "btree",
2083
+ "with": {}
2084
+ }
2085
+ },
2086
+ "foreignKeys": {},
2087
+ "compositePrimaryKeys": {},
2088
+ "uniqueConstraints": {},
2089
+ "policies": {},
2090
+ "checkConstraints": {},
2091
+ "isRLSEnabled": false
2092
+ },
2093
+ "public.email_sends": {
2094
+ "name": "email_sends",
2095
+ "schema": "",
2096
+ "columns": {
2097
+ "id": {
2098
+ "name": "id",
2099
+ "type": "uuid",
2100
+ "primaryKey": true,
2101
+ "notNull": true,
2102
+ "default": "gen_random_uuid()"
2103
+ },
2104
+ "organization_id": {
2105
+ "name": "organization_id",
2106
+ "type": "text",
2107
+ "primaryKey": false,
2108
+ "notNull": false
2109
+ },
2110
+ "journey_state_id": {
2111
+ "name": "journey_state_id",
2112
+ "type": "uuid",
2113
+ "primaryKey": false,
2114
+ "notNull": false
2115
+ },
2116
+ "user_id": {
2117
+ "name": "user_id",
2118
+ "type": "text",
2119
+ "primaryKey": false,
2120
+ "notNull": false
2121
+ },
2122
+ "user_email": {
2123
+ "name": "user_email",
2124
+ "type": "text",
2125
+ "primaryKey": false,
2126
+ "notNull": false
2127
+ },
2128
+ "template_key": {
2129
+ "name": "template_key",
2130
+ "type": "text",
2131
+ "primaryKey": false,
2132
+ "notNull": false
2133
+ },
2134
+ "resend_id": {
2135
+ "name": "resend_id",
2136
+ "type": "text",
2137
+ "primaryKey": false,
2138
+ "notNull": false
2139
+ },
2140
+ "from_email": {
2141
+ "name": "from_email",
2142
+ "type": "text",
2143
+ "primaryKey": false,
2144
+ "notNull": true
2145
+ },
2146
+ "to_email": {
2147
+ "name": "to_email",
2148
+ "type": "text",
2149
+ "primaryKey": false,
2150
+ "notNull": true
2151
+ },
2152
+ "subject": {
2153
+ "name": "subject",
2154
+ "type": "text",
2155
+ "primaryKey": false,
2156
+ "notNull": true
2157
+ },
2158
+ "category": {
2159
+ "name": "category",
2160
+ "type": "text",
2161
+ "primaryKey": false,
2162
+ "notNull": false
2163
+ },
2164
+ "status": {
2165
+ "name": "status",
2166
+ "type": "email_send_status",
2167
+ "typeSchema": "public",
2168
+ "primaryKey": false,
2169
+ "notNull": true,
2170
+ "default": "'queued'"
2171
+ },
2172
+ "sent_at": {
2173
+ "name": "sent_at",
2174
+ "type": "timestamp with time zone",
2175
+ "primaryKey": false,
2176
+ "notNull": false
2177
+ },
2178
+ "delivered_at": {
2179
+ "name": "delivered_at",
2180
+ "type": "timestamp with time zone",
2181
+ "primaryKey": false,
2182
+ "notNull": false
2183
+ },
2184
+ "opened_at": {
2185
+ "name": "opened_at",
2186
+ "type": "timestamp with time zone",
2187
+ "primaryKey": false,
2188
+ "notNull": false
2189
+ },
2190
+ "clicked_at": {
2191
+ "name": "clicked_at",
2192
+ "type": "timestamp with time zone",
2193
+ "primaryKey": false,
2194
+ "notNull": false
2195
+ },
2196
+ "bounced_at": {
2197
+ "name": "bounced_at",
2198
+ "type": "timestamp with time zone",
2199
+ "primaryKey": false,
2200
+ "notNull": false
2201
+ },
2202
+ "complained_at": {
2203
+ "name": "complained_at",
2204
+ "type": "timestamp with time zone",
2205
+ "primaryKey": false,
2206
+ "notNull": false
2207
+ },
2208
+ "bounce_type": {
2209
+ "name": "bounce_type",
2210
+ "type": "text",
2211
+ "primaryKey": false,
2212
+ "notNull": false
2213
+ },
2214
+ "bounce_reason": {
2215
+ "name": "bounce_reason",
2216
+ "type": "text",
2217
+ "primaryKey": false,
2218
+ "notNull": false
2219
+ },
2220
+ "idempotency_key": {
2221
+ "name": "idempotency_key",
2222
+ "type": "text",
2223
+ "primaryKey": false,
2224
+ "notNull": false
2225
+ },
2226
+ "created_at": {
2227
+ "name": "created_at",
2228
+ "type": "timestamp with time zone",
2229
+ "primaryKey": false,
2230
+ "notNull": true,
2231
+ "default": "now()"
2232
+ },
2233
+ "updated_at": {
2234
+ "name": "updated_at",
2235
+ "type": "timestamp with time zone",
2236
+ "primaryKey": false,
2237
+ "notNull": true,
2238
+ "default": "now()"
2239
+ }
2240
+ },
2241
+ "indexes": {
2242
+ "email_sends_to_email_idx": {
2243
+ "name": "email_sends_to_email_idx",
2244
+ "columns": [
2245
+ {
2246
+ "expression": "to_email",
2247
+ "isExpression": false,
2248
+ "asc": true,
2249
+ "nulls": "last"
2250
+ }
2251
+ ],
2252
+ "isUnique": false,
2253
+ "concurrently": false,
2254
+ "method": "btree",
2255
+ "with": {}
2256
+ },
2257
+ "email_sends_template_key_idx": {
2258
+ "name": "email_sends_template_key_idx",
2259
+ "columns": [
2260
+ {
2261
+ "expression": "template_key",
2262
+ "isExpression": false,
2263
+ "asc": true,
2264
+ "nulls": "last"
2265
+ }
2266
+ ],
2267
+ "isUnique": false,
2268
+ "concurrently": false,
2269
+ "method": "btree",
2270
+ "with": {}
2271
+ },
2272
+ "email_sends_status_idx": {
2273
+ "name": "email_sends_status_idx",
2274
+ "columns": [
2275
+ {
2276
+ "expression": "status",
2277
+ "isExpression": false,
2278
+ "asc": true,
2279
+ "nulls": "last"
2280
+ }
2281
+ ],
2282
+ "isUnique": false,
2283
+ "concurrently": false,
2284
+ "method": "btree",
2285
+ "with": {}
2286
+ },
2287
+ "email_sends_created_at_idx": {
2288
+ "name": "email_sends_created_at_idx",
2289
+ "columns": [
2290
+ {
2291
+ "expression": "created_at",
2292
+ "isExpression": false,
2293
+ "asc": true,
2294
+ "nulls": "last"
2295
+ }
2296
+ ],
2297
+ "isUnique": false,
2298
+ "concurrently": false,
2299
+ "method": "btree",
2300
+ "with": {}
2301
+ },
2302
+ "email_sends_journey_state_id_idx": {
2303
+ "name": "email_sends_journey_state_id_idx",
2304
+ "columns": [
2305
+ {
2306
+ "expression": "journey_state_id",
2307
+ "isExpression": false,
2308
+ "asc": true,
2309
+ "nulls": "last"
2310
+ }
2311
+ ],
2312
+ "isUnique": false,
2313
+ "concurrently": false,
2314
+ "method": "btree",
2315
+ "with": {}
2316
+ },
2317
+ "email_sends_user_id_idx": {
2318
+ "name": "email_sends_user_id_idx",
2319
+ "columns": [
2320
+ {
2321
+ "expression": "user_id",
2322
+ "isExpression": false,
2323
+ "asc": true,
2324
+ "nulls": "last"
2325
+ }
2326
+ ],
2327
+ "isUnique": false,
2328
+ "concurrently": false,
2329
+ "method": "btree",
2330
+ "with": {}
2331
+ },
2332
+ "email_sends_freq_cap_idx": {
2333
+ "name": "email_sends_freq_cap_idx",
2334
+ "columns": [
2335
+ {
2336
+ "expression": "to_email",
2337
+ "isExpression": false,
2338
+ "asc": true,
2339
+ "nulls": "last"
2340
+ },
2341
+ {
2342
+ "expression": "created_at",
2343
+ "isExpression": false,
2344
+ "asc": true,
2345
+ "nulls": "last"
2346
+ },
2347
+ {
2348
+ "expression": "category",
2349
+ "isExpression": false,
2350
+ "asc": true,
2351
+ "nulls": "last"
2352
+ }
2353
+ ],
2354
+ "isUnique": false,
2355
+ "concurrently": false,
2356
+ "method": "btree",
2357
+ "with": {}
2358
+ },
2359
+ "email_sends_idempotency_key_idx": {
2360
+ "name": "email_sends_idempotency_key_idx",
2361
+ "columns": [
2362
+ {
2363
+ "expression": "idempotency_key",
2364
+ "isExpression": false,
2365
+ "asc": true,
2366
+ "nulls": "last"
2367
+ }
2368
+ ],
2369
+ "isUnique": true,
2370
+ "concurrently": false,
2371
+ "method": "btree",
2372
+ "with": {}
2373
+ }
2374
+ },
2375
+ "foreignKeys": {
2376
+ "email_sends_journey_state_id_journey_states_id_fk": {
2377
+ "name": "email_sends_journey_state_id_journey_states_id_fk",
2378
+ "tableFrom": "email_sends",
2379
+ "tableTo": "journey_states",
2380
+ "columnsFrom": [
2381
+ "journey_state_id"
2382
+ ],
2383
+ "columnsTo": [
2384
+ "id"
2385
+ ],
2386
+ "onDelete": "no action",
2387
+ "onUpdate": "no action"
2388
+ }
2389
+ },
2390
+ "compositePrimaryKeys": {},
2391
+ "uniqueConstraints": {},
2392
+ "policies": {},
2393
+ "checkConstraints": {},
2394
+ "isRLSEnabled": false
2395
+ },
2396
+ "public.import_jobs": {
2397
+ "name": "import_jobs",
2398
+ "schema": "",
2399
+ "columns": {
2400
+ "id": {
2401
+ "name": "id",
2402
+ "type": "uuid",
2403
+ "primaryKey": true,
2404
+ "notNull": true,
2405
+ "default": "gen_random_uuid()"
2406
+ },
2407
+ "file_name": {
2408
+ "name": "file_name",
2409
+ "type": "text",
2410
+ "primaryKey": false,
2411
+ "notNull": false
2412
+ },
2413
+ "format": {
2414
+ "name": "format",
2415
+ "type": "text",
2416
+ "primaryKey": false,
2417
+ "notNull": true
2418
+ },
2419
+ "status": {
2420
+ "name": "status",
2421
+ "type": "import_job_status",
2422
+ "typeSchema": "public",
2423
+ "primaryKey": false,
2424
+ "notNull": true,
2425
+ "default": "'pending'"
2426
+ },
2427
+ "total_rows": {
2428
+ "name": "total_rows",
2429
+ "type": "integer",
2430
+ "primaryKey": false,
2431
+ "notNull": false
2432
+ },
2433
+ "processed_rows": {
2434
+ "name": "processed_rows",
2435
+ "type": "integer",
2436
+ "primaryKey": false,
2437
+ "notNull": true,
2438
+ "default": 0
2439
+ },
2440
+ "failed_rows": {
2441
+ "name": "failed_rows",
2442
+ "type": "integer",
2443
+ "primaryKey": false,
2444
+ "notNull": true,
2445
+ "default": 0
2446
+ },
2447
+ "errors": {
2448
+ "name": "errors",
2449
+ "type": "jsonb",
2450
+ "primaryKey": false,
2451
+ "notNull": false
2452
+ },
2453
+ "created_at": {
2454
+ "name": "created_at",
2455
+ "type": "timestamp with time zone",
2456
+ "primaryKey": false,
2457
+ "notNull": true,
2458
+ "default": "now()"
2459
+ },
2460
+ "updated_at": {
2461
+ "name": "updated_at",
2462
+ "type": "timestamp with time zone",
2463
+ "primaryKey": false,
2464
+ "notNull": true,
2465
+ "default": "now()"
2466
+ }
2467
+ },
2468
+ "indexes": {
2469
+ "import_jobs_status_idx": {
2470
+ "name": "import_jobs_status_idx",
2471
+ "columns": [
2472
+ {
2473
+ "expression": "status",
2474
+ "isExpression": false,
2475
+ "asc": true,
2476
+ "nulls": "last"
2477
+ }
2478
+ ],
2479
+ "isUnique": false,
2480
+ "concurrently": false,
2481
+ "method": "btree",
2482
+ "with": {}
2483
+ }
2484
+ },
2485
+ "foreignKeys": {},
2486
+ "compositePrimaryKeys": {},
2487
+ "uniqueConstraints": {},
2488
+ "policies": {},
2489
+ "checkConstraints": {},
2490
+ "isRLSEnabled": false
2491
+ },
2492
+ "public.journey_configs": {
2493
+ "name": "journey_configs",
2494
+ "schema": "",
2495
+ "columns": {
2496
+ "id": {
2497
+ "name": "id",
2498
+ "type": "uuid",
2499
+ "primaryKey": true,
2500
+ "notNull": true,
2501
+ "default": "gen_random_uuid()"
2502
+ },
2503
+ "journey_id": {
2504
+ "name": "journey_id",
2505
+ "type": "text",
2506
+ "primaryKey": false,
2507
+ "notNull": true
2508
+ },
2509
+ "enabled": {
2510
+ "name": "enabled",
2511
+ "type": "boolean",
2512
+ "primaryKey": false,
2513
+ "notNull": true,
2514
+ "default": true
2515
+ },
2516
+ "created_at": {
2517
+ "name": "created_at",
2518
+ "type": "timestamp with time zone",
2519
+ "primaryKey": false,
2520
+ "notNull": true,
2521
+ "default": "now()"
2522
+ },
2523
+ "updated_at": {
2524
+ "name": "updated_at",
2525
+ "type": "timestamp with time zone",
2526
+ "primaryKey": false,
2527
+ "notNull": true,
2528
+ "default": "now()"
2529
+ }
2530
+ },
2531
+ "indexes": {
2532
+ "journey_configs_journey_id_idx": {
2533
+ "name": "journey_configs_journey_id_idx",
2534
+ "columns": [
2535
+ {
2536
+ "expression": "journey_id",
2537
+ "isExpression": false,
2538
+ "asc": true,
2539
+ "nulls": "last"
2540
+ }
2541
+ ],
2542
+ "isUnique": true,
2543
+ "concurrently": false,
2544
+ "method": "btree",
2545
+ "with": {}
2546
+ }
2547
+ },
2548
+ "foreignKeys": {},
2549
+ "compositePrimaryKeys": {},
2550
+ "uniqueConstraints": {},
2551
+ "policies": {},
2552
+ "checkConstraints": {},
2553
+ "isRLSEnabled": false
2554
+ },
2555
+ "public.journey_logs": {
2556
+ "name": "journey_logs",
2557
+ "schema": "",
2558
+ "columns": {
2559
+ "id": {
2560
+ "name": "id",
2561
+ "type": "uuid",
2562
+ "primaryKey": true,
2563
+ "notNull": true,
2564
+ "default": "gen_random_uuid()"
2565
+ },
2566
+ "journey_state_id": {
2567
+ "name": "journey_state_id",
2568
+ "type": "uuid",
2569
+ "primaryKey": false,
2570
+ "notNull": true
2571
+ },
2572
+ "from_node_id": {
2573
+ "name": "from_node_id",
2574
+ "type": "text",
2575
+ "primaryKey": false,
2576
+ "notNull": false
2577
+ },
2578
+ "to_node_id": {
2579
+ "name": "to_node_id",
2580
+ "type": "text",
2581
+ "primaryKey": false,
2582
+ "notNull": false
2583
+ },
2584
+ "action": {
2585
+ "name": "action",
2586
+ "type": "text",
2587
+ "primaryKey": false,
2588
+ "notNull": true
2589
+ },
2590
+ "detail": {
2591
+ "name": "detail",
2592
+ "type": "jsonb",
2593
+ "primaryKey": false,
2594
+ "notNull": false
2595
+ },
2596
+ "created_at": {
2597
+ "name": "created_at",
2598
+ "type": "timestamp with time zone",
2599
+ "primaryKey": false,
2600
+ "notNull": true,
2601
+ "default": "now()"
2602
+ },
2603
+ "updated_at": {
2604
+ "name": "updated_at",
2605
+ "type": "timestamp with time zone",
2606
+ "primaryKey": false,
2607
+ "notNull": true,
2608
+ "default": "now()"
2609
+ }
2610
+ },
2611
+ "indexes": {
2612
+ "journey_logs_journey_state_id_idx": {
2613
+ "name": "journey_logs_journey_state_id_idx",
2614
+ "columns": [
2615
+ {
2616
+ "expression": "journey_state_id",
2617
+ "isExpression": false,
2618
+ "asc": true,
2619
+ "nulls": "last"
2620
+ }
2621
+ ],
2622
+ "isUnique": false,
2623
+ "concurrently": false,
2624
+ "method": "btree",
2625
+ "with": {}
2626
+ }
2627
+ },
2628
+ "foreignKeys": {
2629
+ "journey_logs_journey_state_id_journey_states_id_fk": {
2630
+ "name": "journey_logs_journey_state_id_journey_states_id_fk",
2631
+ "tableFrom": "journey_logs",
2632
+ "tableTo": "journey_states",
2633
+ "columnsFrom": [
2634
+ "journey_state_id"
2635
+ ],
2636
+ "columnsTo": [
2637
+ "id"
2638
+ ],
2639
+ "onDelete": "cascade",
2640
+ "onUpdate": "no action"
2641
+ }
2642
+ },
2643
+ "compositePrimaryKeys": {},
2644
+ "uniqueConstraints": {},
2645
+ "policies": {},
2646
+ "checkConstraints": {},
2647
+ "isRLSEnabled": false
2648
+ },
2649
+ "public.journey_states": {
2650
+ "name": "journey_states",
2651
+ "schema": "",
2652
+ "columns": {
2653
+ "id": {
2654
+ "name": "id",
2655
+ "type": "uuid",
2656
+ "primaryKey": true,
2657
+ "notNull": true,
2658
+ "default": "gen_random_uuid()"
2659
+ },
2660
+ "organization_id": {
2661
+ "name": "organization_id",
2662
+ "type": "text",
2663
+ "primaryKey": false,
2664
+ "notNull": false
2665
+ },
2666
+ "user_id": {
2667
+ "name": "user_id",
2668
+ "type": "text",
2669
+ "primaryKey": false,
2670
+ "notNull": true
2671
+ },
2672
+ "user_email": {
2673
+ "name": "user_email",
2674
+ "type": "text",
2675
+ "primaryKey": false,
2676
+ "notNull": true
2677
+ },
2678
+ "journey_id": {
2679
+ "name": "journey_id",
2680
+ "type": "text",
2681
+ "primaryKey": false,
2682
+ "notNull": true
2683
+ },
2684
+ "current_node_id": {
2685
+ "name": "current_node_id",
2686
+ "type": "text",
2687
+ "primaryKey": false,
2688
+ "notNull": true
2689
+ },
2690
+ "status": {
2691
+ "name": "status",
2692
+ "type": "journey_status",
2693
+ "typeSchema": "public",
2694
+ "primaryKey": false,
2695
+ "notNull": true,
2696
+ "default": "'active'"
2697
+ },
2698
+ "hatchet_run_id": {
2699
+ "name": "hatchet_run_id",
2700
+ "type": "text",
2701
+ "primaryKey": false,
2702
+ "notNull": false
2703
+ },
2704
+ "context": {
2705
+ "name": "context",
2706
+ "type": "jsonb",
2707
+ "primaryKey": false,
2708
+ "notNull": false,
2709
+ "default": "'{}'::jsonb"
2710
+ },
2711
+ "error_message": {
2712
+ "name": "error_message",
2713
+ "type": "text",
2714
+ "primaryKey": false,
2715
+ "notNull": false
2716
+ },
2717
+ "entry_count": {
2718
+ "name": "entry_count",
2719
+ "type": "integer",
2720
+ "primaryKey": false,
2721
+ "notNull": true,
2722
+ "default": 1
2723
+ },
2724
+ "completed_at": {
2725
+ "name": "completed_at",
2726
+ "type": "timestamp with time zone",
2727
+ "primaryKey": false,
2728
+ "notNull": false
2729
+ },
2730
+ "exited_at": {
2731
+ "name": "exited_at",
2732
+ "type": "timestamp with time zone",
2733
+ "primaryKey": false,
2734
+ "notNull": false
2735
+ },
2736
+ "deleted_at": {
2737
+ "name": "deleted_at",
2738
+ "type": "timestamp with time zone",
2739
+ "primaryKey": false,
2740
+ "notNull": false
2741
+ },
2742
+ "created_at": {
2743
+ "name": "created_at",
2744
+ "type": "timestamp with time zone",
2745
+ "primaryKey": false,
2746
+ "notNull": true,
2747
+ "default": "now()"
2748
+ },
2749
+ "updated_at": {
2750
+ "name": "updated_at",
2751
+ "type": "timestamp with time zone",
2752
+ "primaryKey": false,
2753
+ "notNull": true,
2754
+ "default": "now()"
2755
+ }
2756
+ },
2757
+ "indexes": {
2758
+ "uq_user_journey_active": {
2759
+ "name": "uq_user_journey_active",
2760
+ "columns": [
2761
+ {
2762
+ "expression": "user_id",
2763
+ "isExpression": false,
2764
+ "asc": true,
2765
+ "nulls": "last"
2766
+ },
2767
+ {
2768
+ "expression": "journey_id",
2769
+ "isExpression": false,
2770
+ "asc": true,
2771
+ "nulls": "last"
2772
+ },
2773
+ {
2774
+ "expression": "status",
2775
+ "isExpression": false,
2776
+ "asc": true,
2777
+ "nulls": "last"
2778
+ }
2779
+ ],
2780
+ "isUnique": true,
2781
+ "concurrently": false,
2782
+ "method": "btree",
2783
+ "with": {}
2784
+ },
2785
+ "journey_states_status_idx": {
2786
+ "name": "journey_states_status_idx",
2787
+ "columns": [
2788
+ {
2789
+ "expression": "status",
2790
+ "isExpression": false,
2791
+ "asc": true,
2792
+ "nulls": "last"
2793
+ }
2794
+ ],
2795
+ "isUnique": false,
2796
+ "concurrently": false,
2797
+ "method": "btree",
2798
+ "with": {}
2799
+ },
2800
+ "journey_states_hatchet_run_idx": {
2801
+ "name": "journey_states_hatchet_run_idx",
2802
+ "columns": [
2803
+ {
2804
+ "expression": "hatchet_run_id",
2805
+ "isExpression": false,
2806
+ "asc": true,
2807
+ "nulls": "last"
2808
+ }
2809
+ ],
2810
+ "isUnique": false,
2811
+ "concurrently": false,
2812
+ "method": "btree",
2813
+ "with": {}
2814
+ },
2815
+ "journey_states_user_id_idx": {
2816
+ "name": "journey_states_user_id_idx",
2817
+ "columns": [
2818
+ {
2819
+ "expression": "user_id",
2820
+ "isExpression": false,
2821
+ "asc": true,
2822
+ "nulls": "last"
2823
+ }
2824
+ ],
2825
+ "isUnique": false,
2826
+ "concurrently": false,
2827
+ "method": "btree",
2828
+ "with": {}
2829
+ },
2830
+ "journey_states_journey_id_status_idx": {
2831
+ "name": "journey_states_journey_id_status_idx",
2832
+ "columns": [
2833
+ {
2834
+ "expression": "journey_id",
2835
+ "isExpression": false,
2836
+ "asc": true,
2837
+ "nulls": "last"
2838
+ },
2839
+ {
2840
+ "expression": "status",
2841
+ "isExpression": false,
2842
+ "asc": true,
2843
+ "nulls": "last"
2844
+ }
2845
+ ],
2846
+ "isUnique": false,
2847
+ "concurrently": false,
2848
+ "method": "btree",
2849
+ "with": {}
2850
+ }
2851
+ },
2852
+ "foreignKeys": {},
2853
+ "compositePrimaryKeys": {},
2854
+ "uniqueConstraints": {},
2855
+ "policies": {},
2856
+ "checkConstraints": {},
2857
+ "isRLSEnabled": false
2858
+ },
2859
+ "public.link_clicks": {
2860
+ "name": "link_clicks",
2861
+ "schema": "",
2862
+ "columns": {
2863
+ "id": {
2864
+ "name": "id",
2865
+ "type": "uuid",
2866
+ "primaryKey": true,
2867
+ "notNull": true,
2868
+ "default": "gen_random_uuid()"
2869
+ },
2870
+ "tracked_link_id": {
2871
+ "name": "tracked_link_id",
2872
+ "type": "uuid",
2873
+ "primaryKey": false,
2874
+ "notNull": true
2875
+ },
2876
+ "ip_address": {
2877
+ "name": "ip_address",
2878
+ "type": "text",
2879
+ "primaryKey": false,
2880
+ "notNull": false
2881
+ },
2882
+ "user_agent": {
2883
+ "name": "user_agent",
2884
+ "type": "text",
2885
+ "primaryKey": false,
2886
+ "notNull": false
2887
+ },
2888
+ "clicked_at": {
2889
+ "name": "clicked_at",
2890
+ "type": "timestamp with time zone",
2891
+ "primaryKey": false,
2892
+ "notNull": true,
2893
+ "default": "now()"
2894
+ }
2895
+ },
2896
+ "indexes": {
2897
+ "link_clicks_tracked_link_id_idx": {
2898
+ "name": "link_clicks_tracked_link_id_idx",
2899
+ "columns": [
2900
+ {
2901
+ "expression": "tracked_link_id",
2902
+ "isExpression": false,
2903
+ "asc": true,
2904
+ "nulls": "last"
2905
+ }
2906
+ ],
2907
+ "isUnique": false,
2908
+ "concurrently": false,
2909
+ "method": "btree",
2910
+ "with": {}
2911
+ },
2912
+ "link_clicks_clicked_at_idx": {
2913
+ "name": "link_clicks_clicked_at_idx",
2914
+ "columns": [
2915
+ {
2916
+ "expression": "clicked_at",
2917
+ "isExpression": false,
2918
+ "asc": true,
2919
+ "nulls": "last"
2920
+ }
2921
+ ],
2922
+ "isUnique": false,
2923
+ "concurrently": false,
2924
+ "method": "btree",
2925
+ "with": {}
2926
+ }
2927
+ },
2928
+ "foreignKeys": {
2929
+ "link_clicks_tracked_link_id_tracked_links_id_fk": {
2930
+ "name": "link_clicks_tracked_link_id_tracked_links_id_fk",
2931
+ "tableFrom": "link_clicks",
2932
+ "tableTo": "tracked_links",
2933
+ "columnsFrom": [
2934
+ "tracked_link_id"
2935
+ ],
2936
+ "columnsTo": [
2937
+ "id"
2938
+ ],
2939
+ "onDelete": "cascade",
2940
+ "onUpdate": "no action"
2941
+ }
2942
+ },
2943
+ "compositePrimaryKeys": {},
2944
+ "uniqueConstraints": {},
2945
+ "policies": {},
2946
+ "checkConstraints": {},
2947
+ "isRLSEnabled": false
2948
+ },
2949
+ "public.tracked_links": {
2950
+ "name": "tracked_links",
2951
+ "schema": "",
2952
+ "columns": {
2953
+ "id": {
2954
+ "name": "id",
2955
+ "type": "uuid",
2956
+ "primaryKey": true,
2957
+ "notNull": true,
2958
+ "default": "gen_random_uuid()"
2959
+ },
2960
+ "email_send_id": {
2961
+ "name": "email_send_id",
2962
+ "type": "uuid",
2963
+ "primaryKey": false,
2964
+ "notNull": true
2965
+ },
2966
+ "original_url": {
2967
+ "name": "original_url",
2968
+ "type": "text",
2969
+ "primaryKey": false,
2970
+ "notNull": true
2971
+ },
2972
+ "click_count": {
2973
+ "name": "click_count",
2974
+ "type": "integer",
2975
+ "primaryKey": false,
2976
+ "notNull": true,
2977
+ "default": 0
2978
+ },
2979
+ "created_at": {
2980
+ "name": "created_at",
2981
+ "type": "timestamp with time zone",
2982
+ "primaryKey": false,
2983
+ "notNull": true,
2984
+ "default": "now()"
2985
+ },
2986
+ "updated_at": {
2987
+ "name": "updated_at",
2988
+ "type": "timestamp with time zone",
2989
+ "primaryKey": false,
2990
+ "notNull": true,
2991
+ "default": "now()"
2992
+ }
2993
+ },
2994
+ "indexes": {
2995
+ "tracked_links_email_send_id_idx": {
2996
+ "name": "tracked_links_email_send_id_idx",
2997
+ "columns": [
2998
+ {
2999
+ "expression": "email_send_id",
3000
+ "isExpression": false,
3001
+ "asc": true,
3002
+ "nulls": "last"
3003
+ }
3004
+ ],
3005
+ "isUnique": false,
3006
+ "concurrently": false,
3007
+ "method": "btree",
3008
+ "with": {}
3009
+ }
3010
+ },
3011
+ "foreignKeys": {
3012
+ "tracked_links_email_send_id_email_sends_id_fk": {
3013
+ "name": "tracked_links_email_send_id_email_sends_id_fk",
3014
+ "tableFrom": "tracked_links",
3015
+ "tableTo": "email_sends",
3016
+ "columnsFrom": [
3017
+ "email_send_id"
3018
+ ],
3019
+ "columnsTo": [
3020
+ "id"
3021
+ ],
3022
+ "onDelete": "cascade",
3023
+ "onUpdate": "no action"
3024
+ }
3025
+ },
3026
+ "compositePrimaryKeys": {},
3027
+ "uniqueConstraints": {},
3028
+ "policies": {},
3029
+ "checkConstraints": {},
3030
+ "isRLSEnabled": false
3031
+ },
3032
+ "public.user_events": {
3033
+ "name": "user_events",
3034
+ "schema": "",
3035
+ "columns": {
3036
+ "id": {
3037
+ "name": "id",
3038
+ "type": "uuid",
3039
+ "primaryKey": true,
3040
+ "notNull": true,
3041
+ "default": "gen_random_uuid()"
3042
+ },
3043
+ "organization_id": {
3044
+ "name": "organization_id",
3045
+ "type": "text",
3046
+ "primaryKey": false,
3047
+ "notNull": false
3048
+ },
3049
+ "user_id": {
3050
+ "name": "user_id",
3051
+ "type": "text",
3052
+ "primaryKey": false,
3053
+ "notNull": true
3054
+ },
3055
+ "event": {
3056
+ "name": "event",
3057
+ "type": "text",
3058
+ "primaryKey": false,
3059
+ "notNull": true
3060
+ },
3061
+ "properties": {
3062
+ "name": "properties",
3063
+ "type": "jsonb",
3064
+ "primaryKey": false,
3065
+ "notNull": false
3066
+ },
3067
+ "idempotency_key": {
3068
+ "name": "idempotency_key",
3069
+ "type": "text",
3070
+ "primaryKey": false,
3071
+ "notNull": false
3072
+ },
3073
+ "occurred_at": {
3074
+ "name": "occurred_at",
3075
+ "type": "timestamp with time zone",
3076
+ "primaryKey": false,
3077
+ "notNull": true,
3078
+ "default": "now()"
3079
+ }
3080
+ },
3081
+ "indexes": {
3082
+ "user_events_user_id_idx": {
3083
+ "name": "user_events_user_id_idx",
3084
+ "columns": [
3085
+ {
3086
+ "expression": "user_id",
3087
+ "isExpression": false,
3088
+ "asc": true,
3089
+ "nulls": "last"
3090
+ }
3091
+ ],
3092
+ "isUnique": false,
3093
+ "concurrently": false,
3094
+ "method": "btree",
3095
+ "with": {}
3096
+ },
3097
+ "user_events_event_idx": {
3098
+ "name": "user_events_event_idx",
3099
+ "columns": [
3100
+ {
3101
+ "expression": "event",
3102
+ "isExpression": false,
3103
+ "asc": true,
3104
+ "nulls": "last"
3105
+ }
3106
+ ],
3107
+ "isUnique": false,
3108
+ "concurrently": false,
3109
+ "method": "btree",
3110
+ "with": {}
3111
+ },
3112
+ "user_events_occurred_at_idx": {
3113
+ "name": "user_events_occurred_at_idx",
3114
+ "columns": [
3115
+ {
3116
+ "expression": "occurred_at",
3117
+ "isExpression": false,
3118
+ "asc": true,
3119
+ "nulls": "last"
3120
+ }
3121
+ ],
3122
+ "isUnique": false,
3123
+ "concurrently": false,
3124
+ "method": "btree",
3125
+ "with": {}
3126
+ },
3127
+ "user_events_user_event_occurred_idx": {
3128
+ "name": "user_events_user_event_occurred_idx",
3129
+ "columns": [
3130
+ {
3131
+ "expression": "user_id",
3132
+ "isExpression": false,
3133
+ "asc": true,
3134
+ "nulls": "last"
3135
+ },
3136
+ {
3137
+ "expression": "event",
3138
+ "isExpression": false,
3139
+ "asc": true,
3140
+ "nulls": "last"
3141
+ },
3142
+ {
3143
+ "expression": "occurred_at",
3144
+ "isExpression": false,
3145
+ "asc": true,
3146
+ "nulls": "last"
3147
+ }
3148
+ ],
3149
+ "isUnique": false,
3150
+ "concurrently": false,
3151
+ "method": "btree",
3152
+ "with": {}
3153
+ },
3154
+ "user_events_idempotency_key_idx": {
3155
+ "name": "user_events_idempotency_key_idx",
3156
+ "columns": [
3157
+ {
3158
+ "expression": "idempotency_key",
3159
+ "isExpression": false,
3160
+ "asc": true,
3161
+ "nulls": "last"
3162
+ }
3163
+ ],
3164
+ "isUnique": true,
3165
+ "concurrently": false,
3166
+ "method": "btree",
3167
+ "with": {}
3168
+ }
3169
+ },
3170
+ "foreignKeys": {},
3171
+ "compositePrimaryKeys": {},
3172
+ "uniqueConstraints": {},
3173
+ "policies": {},
3174
+ "checkConstraints": {},
3175
+ "isRLSEnabled": false
3176
+ }
3177
+ },
3178
+ "enums": {
3179
+ "public.alert_channel": {
3180
+ "name": "alert_channel",
3181
+ "schema": "public",
3182
+ "values": [
3183
+ "webhook",
3184
+ "slack",
3185
+ "email"
3186
+ ]
3187
+ },
3188
+ "public.alert_rule_type": {
3189
+ "name": "alert_rule_type",
3190
+ "schema": "public",
3191
+ "values": [
3192
+ "bounce_rate_exceeded",
3193
+ "journey_failure_spike",
3194
+ "delivery_issue",
3195
+ "high_complaint_rate"
3196
+ ]
3197
+ },
3198
+ "public.bucket_membership_status": {
3199
+ "name": "bucket_membership_status",
3200
+ "schema": "public",
3201
+ "values": [
3202
+ "active",
3203
+ "left"
3204
+ ]
3205
+ },
3206
+ "public.dlq_status": {
3207
+ "name": "dlq_status",
3208
+ "schema": "public",
3209
+ "values": [
3210
+ "pending",
3211
+ "retried",
3212
+ "discarded"
3213
+ ]
3214
+ },
3215
+ "public.email_send_status": {
3216
+ "name": "email_send_status",
3217
+ "schema": "public",
3218
+ "values": [
3219
+ "queued",
3220
+ "rendered",
3221
+ "sent",
3222
+ "delivered",
3223
+ "opened",
3224
+ "clicked",
3225
+ "bounced",
3226
+ "complained",
3227
+ "failed"
3228
+ ]
3229
+ },
3230
+ "public.import_job_status": {
3231
+ "name": "import_job_status",
3232
+ "schema": "public",
3233
+ "values": [
3234
+ "pending",
3235
+ "processing",
3236
+ "completed",
3237
+ "failed"
3238
+ ]
3239
+ },
3240
+ "public.journey_status": {
3241
+ "name": "journey_status",
3242
+ "schema": "public",
3243
+ "values": [
3244
+ "active",
3245
+ "waiting",
3246
+ "completed",
3247
+ "failed",
3248
+ "exited"
3249
+ ]
3250
+ }
3251
+ },
3252
+ "schemas": {},
3253
+ "sequences": {},
3254
+ "roles": {},
3255
+ "policies": {},
3256
+ "views": {},
3257
+ "_meta": {
3258
+ "columns": {},
3259
+ "schemas": {},
3260
+ "tables": {}
3261
+ }
3262
+ }