@hogsend/db 0.1.0 → 0.2.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,2521 @@
1
+ {
2
+ "id": "08d0d467-4063-4de6-8dee-8c6003d5248b",
3
+ "prevId": "68c5ea9c-4424-4cd2-a575-e724a8e5be33",
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.contacts": {
1040
+ "name": "contacts",
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
+ "organization_id": {
1051
+ "name": "organization_id",
1052
+ "type": "text",
1053
+ "primaryKey": false,
1054
+ "notNull": false
1055
+ },
1056
+ "external_id": {
1057
+ "name": "external_id",
1058
+ "type": "text",
1059
+ "primaryKey": false,
1060
+ "notNull": true
1061
+ },
1062
+ "email": {
1063
+ "name": "email",
1064
+ "type": "text",
1065
+ "primaryKey": false,
1066
+ "notNull": false
1067
+ },
1068
+ "timezone": {
1069
+ "name": "timezone",
1070
+ "type": "text",
1071
+ "primaryKey": false,
1072
+ "notNull": false
1073
+ },
1074
+ "properties": {
1075
+ "name": "properties",
1076
+ "type": "jsonb",
1077
+ "primaryKey": false,
1078
+ "notNull": false,
1079
+ "default": "'{}'::jsonb"
1080
+ },
1081
+ "first_seen_at": {
1082
+ "name": "first_seen_at",
1083
+ "type": "timestamp with time zone",
1084
+ "primaryKey": false,
1085
+ "notNull": true,
1086
+ "default": "now()"
1087
+ },
1088
+ "last_seen_at": {
1089
+ "name": "last_seen_at",
1090
+ "type": "timestamp with time zone",
1091
+ "primaryKey": false,
1092
+ "notNull": true,
1093
+ "default": "now()"
1094
+ },
1095
+ "deleted_at": {
1096
+ "name": "deleted_at",
1097
+ "type": "timestamp with time zone",
1098
+ "primaryKey": false,
1099
+ "notNull": false
1100
+ },
1101
+ "created_at": {
1102
+ "name": "created_at",
1103
+ "type": "timestamp with time zone",
1104
+ "primaryKey": false,
1105
+ "notNull": true,
1106
+ "default": "now()"
1107
+ },
1108
+ "updated_at": {
1109
+ "name": "updated_at",
1110
+ "type": "timestamp with time zone",
1111
+ "primaryKey": false,
1112
+ "notNull": true,
1113
+ "default": "now()"
1114
+ }
1115
+ },
1116
+ "indexes": {
1117
+ "contacts_email_idx": {
1118
+ "name": "contacts_email_idx",
1119
+ "columns": [
1120
+ {
1121
+ "expression": "email",
1122
+ "isExpression": false,
1123
+ "asc": true,
1124
+ "nulls": "last"
1125
+ }
1126
+ ],
1127
+ "isUnique": false,
1128
+ "concurrently": false,
1129
+ "method": "btree",
1130
+ "with": {}
1131
+ }
1132
+ },
1133
+ "foreignKeys": {},
1134
+ "compositePrimaryKeys": {},
1135
+ "uniqueConstraints": {
1136
+ "contacts_external_id_unique": {
1137
+ "name": "contacts_external_id_unique",
1138
+ "nullsNotDistinct": false,
1139
+ "columns": [
1140
+ "external_id"
1141
+ ]
1142
+ }
1143
+ },
1144
+ "policies": {},
1145
+ "checkConstraints": {},
1146
+ "isRLSEnabled": false
1147
+ },
1148
+ "public.dead_letter_queue": {
1149
+ "name": "dead_letter_queue",
1150
+ "schema": "",
1151
+ "columns": {
1152
+ "id": {
1153
+ "name": "id",
1154
+ "type": "uuid",
1155
+ "primaryKey": true,
1156
+ "notNull": true,
1157
+ "default": "gen_random_uuid()"
1158
+ },
1159
+ "source": {
1160
+ "name": "source",
1161
+ "type": "text",
1162
+ "primaryKey": false,
1163
+ "notNull": true
1164
+ },
1165
+ "source_id": {
1166
+ "name": "source_id",
1167
+ "type": "text",
1168
+ "primaryKey": false,
1169
+ "notNull": false
1170
+ },
1171
+ "payload": {
1172
+ "name": "payload",
1173
+ "type": "jsonb",
1174
+ "primaryKey": false,
1175
+ "notNull": true
1176
+ },
1177
+ "error": {
1178
+ "name": "error",
1179
+ "type": "text",
1180
+ "primaryKey": false,
1181
+ "notNull": true
1182
+ },
1183
+ "retry_count": {
1184
+ "name": "retry_count",
1185
+ "type": "integer",
1186
+ "primaryKey": false,
1187
+ "notNull": true,
1188
+ "default": 0
1189
+ },
1190
+ "status": {
1191
+ "name": "status",
1192
+ "type": "dlq_status",
1193
+ "typeSchema": "public",
1194
+ "primaryKey": false,
1195
+ "notNull": true,
1196
+ "default": "'pending'"
1197
+ },
1198
+ "retried_at": {
1199
+ "name": "retried_at",
1200
+ "type": "timestamp with time zone",
1201
+ "primaryKey": false,
1202
+ "notNull": false
1203
+ },
1204
+ "created_at": {
1205
+ "name": "created_at",
1206
+ "type": "timestamp with time zone",
1207
+ "primaryKey": false,
1208
+ "notNull": true,
1209
+ "default": "now()"
1210
+ },
1211
+ "updated_at": {
1212
+ "name": "updated_at",
1213
+ "type": "timestamp with time zone",
1214
+ "primaryKey": false,
1215
+ "notNull": true,
1216
+ "default": "now()"
1217
+ }
1218
+ },
1219
+ "indexes": {
1220
+ "dlq_source_idx": {
1221
+ "name": "dlq_source_idx",
1222
+ "columns": [
1223
+ {
1224
+ "expression": "source",
1225
+ "isExpression": false,
1226
+ "asc": true,
1227
+ "nulls": "last"
1228
+ }
1229
+ ],
1230
+ "isUnique": false,
1231
+ "concurrently": false,
1232
+ "method": "btree",
1233
+ "with": {}
1234
+ },
1235
+ "dlq_status_idx": {
1236
+ "name": "dlq_status_idx",
1237
+ "columns": [
1238
+ {
1239
+ "expression": "status",
1240
+ "isExpression": false,
1241
+ "asc": true,
1242
+ "nulls": "last"
1243
+ }
1244
+ ],
1245
+ "isUnique": false,
1246
+ "concurrently": false,
1247
+ "method": "btree",
1248
+ "with": {}
1249
+ },
1250
+ "dlq_created_at_idx": {
1251
+ "name": "dlq_created_at_idx",
1252
+ "columns": [
1253
+ {
1254
+ "expression": "created_at",
1255
+ "isExpression": false,
1256
+ "asc": true,
1257
+ "nulls": "last"
1258
+ }
1259
+ ],
1260
+ "isUnique": false,
1261
+ "concurrently": false,
1262
+ "method": "btree",
1263
+ "with": {}
1264
+ }
1265
+ },
1266
+ "foreignKeys": {},
1267
+ "compositePrimaryKeys": {},
1268
+ "uniqueConstraints": {},
1269
+ "policies": {},
1270
+ "checkConstraints": {},
1271
+ "isRLSEnabled": false
1272
+ },
1273
+ "public.email_preferences": {
1274
+ "name": "email_preferences",
1275
+ "schema": "",
1276
+ "columns": {
1277
+ "id": {
1278
+ "name": "id",
1279
+ "type": "uuid",
1280
+ "primaryKey": true,
1281
+ "notNull": true,
1282
+ "default": "gen_random_uuid()"
1283
+ },
1284
+ "user_id": {
1285
+ "name": "user_id",
1286
+ "type": "text",
1287
+ "primaryKey": false,
1288
+ "notNull": true
1289
+ },
1290
+ "email": {
1291
+ "name": "email",
1292
+ "type": "text",
1293
+ "primaryKey": false,
1294
+ "notNull": true
1295
+ },
1296
+ "unsubscribed_all": {
1297
+ "name": "unsubscribed_all",
1298
+ "type": "boolean",
1299
+ "primaryKey": false,
1300
+ "notNull": true,
1301
+ "default": false
1302
+ },
1303
+ "suppressed": {
1304
+ "name": "suppressed",
1305
+ "type": "boolean",
1306
+ "primaryKey": false,
1307
+ "notNull": true,
1308
+ "default": false
1309
+ },
1310
+ "bounce_count": {
1311
+ "name": "bounce_count",
1312
+ "type": "integer",
1313
+ "primaryKey": false,
1314
+ "notNull": true,
1315
+ "default": 0
1316
+ },
1317
+ "categories": {
1318
+ "name": "categories",
1319
+ "type": "jsonb",
1320
+ "primaryKey": false,
1321
+ "notNull": false,
1322
+ "default": "'{}'::jsonb"
1323
+ },
1324
+ "suppressed_at": {
1325
+ "name": "suppressed_at",
1326
+ "type": "timestamp with time zone",
1327
+ "primaryKey": false,
1328
+ "notNull": false
1329
+ },
1330
+ "last_bounce_at": {
1331
+ "name": "last_bounce_at",
1332
+ "type": "timestamp with time zone",
1333
+ "primaryKey": false,
1334
+ "notNull": false
1335
+ },
1336
+ "created_at": {
1337
+ "name": "created_at",
1338
+ "type": "timestamp with time zone",
1339
+ "primaryKey": false,
1340
+ "notNull": true,
1341
+ "default": "now()"
1342
+ },
1343
+ "updated_at": {
1344
+ "name": "updated_at",
1345
+ "type": "timestamp with time zone",
1346
+ "primaryKey": false,
1347
+ "notNull": true,
1348
+ "default": "now()"
1349
+ }
1350
+ },
1351
+ "indexes": {
1352
+ "email_preferences_user_email_idx": {
1353
+ "name": "email_preferences_user_email_idx",
1354
+ "columns": [
1355
+ {
1356
+ "expression": "user_id",
1357
+ "isExpression": false,
1358
+ "asc": true,
1359
+ "nulls": "last"
1360
+ },
1361
+ {
1362
+ "expression": "email",
1363
+ "isExpression": false,
1364
+ "asc": true,
1365
+ "nulls": "last"
1366
+ }
1367
+ ],
1368
+ "isUnique": true,
1369
+ "concurrently": false,
1370
+ "method": "btree",
1371
+ "with": {}
1372
+ }
1373
+ },
1374
+ "foreignKeys": {},
1375
+ "compositePrimaryKeys": {},
1376
+ "uniqueConstraints": {},
1377
+ "policies": {},
1378
+ "checkConstraints": {},
1379
+ "isRLSEnabled": false
1380
+ },
1381
+ "public.email_sends": {
1382
+ "name": "email_sends",
1383
+ "schema": "",
1384
+ "columns": {
1385
+ "id": {
1386
+ "name": "id",
1387
+ "type": "uuid",
1388
+ "primaryKey": true,
1389
+ "notNull": true,
1390
+ "default": "gen_random_uuid()"
1391
+ },
1392
+ "organization_id": {
1393
+ "name": "organization_id",
1394
+ "type": "text",
1395
+ "primaryKey": false,
1396
+ "notNull": false
1397
+ },
1398
+ "journey_state_id": {
1399
+ "name": "journey_state_id",
1400
+ "type": "uuid",
1401
+ "primaryKey": false,
1402
+ "notNull": false
1403
+ },
1404
+ "user_id": {
1405
+ "name": "user_id",
1406
+ "type": "text",
1407
+ "primaryKey": false,
1408
+ "notNull": false
1409
+ },
1410
+ "user_email": {
1411
+ "name": "user_email",
1412
+ "type": "text",
1413
+ "primaryKey": false,
1414
+ "notNull": false
1415
+ },
1416
+ "template_key": {
1417
+ "name": "template_key",
1418
+ "type": "text",
1419
+ "primaryKey": false,
1420
+ "notNull": false
1421
+ },
1422
+ "resend_id": {
1423
+ "name": "resend_id",
1424
+ "type": "text",
1425
+ "primaryKey": false,
1426
+ "notNull": false
1427
+ },
1428
+ "from_email": {
1429
+ "name": "from_email",
1430
+ "type": "text",
1431
+ "primaryKey": false,
1432
+ "notNull": true
1433
+ },
1434
+ "to_email": {
1435
+ "name": "to_email",
1436
+ "type": "text",
1437
+ "primaryKey": false,
1438
+ "notNull": true
1439
+ },
1440
+ "subject": {
1441
+ "name": "subject",
1442
+ "type": "text",
1443
+ "primaryKey": false,
1444
+ "notNull": true
1445
+ },
1446
+ "category": {
1447
+ "name": "category",
1448
+ "type": "text",
1449
+ "primaryKey": false,
1450
+ "notNull": false
1451
+ },
1452
+ "status": {
1453
+ "name": "status",
1454
+ "type": "email_send_status",
1455
+ "typeSchema": "public",
1456
+ "primaryKey": false,
1457
+ "notNull": true,
1458
+ "default": "'queued'"
1459
+ },
1460
+ "sent_at": {
1461
+ "name": "sent_at",
1462
+ "type": "timestamp with time zone",
1463
+ "primaryKey": false,
1464
+ "notNull": false
1465
+ },
1466
+ "delivered_at": {
1467
+ "name": "delivered_at",
1468
+ "type": "timestamp with time zone",
1469
+ "primaryKey": false,
1470
+ "notNull": false
1471
+ },
1472
+ "opened_at": {
1473
+ "name": "opened_at",
1474
+ "type": "timestamp with time zone",
1475
+ "primaryKey": false,
1476
+ "notNull": false
1477
+ },
1478
+ "clicked_at": {
1479
+ "name": "clicked_at",
1480
+ "type": "timestamp with time zone",
1481
+ "primaryKey": false,
1482
+ "notNull": false
1483
+ },
1484
+ "bounced_at": {
1485
+ "name": "bounced_at",
1486
+ "type": "timestamp with time zone",
1487
+ "primaryKey": false,
1488
+ "notNull": false
1489
+ },
1490
+ "complained_at": {
1491
+ "name": "complained_at",
1492
+ "type": "timestamp with time zone",
1493
+ "primaryKey": false,
1494
+ "notNull": false
1495
+ },
1496
+ "bounce_type": {
1497
+ "name": "bounce_type",
1498
+ "type": "text",
1499
+ "primaryKey": false,
1500
+ "notNull": false
1501
+ },
1502
+ "bounce_reason": {
1503
+ "name": "bounce_reason",
1504
+ "type": "text",
1505
+ "primaryKey": false,
1506
+ "notNull": false
1507
+ },
1508
+ "created_at": {
1509
+ "name": "created_at",
1510
+ "type": "timestamp with time zone",
1511
+ "primaryKey": false,
1512
+ "notNull": true,
1513
+ "default": "now()"
1514
+ },
1515
+ "updated_at": {
1516
+ "name": "updated_at",
1517
+ "type": "timestamp with time zone",
1518
+ "primaryKey": false,
1519
+ "notNull": true,
1520
+ "default": "now()"
1521
+ }
1522
+ },
1523
+ "indexes": {
1524
+ "email_sends_to_email_idx": {
1525
+ "name": "email_sends_to_email_idx",
1526
+ "columns": [
1527
+ {
1528
+ "expression": "to_email",
1529
+ "isExpression": false,
1530
+ "asc": true,
1531
+ "nulls": "last"
1532
+ }
1533
+ ],
1534
+ "isUnique": false,
1535
+ "concurrently": false,
1536
+ "method": "btree",
1537
+ "with": {}
1538
+ },
1539
+ "email_sends_template_key_idx": {
1540
+ "name": "email_sends_template_key_idx",
1541
+ "columns": [
1542
+ {
1543
+ "expression": "template_key",
1544
+ "isExpression": false,
1545
+ "asc": true,
1546
+ "nulls": "last"
1547
+ }
1548
+ ],
1549
+ "isUnique": false,
1550
+ "concurrently": false,
1551
+ "method": "btree",
1552
+ "with": {}
1553
+ },
1554
+ "email_sends_status_idx": {
1555
+ "name": "email_sends_status_idx",
1556
+ "columns": [
1557
+ {
1558
+ "expression": "status",
1559
+ "isExpression": false,
1560
+ "asc": true,
1561
+ "nulls": "last"
1562
+ }
1563
+ ],
1564
+ "isUnique": false,
1565
+ "concurrently": false,
1566
+ "method": "btree",
1567
+ "with": {}
1568
+ },
1569
+ "email_sends_created_at_idx": {
1570
+ "name": "email_sends_created_at_idx",
1571
+ "columns": [
1572
+ {
1573
+ "expression": "created_at",
1574
+ "isExpression": false,
1575
+ "asc": true,
1576
+ "nulls": "last"
1577
+ }
1578
+ ],
1579
+ "isUnique": false,
1580
+ "concurrently": false,
1581
+ "method": "btree",
1582
+ "with": {}
1583
+ },
1584
+ "email_sends_journey_state_id_idx": {
1585
+ "name": "email_sends_journey_state_id_idx",
1586
+ "columns": [
1587
+ {
1588
+ "expression": "journey_state_id",
1589
+ "isExpression": false,
1590
+ "asc": true,
1591
+ "nulls": "last"
1592
+ }
1593
+ ],
1594
+ "isUnique": false,
1595
+ "concurrently": false,
1596
+ "method": "btree",
1597
+ "with": {}
1598
+ },
1599
+ "email_sends_user_id_idx": {
1600
+ "name": "email_sends_user_id_idx",
1601
+ "columns": [
1602
+ {
1603
+ "expression": "user_id",
1604
+ "isExpression": false,
1605
+ "asc": true,
1606
+ "nulls": "last"
1607
+ }
1608
+ ],
1609
+ "isUnique": false,
1610
+ "concurrently": false,
1611
+ "method": "btree",
1612
+ "with": {}
1613
+ },
1614
+ "email_sends_freq_cap_idx": {
1615
+ "name": "email_sends_freq_cap_idx",
1616
+ "columns": [
1617
+ {
1618
+ "expression": "to_email",
1619
+ "isExpression": false,
1620
+ "asc": true,
1621
+ "nulls": "last"
1622
+ },
1623
+ {
1624
+ "expression": "created_at",
1625
+ "isExpression": false,
1626
+ "asc": true,
1627
+ "nulls": "last"
1628
+ },
1629
+ {
1630
+ "expression": "category",
1631
+ "isExpression": false,
1632
+ "asc": true,
1633
+ "nulls": "last"
1634
+ }
1635
+ ],
1636
+ "isUnique": false,
1637
+ "concurrently": false,
1638
+ "method": "btree",
1639
+ "with": {}
1640
+ }
1641
+ },
1642
+ "foreignKeys": {
1643
+ "email_sends_journey_state_id_journey_states_id_fk": {
1644
+ "name": "email_sends_journey_state_id_journey_states_id_fk",
1645
+ "tableFrom": "email_sends",
1646
+ "tableTo": "journey_states",
1647
+ "columnsFrom": [
1648
+ "journey_state_id"
1649
+ ],
1650
+ "columnsTo": [
1651
+ "id"
1652
+ ],
1653
+ "onDelete": "no action",
1654
+ "onUpdate": "no action"
1655
+ }
1656
+ },
1657
+ "compositePrimaryKeys": {},
1658
+ "uniqueConstraints": {},
1659
+ "policies": {},
1660
+ "checkConstraints": {},
1661
+ "isRLSEnabled": false
1662
+ },
1663
+ "public.import_jobs": {
1664
+ "name": "import_jobs",
1665
+ "schema": "",
1666
+ "columns": {
1667
+ "id": {
1668
+ "name": "id",
1669
+ "type": "uuid",
1670
+ "primaryKey": true,
1671
+ "notNull": true,
1672
+ "default": "gen_random_uuid()"
1673
+ },
1674
+ "file_name": {
1675
+ "name": "file_name",
1676
+ "type": "text",
1677
+ "primaryKey": false,
1678
+ "notNull": false
1679
+ },
1680
+ "format": {
1681
+ "name": "format",
1682
+ "type": "text",
1683
+ "primaryKey": false,
1684
+ "notNull": true
1685
+ },
1686
+ "status": {
1687
+ "name": "status",
1688
+ "type": "import_job_status",
1689
+ "typeSchema": "public",
1690
+ "primaryKey": false,
1691
+ "notNull": true,
1692
+ "default": "'pending'"
1693
+ },
1694
+ "total_rows": {
1695
+ "name": "total_rows",
1696
+ "type": "integer",
1697
+ "primaryKey": false,
1698
+ "notNull": false
1699
+ },
1700
+ "processed_rows": {
1701
+ "name": "processed_rows",
1702
+ "type": "integer",
1703
+ "primaryKey": false,
1704
+ "notNull": true,
1705
+ "default": 0
1706
+ },
1707
+ "failed_rows": {
1708
+ "name": "failed_rows",
1709
+ "type": "integer",
1710
+ "primaryKey": false,
1711
+ "notNull": true,
1712
+ "default": 0
1713
+ },
1714
+ "errors": {
1715
+ "name": "errors",
1716
+ "type": "jsonb",
1717
+ "primaryKey": false,
1718
+ "notNull": false
1719
+ },
1720
+ "created_at": {
1721
+ "name": "created_at",
1722
+ "type": "timestamp with time zone",
1723
+ "primaryKey": false,
1724
+ "notNull": true,
1725
+ "default": "now()"
1726
+ },
1727
+ "updated_at": {
1728
+ "name": "updated_at",
1729
+ "type": "timestamp with time zone",
1730
+ "primaryKey": false,
1731
+ "notNull": true,
1732
+ "default": "now()"
1733
+ }
1734
+ },
1735
+ "indexes": {
1736
+ "import_jobs_status_idx": {
1737
+ "name": "import_jobs_status_idx",
1738
+ "columns": [
1739
+ {
1740
+ "expression": "status",
1741
+ "isExpression": false,
1742
+ "asc": true,
1743
+ "nulls": "last"
1744
+ }
1745
+ ],
1746
+ "isUnique": false,
1747
+ "concurrently": false,
1748
+ "method": "btree",
1749
+ "with": {}
1750
+ }
1751
+ },
1752
+ "foreignKeys": {},
1753
+ "compositePrimaryKeys": {},
1754
+ "uniqueConstraints": {},
1755
+ "policies": {},
1756
+ "checkConstraints": {},
1757
+ "isRLSEnabled": false
1758
+ },
1759
+ "public.journey_configs": {
1760
+ "name": "journey_configs",
1761
+ "schema": "",
1762
+ "columns": {
1763
+ "id": {
1764
+ "name": "id",
1765
+ "type": "uuid",
1766
+ "primaryKey": true,
1767
+ "notNull": true,
1768
+ "default": "gen_random_uuid()"
1769
+ },
1770
+ "journey_id": {
1771
+ "name": "journey_id",
1772
+ "type": "text",
1773
+ "primaryKey": false,
1774
+ "notNull": true
1775
+ },
1776
+ "enabled": {
1777
+ "name": "enabled",
1778
+ "type": "boolean",
1779
+ "primaryKey": false,
1780
+ "notNull": true,
1781
+ "default": true
1782
+ },
1783
+ "created_at": {
1784
+ "name": "created_at",
1785
+ "type": "timestamp with time zone",
1786
+ "primaryKey": false,
1787
+ "notNull": true,
1788
+ "default": "now()"
1789
+ },
1790
+ "updated_at": {
1791
+ "name": "updated_at",
1792
+ "type": "timestamp with time zone",
1793
+ "primaryKey": false,
1794
+ "notNull": true,
1795
+ "default": "now()"
1796
+ }
1797
+ },
1798
+ "indexes": {
1799
+ "journey_configs_journey_id_idx": {
1800
+ "name": "journey_configs_journey_id_idx",
1801
+ "columns": [
1802
+ {
1803
+ "expression": "journey_id",
1804
+ "isExpression": false,
1805
+ "asc": true,
1806
+ "nulls": "last"
1807
+ }
1808
+ ],
1809
+ "isUnique": true,
1810
+ "concurrently": false,
1811
+ "method": "btree",
1812
+ "with": {}
1813
+ }
1814
+ },
1815
+ "foreignKeys": {},
1816
+ "compositePrimaryKeys": {},
1817
+ "uniqueConstraints": {},
1818
+ "policies": {},
1819
+ "checkConstraints": {},
1820
+ "isRLSEnabled": false
1821
+ },
1822
+ "public.journey_logs": {
1823
+ "name": "journey_logs",
1824
+ "schema": "",
1825
+ "columns": {
1826
+ "id": {
1827
+ "name": "id",
1828
+ "type": "uuid",
1829
+ "primaryKey": true,
1830
+ "notNull": true,
1831
+ "default": "gen_random_uuid()"
1832
+ },
1833
+ "journey_state_id": {
1834
+ "name": "journey_state_id",
1835
+ "type": "uuid",
1836
+ "primaryKey": false,
1837
+ "notNull": true
1838
+ },
1839
+ "from_node_id": {
1840
+ "name": "from_node_id",
1841
+ "type": "text",
1842
+ "primaryKey": false,
1843
+ "notNull": false
1844
+ },
1845
+ "to_node_id": {
1846
+ "name": "to_node_id",
1847
+ "type": "text",
1848
+ "primaryKey": false,
1849
+ "notNull": false
1850
+ },
1851
+ "action": {
1852
+ "name": "action",
1853
+ "type": "text",
1854
+ "primaryKey": false,
1855
+ "notNull": true
1856
+ },
1857
+ "detail": {
1858
+ "name": "detail",
1859
+ "type": "jsonb",
1860
+ "primaryKey": false,
1861
+ "notNull": false
1862
+ },
1863
+ "created_at": {
1864
+ "name": "created_at",
1865
+ "type": "timestamp with time zone",
1866
+ "primaryKey": false,
1867
+ "notNull": true,
1868
+ "default": "now()"
1869
+ },
1870
+ "updated_at": {
1871
+ "name": "updated_at",
1872
+ "type": "timestamp with time zone",
1873
+ "primaryKey": false,
1874
+ "notNull": true,
1875
+ "default": "now()"
1876
+ }
1877
+ },
1878
+ "indexes": {
1879
+ "journey_logs_journey_state_id_idx": {
1880
+ "name": "journey_logs_journey_state_id_idx",
1881
+ "columns": [
1882
+ {
1883
+ "expression": "journey_state_id",
1884
+ "isExpression": false,
1885
+ "asc": true,
1886
+ "nulls": "last"
1887
+ }
1888
+ ],
1889
+ "isUnique": false,
1890
+ "concurrently": false,
1891
+ "method": "btree",
1892
+ "with": {}
1893
+ }
1894
+ },
1895
+ "foreignKeys": {
1896
+ "journey_logs_journey_state_id_journey_states_id_fk": {
1897
+ "name": "journey_logs_journey_state_id_journey_states_id_fk",
1898
+ "tableFrom": "journey_logs",
1899
+ "tableTo": "journey_states",
1900
+ "columnsFrom": [
1901
+ "journey_state_id"
1902
+ ],
1903
+ "columnsTo": [
1904
+ "id"
1905
+ ],
1906
+ "onDelete": "cascade",
1907
+ "onUpdate": "no action"
1908
+ }
1909
+ },
1910
+ "compositePrimaryKeys": {},
1911
+ "uniqueConstraints": {},
1912
+ "policies": {},
1913
+ "checkConstraints": {},
1914
+ "isRLSEnabled": false
1915
+ },
1916
+ "public.journey_states": {
1917
+ "name": "journey_states",
1918
+ "schema": "",
1919
+ "columns": {
1920
+ "id": {
1921
+ "name": "id",
1922
+ "type": "uuid",
1923
+ "primaryKey": true,
1924
+ "notNull": true,
1925
+ "default": "gen_random_uuid()"
1926
+ },
1927
+ "organization_id": {
1928
+ "name": "organization_id",
1929
+ "type": "text",
1930
+ "primaryKey": false,
1931
+ "notNull": false
1932
+ },
1933
+ "user_id": {
1934
+ "name": "user_id",
1935
+ "type": "text",
1936
+ "primaryKey": false,
1937
+ "notNull": true
1938
+ },
1939
+ "user_email": {
1940
+ "name": "user_email",
1941
+ "type": "text",
1942
+ "primaryKey": false,
1943
+ "notNull": true
1944
+ },
1945
+ "journey_id": {
1946
+ "name": "journey_id",
1947
+ "type": "text",
1948
+ "primaryKey": false,
1949
+ "notNull": true
1950
+ },
1951
+ "current_node_id": {
1952
+ "name": "current_node_id",
1953
+ "type": "text",
1954
+ "primaryKey": false,
1955
+ "notNull": true
1956
+ },
1957
+ "status": {
1958
+ "name": "status",
1959
+ "type": "journey_status",
1960
+ "typeSchema": "public",
1961
+ "primaryKey": false,
1962
+ "notNull": true,
1963
+ "default": "'active'"
1964
+ },
1965
+ "hatchet_run_id": {
1966
+ "name": "hatchet_run_id",
1967
+ "type": "text",
1968
+ "primaryKey": false,
1969
+ "notNull": false
1970
+ },
1971
+ "context": {
1972
+ "name": "context",
1973
+ "type": "jsonb",
1974
+ "primaryKey": false,
1975
+ "notNull": false,
1976
+ "default": "'{}'::jsonb"
1977
+ },
1978
+ "error_message": {
1979
+ "name": "error_message",
1980
+ "type": "text",
1981
+ "primaryKey": false,
1982
+ "notNull": false
1983
+ },
1984
+ "entry_count": {
1985
+ "name": "entry_count",
1986
+ "type": "integer",
1987
+ "primaryKey": false,
1988
+ "notNull": true,
1989
+ "default": 1
1990
+ },
1991
+ "completed_at": {
1992
+ "name": "completed_at",
1993
+ "type": "timestamp with time zone",
1994
+ "primaryKey": false,
1995
+ "notNull": false
1996
+ },
1997
+ "exited_at": {
1998
+ "name": "exited_at",
1999
+ "type": "timestamp with time zone",
2000
+ "primaryKey": false,
2001
+ "notNull": false
2002
+ },
2003
+ "deleted_at": {
2004
+ "name": "deleted_at",
2005
+ "type": "timestamp with time zone",
2006
+ "primaryKey": false,
2007
+ "notNull": false
2008
+ },
2009
+ "created_at": {
2010
+ "name": "created_at",
2011
+ "type": "timestamp with time zone",
2012
+ "primaryKey": false,
2013
+ "notNull": true,
2014
+ "default": "now()"
2015
+ },
2016
+ "updated_at": {
2017
+ "name": "updated_at",
2018
+ "type": "timestamp with time zone",
2019
+ "primaryKey": false,
2020
+ "notNull": true,
2021
+ "default": "now()"
2022
+ }
2023
+ },
2024
+ "indexes": {
2025
+ "uq_user_journey_active": {
2026
+ "name": "uq_user_journey_active",
2027
+ "columns": [
2028
+ {
2029
+ "expression": "user_id",
2030
+ "isExpression": false,
2031
+ "asc": true,
2032
+ "nulls": "last"
2033
+ },
2034
+ {
2035
+ "expression": "journey_id",
2036
+ "isExpression": false,
2037
+ "asc": true,
2038
+ "nulls": "last"
2039
+ },
2040
+ {
2041
+ "expression": "status",
2042
+ "isExpression": false,
2043
+ "asc": true,
2044
+ "nulls": "last"
2045
+ }
2046
+ ],
2047
+ "isUnique": true,
2048
+ "concurrently": false,
2049
+ "method": "btree",
2050
+ "with": {}
2051
+ },
2052
+ "journey_states_status_idx": {
2053
+ "name": "journey_states_status_idx",
2054
+ "columns": [
2055
+ {
2056
+ "expression": "status",
2057
+ "isExpression": false,
2058
+ "asc": true,
2059
+ "nulls": "last"
2060
+ }
2061
+ ],
2062
+ "isUnique": false,
2063
+ "concurrently": false,
2064
+ "method": "btree",
2065
+ "with": {}
2066
+ },
2067
+ "journey_states_hatchet_run_idx": {
2068
+ "name": "journey_states_hatchet_run_idx",
2069
+ "columns": [
2070
+ {
2071
+ "expression": "hatchet_run_id",
2072
+ "isExpression": false,
2073
+ "asc": true,
2074
+ "nulls": "last"
2075
+ }
2076
+ ],
2077
+ "isUnique": false,
2078
+ "concurrently": false,
2079
+ "method": "btree",
2080
+ "with": {}
2081
+ },
2082
+ "journey_states_user_id_idx": {
2083
+ "name": "journey_states_user_id_idx",
2084
+ "columns": [
2085
+ {
2086
+ "expression": "user_id",
2087
+ "isExpression": false,
2088
+ "asc": true,
2089
+ "nulls": "last"
2090
+ }
2091
+ ],
2092
+ "isUnique": false,
2093
+ "concurrently": false,
2094
+ "method": "btree",
2095
+ "with": {}
2096
+ },
2097
+ "journey_states_journey_id_status_idx": {
2098
+ "name": "journey_states_journey_id_status_idx",
2099
+ "columns": [
2100
+ {
2101
+ "expression": "journey_id",
2102
+ "isExpression": false,
2103
+ "asc": true,
2104
+ "nulls": "last"
2105
+ },
2106
+ {
2107
+ "expression": "status",
2108
+ "isExpression": false,
2109
+ "asc": true,
2110
+ "nulls": "last"
2111
+ }
2112
+ ],
2113
+ "isUnique": false,
2114
+ "concurrently": false,
2115
+ "method": "btree",
2116
+ "with": {}
2117
+ }
2118
+ },
2119
+ "foreignKeys": {},
2120
+ "compositePrimaryKeys": {},
2121
+ "uniqueConstraints": {},
2122
+ "policies": {},
2123
+ "checkConstraints": {},
2124
+ "isRLSEnabled": false
2125
+ },
2126
+ "public.link_clicks": {
2127
+ "name": "link_clicks",
2128
+ "schema": "",
2129
+ "columns": {
2130
+ "id": {
2131
+ "name": "id",
2132
+ "type": "uuid",
2133
+ "primaryKey": true,
2134
+ "notNull": true,
2135
+ "default": "gen_random_uuid()"
2136
+ },
2137
+ "tracked_link_id": {
2138
+ "name": "tracked_link_id",
2139
+ "type": "uuid",
2140
+ "primaryKey": false,
2141
+ "notNull": true
2142
+ },
2143
+ "ip_address": {
2144
+ "name": "ip_address",
2145
+ "type": "text",
2146
+ "primaryKey": false,
2147
+ "notNull": false
2148
+ },
2149
+ "user_agent": {
2150
+ "name": "user_agent",
2151
+ "type": "text",
2152
+ "primaryKey": false,
2153
+ "notNull": false
2154
+ },
2155
+ "clicked_at": {
2156
+ "name": "clicked_at",
2157
+ "type": "timestamp with time zone",
2158
+ "primaryKey": false,
2159
+ "notNull": true,
2160
+ "default": "now()"
2161
+ }
2162
+ },
2163
+ "indexes": {
2164
+ "link_clicks_tracked_link_id_idx": {
2165
+ "name": "link_clicks_tracked_link_id_idx",
2166
+ "columns": [
2167
+ {
2168
+ "expression": "tracked_link_id",
2169
+ "isExpression": false,
2170
+ "asc": true,
2171
+ "nulls": "last"
2172
+ }
2173
+ ],
2174
+ "isUnique": false,
2175
+ "concurrently": false,
2176
+ "method": "btree",
2177
+ "with": {}
2178
+ },
2179
+ "link_clicks_clicked_at_idx": {
2180
+ "name": "link_clicks_clicked_at_idx",
2181
+ "columns": [
2182
+ {
2183
+ "expression": "clicked_at",
2184
+ "isExpression": false,
2185
+ "asc": true,
2186
+ "nulls": "last"
2187
+ }
2188
+ ],
2189
+ "isUnique": false,
2190
+ "concurrently": false,
2191
+ "method": "btree",
2192
+ "with": {}
2193
+ }
2194
+ },
2195
+ "foreignKeys": {
2196
+ "link_clicks_tracked_link_id_tracked_links_id_fk": {
2197
+ "name": "link_clicks_tracked_link_id_tracked_links_id_fk",
2198
+ "tableFrom": "link_clicks",
2199
+ "tableTo": "tracked_links",
2200
+ "columnsFrom": [
2201
+ "tracked_link_id"
2202
+ ],
2203
+ "columnsTo": [
2204
+ "id"
2205
+ ],
2206
+ "onDelete": "cascade",
2207
+ "onUpdate": "no action"
2208
+ }
2209
+ },
2210
+ "compositePrimaryKeys": {},
2211
+ "uniqueConstraints": {},
2212
+ "policies": {},
2213
+ "checkConstraints": {},
2214
+ "isRLSEnabled": false
2215
+ },
2216
+ "public.tracked_links": {
2217
+ "name": "tracked_links",
2218
+ "schema": "",
2219
+ "columns": {
2220
+ "id": {
2221
+ "name": "id",
2222
+ "type": "uuid",
2223
+ "primaryKey": true,
2224
+ "notNull": true,
2225
+ "default": "gen_random_uuid()"
2226
+ },
2227
+ "email_send_id": {
2228
+ "name": "email_send_id",
2229
+ "type": "uuid",
2230
+ "primaryKey": false,
2231
+ "notNull": true
2232
+ },
2233
+ "original_url": {
2234
+ "name": "original_url",
2235
+ "type": "text",
2236
+ "primaryKey": false,
2237
+ "notNull": true
2238
+ },
2239
+ "click_count": {
2240
+ "name": "click_count",
2241
+ "type": "integer",
2242
+ "primaryKey": false,
2243
+ "notNull": true,
2244
+ "default": 0
2245
+ },
2246
+ "created_at": {
2247
+ "name": "created_at",
2248
+ "type": "timestamp with time zone",
2249
+ "primaryKey": false,
2250
+ "notNull": true,
2251
+ "default": "now()"
2252
+ },
2253
+ "updated_at": {
2254
+ "name": "updated_at",
2255
+ "type": "timestamp with time zone",
2256
+ "primaryKey": false,
2257
+ "notNull": true,
2258
+ "default": "now()"
2259
+ }
2260
+ },
2261
+ "indexes": {
2262
+ "tracked_links_email_send_id_idx": {
2263
+ "name": "tracked_links_email_send_id_idx",
2264
+ "columns": [
2265
+ {
2266
+ "expression": "email_send_id",
2267
+ "isExpression": false,
2268
+ "asc": true,
2269
+ "nulls": "last"
2270
+ }
2271
+ ],
2272
+ "isUnique": false,
2273
+ "concurrently": false,
2274
+ "method": "btree",
2275
+ "with": {}
2276
+ }
2277
+ },
2278
+ "foreignKeys": {
2279
+ "tracked_links_email_send_id_email_sends_id_fk": {
2280
+ "name": "tracked_links_email_send_id_email_sends_id_fk",
2281
+ "tableFrom": "tracked_links",
2282
+ "tableTo": "email_sends",
2283
+ "columnsFrom": [
2284
+ "email_send_id"
2285
+ ],
2286
+ "columnsTo": [
2287
+ "id"
2288
+ ],
2289
+ "onDelete": "cascade",
2290
+ "onUpdate": "no action"
2291
+ }
2292
+ },
2293
+ "compositePrimaryKeys": {},
2294
+ "uniqueConstraints": {},
2295
+ "policies": {},
2296
+ "checkConstraints": {},
2297
+ "isRLSEnabled": false
2298
+ },
2299
+ "public.user_events": {
2300
+ "name": "user_events",
2301
+ "schema": "",
2302
+ "columns": {
2303
+ "id": {
2304
+ "name": "id",
2305
+ "type": "uuid",
2306
+ "primaryKey": true,
2307
+ "notNull": true,
2308
+ "default": "gen_random_uuid()"
2309
+ },
2310
+ "organization_id": {
2311
+ "name": "organization_id",
2312
+ "type": "text",
2313
+ "primaryKey": false,
2314
+ "notNull": false
2315
+ },
2316
+ "user_id": {
2317
+ "name": "user_id",
2318
+ "type": "text",
2319
+ "primaryKey": false,
2320
+ "notNull": true
2321
+ },
2322
+ "event": {
2323
+ "name": "event",
2324
+ "type": "text",
2325
+ "primaryKey": false,
2326
+ "notNull": true
2327
+ },
2328
+ "properties": {
2329
+ "name": "properties",
2330
+ "type": "jsonb",
2331
+ "primaryKey": false,
2332
+ "notNull": false
2333
+ },
2334
+ "idempotency_key": {
2335
+ "name": "idempotency_key",
2336
+ "type": "text",
2337
+ "primaryKey": false,
2338
+ "notNull": false
2339
+ },
2340
+ "occurred_at": {
2341
+ "name": "occurred_at",
2342
+ "type": "timestamp with time zone",
2343
+ "primaryKey": false,
2344
+ "notNull": true,
2345
+ "default": "now()"
2346
+ }
2347
+ },
2348
+ "indexes": {
2349
+ "user_events_user_id_idx": {
2350
+ "name": "user_events_user_id_idx",
2351
+ "columns": [
2352
+ {
2353
+ "expression": "user_id",
2354
+ "isExpression": false,
2355
+ "asc": true,
2356
+ "nulls": "last"
2357
+ }
2358
+ ],
2359
+ "isUnique": false,
2360
+ "concurrently": false,
2361
+ "method": "btree",
2362
+ "with": {}
2363
+ },
2364
+ "user_events_event_idx": {
2365
+ "name": "user_events_event_idx",
2366
+ "columns": [
2367
+ {
2368
+ "expression": "event",
2369
+ "isExpression": false,
2370
+ "asc": true,
2371
+ "nulls": "last"
2372
+ }
2373
+ ],
2374
+ "isUnique": false,
2375
+ "concurrently": false,
2376
+ "method": "btree",
2377
+ "with": {}
2378
+ },
2379
+ "user_events_occurred_at_idx": {
2380
+ "name": "user_events_occurred_at_idx",
2381
+ "columns": [
2382
+ {
2383
+ "expression": "occurred_at",
2384
+ "isExpression": false,
2385
+ "asc": true,
2386
+ "nulls": "last"
2387
+ }
2388
+ ],
2389
+ "isUnique": false,
2390
+ "concurrently": false,
2391
+ "method": "btree",
2392
+ "with": {}
2393
+ },
2394
+ "user_events_user_event_occurred_idx": {
2395
+ "name": "user_events_user_event_occurred_idx",
2396
+ "columns": [
2397
+ {
2398
+ "expression": "user_id",
2399
+ "isExpression": false,
2400
+ "asc": true,
2401
+ "nulls": "last"
2402
+ },
2403
+ {
2404
+ "expression": "event",
2405
+ "isExpression": false,
2406
+ "asc": true,
2407
+ "nulls": "last"
2408
+ },
2409
+ {
2410
+ "expression": "occurred_at",
2411
+ "isExpression": false,
2412
+ "asc": true,
2413
+ "nulls": "last"
2414
+ }
2415
+ ],
2416
+ "isUnique": false,
2417
+ "concurrently": false,
2418
+ "method": "btree",
2419
+ "with": {}
2420
+ },
2421
+ "user_events_idempotency_key_idx": {
2422
+ "name": "user_events_idempotency_key_idx",
2423
+ "columns": [
2424
+ {
2425
+ "expression": "idempotency_key",
2426
+ "isExpression": false,
2427
+ "asc": true,
2428
+ "nulls": "last"
2429
+ }
2430
+ ],
2431
+ "isUnique": true,
2432
+ "concurrently": false,
2433
+ "method": "btree",
2434
+ "with": {}
2435
+ }
2436
+ },
2437
+ "foreignKeys": {},
2438
+ "compositePrimaryKeys": {},
2439
+ "uniqueConstraints": {},
2440
+ "policies": {},
2441
+ "checkConstraints": {},
2442
+ "isRLSEnabled": false
2443
+ }
2444
+ },
2445
+ "enums": {
2446
+ "public.alert_channel": {
2447
+ "name": "alert_channel",
2448
+ "schema": "public",
2449
+ "values": [
2450
+ "webhook",
2451
+ "slack",
2452
+ "email"
2453
+ ]
2454
+ },
2455
+ "public.alert_rule_type": {
2456
+ "name": "alert_rule_type",
2457
+ "schema": "public",
2458
+ "values": [
2459
+ "bounce_rate_exceeded",
2460
+ "journey_failure_spike",
2461
+ "delivery_issue",
2462
+ "high_complaint_rate"
2463
+ ]
2464
+ },
2465
+ "public.dlq_status": {
2466
+ "name": "dlq_status",
2467
+ "schema": "public",
2468
+ "values": [
2469
+ "pending",
2470
+ "retried",
2471
+ "discarded"
2472
+ ]
2473
+ },
2474
+ "public.email_send_status": {
2475
+ "name": "email_send_status",
2476
+ "schema": "public",
2477
+ "values": [
2478
+ "queued",
2479
+ "rendered",
2480
+ "sent",
2481
+ "delivered",
2482
+ "opened",
2483
+ "clicked",
2484
+ "bounced",
2485
+ "complained",
2486
+ "failed"
2487
+ ]
2488
+ },
2489
+ "public.import_job_status": {
2490
+ "name": "import_job_status",
2491
+ "schema": "public",
2492
+ "values": [
2493
+ "pending",
2494
+ "processing",
2495
+ "completed",
2496
+ "failed"
2497
+ ]
2498
+ },
2499
+ "public.journey_status": {
2500
+ "name": "journey_status",
2501
+ "schema": "public",
2502
+ "values": [
2503
+ "active",
2504
+ "waiting",
2505
+ "completed",
2506
+ "failed",
2507
+ "exited"
2508
+ ]
2509
+ }
2510
+ },
2511
+ "schemas": {},
2512
+ "sequences": {},
2513
+ "roles": {},
2514
+ "policies": {},
2515
+ "views": {},
2516
+ "_meta": {
2517
+ "columns": {},
2518
+ "schemas": {},
2519
+ "tables": {}
2520
+ }
2521
+ }