@queelabs/db 0.0.1 → 0.0.2

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.
@@ -1,2755 +0,0 @@
1
- {
2
- "id": "8cfb9857-cf91-49cf-ab8d-d307f9cbc591",
3
- "prevId": "00000000-0000-0000-0000-000000000000",
4
- "version": "7",
5
- "dialect": "postgresql",
6
- "tables": {
7
- "public.actor_memberships": {
8
- "name": "actor_memberships",
9
- "schema": "",
10
- "columns": {
11
- "actor_id": {
12
- "name": "actor_id",
13
- "type": "text",
14
- "primaryKey": false,
15
- "notNull": true
16
- },
17
- "marketplace_id": {
18
- "name": "marketplace_id",
19
- "type": "text",
20
- "primaryKey": false,
21
- "notNull": true
22
- },
23
- "role": {
24
- "name": "role",
25
- "type": "text",
26
- "primaryKey": false,
27
- "notNull": true
28
- }
29
- },
30
- "indexes": {},
31
- "foreignKeys": {
32
- "actor_memberships_actor_id_actors_id_fk": {
33
- "name": "actor_memberships_actor_id_actors_id_fk",
34
- "tableFrom": "actor_memberships",
35
- "tableTo": "actors",
36
- "columnsFrom": [
37
- "actor_id"
38
- ],
39
- "columnsTo": [
40
- "id"
41
- ],
42
- "onDelete": "cascade",
43
- "onUpdate": "no action"
44
- },
45
- "actor_memberships_marketplace_id_marketplaces_id_fk": {
46
- "name": "actor_memberships_marketplace_id_marketplaces_id_fk",
47
- "tableFrom": "actor_memberships",
48
- "tableTo": "marketplaces",
49
- "columnsFrom": [
50
- "marketplace_id"
51
- ],
52
- "columnsTo": [
53
- "id"
54
- ],
55
- "onDelete": "cascade",
56
- "onUpdate": "no action"
57
- }
58
- },
59
- "compositePrimaryKeys": {
60
- "actor_memberships_actor_id_marketplace_id_pk": {
61
- "name": "actor_memberships_actor_id_marketplace_id_pk",
62
- "columns": [
63
- "actor_id",
64
- "marketplace_id"
65
- ]
66
- }
67
- },
68
- "uniqueConstraints": {},
69
- "policies": {},
70
- "checkConstraints": {},
71
- "isRLSEnabled": false
72
- },
73
- "public.actors": {
74
- "name": "actors",
75
- "schema": "",
76
- "columns": {
77
- "id": {
78
- "name": "id",
79
- "type": "text",
80
- "primaryKey": true,
81
- "notNull": true
82
- },
83
- "marketplace_id": {
84
- "name": "marketplace_id",
85
- "type": "text",
86
- "primaryKey": false,
87
- "notNull": true
88
- },
89
- "type": {
90
- "name": "type",
91
- "type": "text",
92
- "primaryKey": false,
93
- "notNull": true
94
- },
95
- "display_name": {
96
- "name": "display_name",
97
- "type": "text",
98
- "primaryKey": false,
99
- "notNull": true
100
- },
101
- "metadata": {
102
- "name": "metadata",
103
- "type": "jsonb",
104
- "primaryKey": false,
105
- "notNull": false
106
- },
107
- "created_at": {
108
- "name": "created_at",
109
- "type": "timestamp with time zone",
110
- "primaryKey": false,
111
- "notNull": true,
112
- "default": "now()"
113
- },
114
- "updated_at": {
115
- "name": "updated_at",
116
- "type": "timestamp with time zone",
117
- "primaryKey": false,
118
- "notNull": true,
119
- "default": "now()"
120
- }
121
- },
122
- "indexes": {
123
- "actors_marketplace_idx": {
124
- "name": "actors_marketplace_idx",
125
- "columns": [
126
- {
127
- "expression": "marketplace_id",
128
- "isExpression": false,
129
- "asc": true,
130
- "nulls": "last"
131
- }
132
- ],
133
- "isUnique": false,
134
- "concurrently": false,
135
- "method": "btree",
136
- "with": {}
137
- }
138
- },
139
- "foreignKeys": {
140
- "actors_marketplace_id_marketplaces_id_fk": {
141
- "name": "actors_marketplace_id_marketplaces_id_fk",
142
- "tableFrom": "actors",
143
- "tableTo": "marketplaces",
144
- "columnsFrom": [
145
- "marketplace_id"
146
- ],
147
- "columnsTo": [
148
- "id"
149
- ],
150
- "onDelete": "cascade",
151
- "onUpdate": "no action"
152
- }
153
- },
154
- "compositePrimaryKeys": {},
155
- "uniqueConstraints": {},
156
- "policies": {},
157
- "checkConstraints": {},
158
- "isRLSEnabled": false
159
- },
160
- "public.agent_tokens": {
161
- "name": "agent_tokens",
162
- "schema": "",
163
- "columns": {
164
- "id": {
165
- "name": "id",
166
- "type": "text",
167
- "primaryKey": true,
168
- "notNull": true
169
- },
170
- "marketplace_id": {
171
- "name": "marketplace_id",
172
- "type": "text",
173
- "primaryKey": false,
174
- "notNull": true
175
- },
176
- "actor_id": {
177
- "name": "actor_id",
178
- "type": "text",
179
- "primaryKey": false,
180
- "notNull": false
181
- },
182
- "hashed_token": {
183
- "name": "hashed_token",
184
- "type": "text",
185
- "primaryKey": false,
186
- "notNull": true
187
- },
188
- "label": {
189
- "name": "label",
190
- "type": "text",
191
- "primaryKey": false,
192
- "notNull": false
193
- },
194
- "expires_at": {
195
- "name": "expires_at",
196
- "type": "timestamp with time zone",
197
- "primaryKey": false,
198
- "notNull": false
199
- },
200
- "created_at": {
201
- "name": "created_at",
202
- "type": "timestamp with time zone",
203
- "primaryKey": false,
204
- "notNull": true,
205
- "default": "now()"
206
- }
207
- },
208
- "indexes": {
209
- "agent_tokens_marketplace_idx": {
210
- "name": "agent_tokens_marketplace_idx",
211
- "columns": [
212
- {
213
- "expression": "marketplace_id",
214
- "isExpression": false,
215
- "asc": true,
216
- "nulls": "last"
217
- }
218
- ],
219
- "isUnique": false,
220
- "concurrently": false,
221
- "method": "btree",
222
- "with": {}
223
- }
224
- },
225
- "foreignKeys": {
226
- "agent_tokens_marketplace_id_marketplaces_id_fk": {
227
- "name": "agent_tokens_marketplace_id_marketplaces_id_fk",
228
- "tableFrom": "agent_tokens",
229
- "tableTo": "marketplaces",
230
- "columnsFrom": [
231
- "marketplace_id"
232
- ],
233
- "columnsTo": [
234
- "id"
235
- ],
236
- "onDelete": "cascade",
237
- "onUpdate": "no action"
238
- },
239
- "agent_tokens_actor_id_actors_id_fk": {
240
- "name": "agent_tokens_actor_id_actors_id_fk",
241
- "tableFrom": "agent_tokens",
242
- "tableTo": "actors",
243
- "columnsFrom": [
244
- "actor_id"
245
- ],
246
- "columnsTo": [
247
- "id"
248
- ],
249
- "onDelete": "set null",
250
- "onUpdate": "no action"
251
- }
252
- },
253
- "compositePrimaryKeys": {},
254
- "uniqueConstraints": {},
255
- "policies": {},
256
- "checkConstraints": {},
257
- "isRLSEnabled": false
258
- },
259
- "public.api_keys": {
260
- "name": "api_keys",
261
- "schema": "",
262
- "columns": {
263
- "id": {
264
- "name": "id",
265
- "type": "text",
266
- "primaryKey": true,
267
- "notNull": true
268
- },
269
- "marketplace_id": {
270
- "name": "marketplace_id",
271
- "type": "text",
272
- "primaryKey": false,
273
- "notNull": true
274
- },
275
- "name": {
276
- "name": "name",
277
- "type": "text",
278
- "primaryKey": false,
279
- "notNull": true
280
- },
281
- "hashed_key": {
282
- "name": "hashed_key",
283
- "type": "text",
284
- "primaryKey": false,
285
- "notNull": true
286
- },
287
- "prefix": {
288
- "name": "prefix",
289
- "type": "text",
290
- "primaryKey": false,
291
- "notNull": true
292
- },
293
- "last_used_at": {
294
- "name": "last_used_at",
295
- "type": "timestamp with time zone",
296
- "primaryKey": false,
297
- "notNull": false
298
- },
299
- "created_at": {
300
- "name": "created_at",
301
- "type": "timestamp with time zone",
302
- "primaryKey": false,
303
- "notNull": true,
304
- "default": "now()"
305
- }
306
- },
307
- "indexes": {
308
- "api_keys_marketplace_idx": {
309
- "name": "api_keys_marketplace_idx",
310
- "columns": [
311
- {
312
- "expression": "marketplace_id",
313
- "isExpression": false,
314
- "asc": true,
315
- "nulls": "last"
316
- }
317
- ],
318
- "isUnique": false,
319
- "concurrently": false,
320
- "method": "btree",
321
- "with": {}
322
- }
323
- },
324
- "foreignKeys": {
325
- "api_keys_marketplace_id_marketplaces_id_fk": {
326
- "name": "api_keys_marketplace_id_marketplaces_id_fk",
327
- "tableFrom": "api_keys",
328
- "tableTo": "marketplaces",
329
- "columnsFrom": [
330
- "marketplace_id"
331
- ],
332
- "columnsTo": [
333
- "id"
334
- ],
335
- "onDelete": "cascade",
336
- "onUpdate": "no action"
337
- }
338
- },
339
- "compositePrimaryKeys": {},
340
- "uniqueConstraints": {},
341
- "policies": {},
342
- "checkConstraints": {},
343
- "isRLSEnabled": false
344
- },
345
- "public.audit_logs": {
346
- "name": "audit_logs",
347
- "schema": "",
348
- "columns": {
349
- "id": {
350
- "name": "id",
351
- "type": "text",
352
- "primaryKey": true,
353
- "notNull": true
354
- },
355
- "marketplace_id": {
356
- "name": "marketplace_id",
357
- "type": "text",
358
- "primaryKey": false,
359
- "notNull": false
360
- },
361
- "actor_id": {
362
- "name": "actor_id",
363
- "type": "text",
364
- "primaryKey": false,
365
- "notNull": false
366
- },
367
- "action": {
368
- "name": "action",
369
- "type": "text",
370
- "primaryKey": false,
371
- "notNull": true
372
- },
373
- "resource": {
374
- "name": "resource",
375
- "type": "text",
376
- "primaryKey": false,
377
- "notNull": true
378
- },
379
- "metadata": {
380
- "name": "metadata",
381
- "type": "jsonb",
382
- "primaryKey": false,
383
- "notNull": false
384
- },
385
- "created_at": {
386
- "name": "created_at",
387
- "type": "timestamp with time zone",
388
- "primaryKey": false,
389
- "notNull": true,
390
- "default": "now()"
391
- }
392
- },
393
- "indexes": {
394
- "audit_logs_marketplace_idx": {
395
- "name": "audit_logs_marketplace_idx",
396
- "columns": [
397
- {
398
- "expression": "marketplace_id",
399
- "isExpression": false,
400
- "asc": true,
401
- "nulls": "last"
402
- }
403
- ],
404
- "isUnique": false,
405
- "concurrently": false,
406
- "method": "btree",
407
- "with": {}
408
- }
409
- },
410
- "foreignKeys": {
411
- "audit_logs_marketplace_id_marketplaces_id_fk": {
412
- "name": "audit_logs_marketplace_id_marketplaces_id_fk",
413
- "tableFrom": "audit_logs",
414
- "tableTo": "marketplaces",
415
- "columnsFrom": [
416
- "marketplace_id"
417
- ],
418
- "columnsTo": [
419
- "id"
420
- ],
421
- "onDelete": "set null",
422
- "onUpdate": "no action"
423
- },
424
- "audit_logs_actor_id_actors_id_fk": {
425
- "name": "audit_logs_actor_id_actors_id_fk",
426
- "tableFrom": "audit_logs",
427
- "tableTo": "actors",
428
- "columnsFrom": [
429
- "actor_id"
430
- ],
431
- "columnsTo": [
432
- "id"
433
- ],
434
- "onDelete": "set null",
435
- "onUpdate": "no action"
436
- }
437
- },
438
- "compositePrimaryKeys": {},
439
- "uniqueConstraints": {},
440
- "policies": {},
441
- "checkConstraints": {},
442
- "isRLSEnabled": false
443
- },
444
- "public.disputes": {
445
- "name": "disputes",
446
- "schema": "",
447
- "columns": {
448
- "id": {
449
- "name": "id",
450
- "type": "text",
451
- "primaryKey": true,
452
- "notNull": true
453
- },
454
- "marketplace_id": {
455
- "name": "marketplace_id",
456
- "type": "text",
457
- "primaryKey": false,
458
- "notNull": true
459
- },
460
- "order_id": {
461
- "name": "order_id",
462
- "type": "text",
463
- "primaryKey": false,
464
- "notNull": true
465
- },
466
- "status": {
467
- "name": "status",
468
- "type": "text",
469
- "primaryKey": false,
470
- "notNull": true,
471
- "default": "'open'"
472
- },
473
- "reason": {
474
- "name": "reason",
475
- "type": "text",
476
- "primaryKey": false,
477
- "notNull": false
478
- },
479
- "created_at": {
480
- "name": "created_at",
481
- "type": "timestamp with time zone",
482
- "primaryKey": false,
483
- "notNull": true,
484
- "default": "now()"
485
- },
486
- "updated_at": {
487
- "name": "updated_at",
488
- "type": "timestamp with time zone",
489
- "primaryKey": false,
490
- "notNull": true,
491
- "default": "now()"
492
- }
493
- },
494
- "indexes": {
495
- "disputes_order_idx": {
496
- "name": "disputes_order_idx",
497
- "columns": [
498
- {
499
- "expression": "order_id",
500
- "isExpression": false,
501
- "asc": true,
502
- "nulls": "last"
503
- }
504
- ],
505
- "isUnique": false,
506
- "concurrently": false,
507
- "method": "btree",
508
- "with": {}
509
- }
510
- },
511
- "foreignKeys": {
512
- "disputes_marketplace_id_marketplaces_id_fk": {
513
- "name": "disputes_marketplace_id_marketplaces_id_fk",
514
- "tableFrom": "disputes",
515
- "tableTo": "marketplaces",
516
- "columnsFrom": [
517
- "marketplace_id"
518
- ],
519
- "columnsTo": [
520
- "id"
521
- ],
522
- "onDelete": "cascade",
523
- "onUpdate": "no action"
524
- },
525
- "disputes_order_id_orders_id_fk": {
526
- "name": "disputes_order_id_orders_id_fk",
527
- "tableFrom": "disputes",
528
- "tableTo": "orders",
529
- "columnsFrom": [
530
- "order_id"
531
- ],
532
- "columnsTo": [
533
- "id"
534
- ],
535
- "onDelete": "cascade",
536
- "onUpdate": "no action"
537
- }
538
- },
539
- "compositePrimaryKeys": {},
540
- "uniqueConstraints": {},
541
- "policies": {},
542
- "checkConstraints": {},
543
- "isRLSEnabled": false
544
- },
545
- "public.domain_events": {
546
- "name": "domain_events",
547
- "schema": "",
548
- "columns": {
549
- "id": {
550
- "name": "id",
551
- "type": "text",
552
- "primaryKey": true,
553
- "notNull": true
554
- },
555
- "marketplace_id": {
556
- "name": "marketplace_id",
557
- "type": "text",
558
- "primaryKey": false,
559
- "notNull": true
560
- },
561
- "type": {
562
- "name": "type",
563
- "type": "text",
564
- "primaryKey": false,
565
- "notNull": true
566
- },
567
- "aggregate_type": {
568
- "name": "aggregate_type",
569
- "type": "text",
570
- "primaryKey": false,
571
- "notNull": true
572
- },
573
- "aggregate_id": {
574
- "name": "aggregate_id",
575
- "type": "text",
576
- "primaryKey": false,
577
- "notNull": true
578
- },
579
- "payload": {
580
- "name": "payload",
581
- "type": "jsonb",
582
- "primaryKey": false,
583
- "notNull": true
584
- },
585
- "occurred_at": {
586
- "name": "occurred_at",
587
- "type": "timestamp with time zone",
588
- "primaryKey": false,
589
- "notNull": true
590
- },
591
- "processed_at": {
592
- "name": "processed_at",
593
- "type": "timestamp with time zone",
594
- "primaryKey": false,
595
- "notNull": false
596
- },
597
- "idempotency_key": {
598
- "name": "idempotency_key",
599
- "type": "text",
600
- "primaryKey": false,
601
- "notNull": false
602
- }
603
- },
604
- "indexes": {
605
- "domain_events_marketplace_idx": {
606
- "name": "domain_events_marketplace_idx",
607
- "columns": [
608
- {
609
- "expression": "marketplace_id",
610
- "isExpression": false,
611
- "asc": true,
612
- "nulls": "last"
613
- }
614
- ],
615
- "isUnique": false,
616
- "concurrently": false,
617
- "method": "btree",
618
- "with": {}
619
- },
620
- "domain_events_processed_idx": {
621
- "name": "domain_events_processed_idx",
622
- "columns": [
623
- {
624
- "expression": "processed_at",
625
- "isExpression": false,
626
- "asc": true,
627
- "nulls": "last"
628
- }
629
- ],
630
- "isUnique": false,
631
- "concurrently": false,
632
- "method": "btree",
633
- "with": {}
634
- }
635
- },
636
- "foreignKeys": {
637
- "domain_events_marketplace_id_marketplaces_id_fk": {
638
- "name": "domain_events_marketplace_id_marketplaces_id_fk",
639
- "tableFrom": "domain_events",
640
- "tableTo": "marketplaces",
641
- "columnsFrom": [
642
- "marketplace_id"
643
- ],
644
- "columnsTo": [
645
- "id"
646
- ],
647
- "onDelete": "cascade",
648
- "onUpdate": "no action"
649
- }
650
- },
651
- "compositePrimaryKeys": {},
652
- "uniqueConstraints": {},
653
- "policies": {},
654
- "checkConstraints": {},
655
- "isRLSEnabled": false
656
- },
657
- "public.flags": {
658
- "name": "flags",
659
- "schema": "",
660
- "columns": {
661
- "id": {
662
- "name": "id",
663
- "type": "text",
664
- "primaryKey": true,
665
- "notNull": true
666
- },
667
- "marketplace_id": {
668
- "name": "marketplace_id",
669
- "type": "text",
670
- "primaryKey": false,
671
- "notNull": true
672
- },
673
- "subject_type": {
674
- "name": "subject_type",
675
- "type": "text",
676
- "primaryKey": false,
677
- "notNull": true
678
- },
679
- "subject_id": {
680
- "name": "subject_id",
681
- "type": "text",
682
- "primaryKey": false,
683
- "notNull": true
684
- },
685
- "reporter_actor_id": {
686
- "name": "reporter_actor_id",
687
- "type": "text",
688
- "primaryKey": false,
689
- "notNull": false
690
- },
691
- "reason": {
692
- "name": "reason",
693
- "type": "text",
694
- "primaryKey": false,
695
- "notNull": false
696
- },
697
- "created_at": {
698
- "name": "created_at",
699
- "type": "timestamp with time zone",
700
- "primaryKey": false,
701
- "notNull": true,
702
- "default": "now()"
703
- }
704
- },
705
- "indexes": {
706
- "flags_marketplace_idx": {
707
- "name": "flags_marketplace_idx",
708
- "columns": [
709
- {
710
- "expression": "marketplace_id",
711
- "isExpression": false,
712
- "asc": true,
713
- "nulls": "last"
714
- }
715
- ],
716
- "isUnique": false,
717
- "concurrently": false,
718
- "method": "btree",
719
- "with": {}
720
- }
721
- },
722
- "foreignKeys": {
723
- "flags_marketplace_id_marketplaces_id_fk": {
724
- "name": "flags_marketplace_id_marketplaces_id_fk",
725
- "tableFrom": "flags",
726
- "tableTo": "marketplaces",
727
- "columnsFrom": [
728
- "marketplace_id"
729
- ],
730
- "columnsTo": [
731
- "id"
732
- ],
733
- "onDelete": "cascade",
734
- "onUpdate": "no action"
735
- },
736
- "flags_reporter_actor_id_actors_id_fk": {
737
- "name": "flags_reporter_actor_id_actors_id_fk",
738
- "tableFrom": "flags",
739
- "tableTo": "actors",
740
- "columnsFrom": [
741
- "reporter_actor_id"
742
- ],
743
- "columnsTo": [
744
- "id"
745
- ],
746
- "onDelete": "set null",
747
- "onUpdate": "no action"
748
- }
749
- },
750
- "compositePrimaryKeys": {},
751
- "uniqueConstraints": {},
752
- "policies": {},
753
- "checkConstraints": {},
754
- "isRLSEnabled": false
755
- },
756
- "public.fulfillments": {
757
- "name": "fulfillments",
758
- "schema": "",
759
- "columns": {
760
- "id": {
761
- "name": "id",
762
- "type": "text",
763
- "primaryKey": true,
764
- "notNull": true
765
- },
766
- "marketplace_id": {
767
- "name": "marketplace_id",
768
- "type": "text",
769
- "primaryKey": false,
770
- "notNull": true
771
- },
772
- "order_id": {
773
- "name": "order_id",
774
- "type": "text",
775
- "primaryKey": false,
776
- "notNull": true
777
- },
778
- "status": {
779
- "name": "status",
780
- "type": "text",
781
- "primaryKey": false,
782
- "notNull": true,
783
- "default": "'pending'"
784
- },
785
- "result": {
786
- "name": "result",
787
- "type": "jsonb",
788
- "primaryKey": false,
789
- "notNull": false
790
- },
791
- "confirmed_at": {
792
- "name": "confirmed_at",
793
- "type": "timestamp with time zone",
794
- "primaryKey": false,
795
- "notNull": false
796
- },
797
- "created_at": {
798
- "name": "created_at",
799
- "type": "timestamp with time zone",
800
- "primaryKey": false,
801
- "notNull": true,
802
- "default": "now()"
803
- },
804
- "updated_at": {
805
- "name": "updated_at",
806
- "type": "timestamp with time zone",
807
- "primaryKey": false,
808
- "notNull": true,
809
- "default": "now()"
810
- }
811
- },
812
- "indexes": {
813
- "fulfillments_order_uq": {
814
- "name": "fulfillments_order_uq",
815
- "columns": [
816
- {
817
- "expression": "order_id",
818
- "isExpression": false,
819
- "asc": true,
820
- "nulls": "last"
821
- }
822
- ],
823
- "isUnique": true,
824
- "concurrently": false,
825
- "method": "btree",
826
- "with": {}
827
- }
828
- },
829
- "foreignKeys": {
830
- "fulfillments_marketplace_id_marketplaces_id_fk": {
831
- "name": "fulfillments_marketplace_id_marketplaces_id_fk",
832
- "tableFrom": "fulfillments",
833
- "tableTo": "marketplaces",
834
- "columnsFrom": [
835
- "marketplace_id"
836
- ],
837
- "columnsTo": [
838
- "id"
839
- ],
840
- "onDelete": "cascade",
841
- "onUpdate": "no action"
842
- },
843
- "fulfillments_order_id_orders_id_fk": {
844
- "name": "fulfillments_order_id_orders_id_fk",
845
- "tableFrom": "fulfillments",
846
- "tableTo": "orders",
847
- "columnsFrom": [
848
- "order_id"
849
- ],
850
- "columnsTo": [
851
- "id"
852
- ],
853
- "onDelete": "cascade",
854
- "onUpdate": "no action"
855
- }
856
- },
857
- "compositePrimaryKeys": {},
858
- "uniqueConstraints": {},
859
- "policies": {},
860
- "checkConstraints": {},
861
- "isRLSEnabled": false
862
- },
863
- "public.integrations": {
864
- "name": "integrations",
865
- "schema": "",
866
- "columns": {
867
- "id": {
868
- "name": "id",
869
- "type": "text",
870
- "primaryKey": true,
871
- "notNull": true
872
- },
873
- "marketplace_id": {
874
- "name": "marketplace_id",
875
- "type": "text",
876
- "primaryKey": false,
877
- "notNull": true
878
- },
879
- "provider": {
880
- "name": "provider",
881
- "type": "text",
882
- "primaryKey": false,
883
- "notNull": true
884
- },
885
- "config": {
886
- "name": "config",
887
- "type": "jsonb",
888
- "primaryKey": false,
889
- "notNull": true
890
- },
891
- "created_at": {
892
- "name": "created_at",
893
- "type": "timestamp with time zone",
894
- "primaryKey": false,
895
- "notNull": true,
896
- "default": "now()"
897
- },
898
- "updated_at": {
899
- "name": "updated_at",
900
- "type": "timestamp with time zone",
901
- "primaryKey": false,
902
- "notNull": true,
903
- "default": "now()"
904
- }
905
- },
906
- "indexes": {
907
- "integrations_marketplace_provider_uq": {
908
- "name": "integrations_marketplace_provider_uq",
909
- "columns": [
910
- {
911
- "expression": "marketplace_id",
912
- "isExpression": false,
913
- "asc": true,
914
- "nulls": "last"
915
- },
916
- {
917
- "expression": "provider",
918
- "isExpression": false,
919
- "asc": true,
920
- "nulls": "last"
921
- }
922
- ],
923
- "isUnique": true,
924
- "concurrently": false,
925
- "method": "btree",
926
- "with": {}
927
- }
928
- },
929
- "foreignKeys": {
930
- "integrations_marketplace_id_marketplaces_id_fk": {
931
- "name": "integrations_marketplace_id_marketplaces_id_fk",
932
- "tableFrom": "integrations",
933
- "tableTo": "marketplaces",
934
- "columnsFrom": [
935
- "marketplace_id"
936
- ],
937
- "columnsTo": [
938
- "id"
939
- ],
940
- "onDelete": "cascade",
941
- "onUpdate": "no action"
942
- }
943
- },
944
- "compositePrimaryKeys": {},
945
- "uniqueConstraints": {},
946
- "policies": {},
947
- "checkConstraints": {},
948
- "isRLSEnabled": false
949
- },
950
- "public.ledger_entries": {
951
- "name": "ledger_entries",
952
- "schema": "",
953
- "columns": {
954
- "id": {
955
- "name": "id",
956
- "type": "text",
957
- "primaryKey": true,
958
- "notNull": true
959
- },
960
- "marketplace_id": {
961
- "name": "marketplace_id",
962
- "type": "text",
963
- "primaryKey": false,
964
- "notNull": true
965
- },
966
- "order_id": {
967
- "name": "order_id",
968
- "type": "text",
969
- "primaryKey": false,
970
- "notNull": false
971
- },
972
- "settlement_id": {
973
- "name": "settlement_id",
974
- "type": "text",
975
- "primaryKey": false,
976
- "notNull": false
977
- },
978
- "kind": {
979
- "name": "kind",
980
- "type": "text",
981
- "primaryKey": false,
982
- "notNull": true
983
- },
984
- "amount_minor": {
985
- "name": "amount_minor",
986
- "type": "integer",
987
- "primaryKey": false,
988
- "notNull": true
989
- },
990
- "currency": {
991
- "name": "currency",
992
- "type": "text",
993
- "primaryKey": false,
994
- "notNull": true
995
- },
996
- "memo": {
997
- "name": "memo",
998
- "type": "text",
999
- "primaryKey": false,
1000
- "notNull": false
1001
- },
1002
- "metadata": {
1003
- "name": "metadata",
1004
- "type": "jsonb",
1005
- "primaryKey": false,
1006
- "notNull": false
1007
- },
1008
- "created_at": {
1009
- "name": "created_at",
1010
- "type": "timestamp with time zone",
1011
- "primaryKey": false,
1012
- "notNull": true,
1013
- "default": "now()"
1014
- }
1015
- },
1016
- "indexes": {
1017
- "ledger_entries_marketplace_idx": {
1018
- "name": "ledger_entries_marketplace_idx",
1019
- "columns": [
1020
- {
1021
- "expression": "marketplace_id",
1022
- "isExpression": false,
1023
- "asc": true,
1024
- "nulls": "last"
1025
- }
1026
- ],
1027
- "isUnique": false,
1028
- "concurrently": false,
1029
- "method": "btree",
1030
- "with": {}
1031
- }
1032
- },
1033
- "foreignKeys": {
1034
- "ledger_entries_marketplace_id_marketplaces_id_fk": {
1035
- "name": "ledger_entries_marketplace_id_marketplaces_id_fk",
1036
- "tableFrom": "ledger_entries",
1037
- "tableTo": "marketplaces",
1038
- "columnsFrom": [
1039
- "marketplace_id"
1040
- ],
1041
- "columnsTo": [
1042
- "id"
1043
- ],
1044
- "onDelete": "cascade",
1045
- "onUpdate": "no action"
1046
- },
1047
- "ledger_entries_order_id_orders_id_fk": {
1048
- "name": "ledger_entries_order_id_orders_id_fk",
1049
- "tableFrom": "ledger_entries",
1050
- "tableTo": "orders",
1051
- "columnsFrom": [
1052
- "order_id"
1053
- ],
1054
- "columnsTo": [
1055
- "id"
1056
- ],
1057
- "onDelete": "set null",
1058
- "onUpdate": "no action"
1059
- },
1060
- "ledger_entries_settlement_id_settlements_id_fk": {
1061
- "name": "ledger_entries_settlement_id_settlements_id_fk",
1062
- "tableFrom": "ledger_entries",
1063
- "tableTo": "settlements",
1064
- "columnsFrom": [
1065
- "settlement_id"
1066
- ],
1067
- "columnsTo": [
1068
- "id"
1069
- ],
1070
- "onDelete": "set null",
1071
- "onUpdate": "no action"
1072
- }
1073
- },
1074
- "compositePrimaryKeys": {},
1075
- "uniqueConstraints": {},
1076
- "policies": {},
1077
- "checkConstraints": {},
1078
- "isRLSEnabled": false
1079
- },
1080
- "public.listing_assets": {
1081
- "name": "listing_assets",
1082
- "schema": "",
1083
- "columns": {
1084
- "id": {
1085
- "name": "id",
1086
- "type": "text",
1087
- "primaryKey": true,
1088
- "notNull": true
1089
- },
1090
- "listing_version_id": {
1091
- "name": "listing_version_id",
1092
- "type": "text",
1093
- "primaryKey": false,
1094
- "notNull": true
1095
- },
1096
- "url": {
1097
- "name": "url",
1098
- "type": "text",
1099
- "primaryKey": false,
1100
- "notNull": true
1101
- },
1102
- "kind": {
1103
- "name": "kind",
1104
- "type": "text",
1105
- "primaryKey": false,
1106
- "notNull": true
1107
- },
1108
- "metadata": {
1109
- "name": "metadata",
1110
- "type": "jsonb",
1111
- "primaryKey": false,
1112
- "notNull": false
1113
- }
1114
- },
1115
- "indexes": {
1116
- "listing_assets_version_idx": {
1117
- "name": "listing_assets_version_idx",
1118
- "columns": [
1119
- {
1120
- "expression": "listing_version_id",
1121
- "isExpression": false,
1122
- "asc": true,
1123
- "nulls": "last"
1124
- }
1125
- ],
1126
- "isUnique": false,
1127
- "concurrently": false,
1128
- "method": "btree",
1129
- "with": {}
1130
- }
1131
- },
1132
- "foreignKeys": {
1133
- "listing_assets_listing_version_id_listing_versions_id_fk": {
1134
- "name": "listing_assets_listing_version_id_listing_versions_id_fk",
1135
- "tableFrom": "listing_assets",
1136
- "tableTo": "listing_versions",
1137
- "columnsFrom": [
1138
- "listing_version_id"
1139
- ],
1140
- "columnsTo": [
1141
- "id"
1142
- ],
1143
- "onDelete": "cascade",
1144
- "onUpdate": "no action"
1145
- }
1146
- },
1147
- "compositePrimaryKeys": {},
1148
- "uniqueConstraints": {},
1149
- "policies": {},
1150
- "checkConstraints": {},
1151
- "isRLSEnabled": false
1152
- },
1153
- "public.listing_types": {
1154
- "name": "listing_types",
1155
- "schema": "",
1156
- "columns": {
1157
- "id": {
1158
- "name": "id",
1159
- "type": "text",
1160
- "primaryKey": true,
1161
- "notNull": true
1162
- },
1163
- "marketplace_id": {
1164
- "name": "marketplace_id",
1165
- "type": "text",
1166
- "primaryKey": false,
1167
- "notNull": true
1168
- },
1169
- "slug": {
1170
- "name": "slug",
1171
- "type": "text",
1172
- "primaryKey": false,
1173
- "notNull": true
1174
- },
1175
- "name": {
1176
- "name": "name",
1177
- "type": "text",
1178
- "primaryKey": false,
1179
- "notNull": true
1180
- },
1181
- "schema": {
1182
- "name": "schema",
1183
- "type": "jsonb",
1184
- "primaryKey": false,
1185
- "notNull": false
1186
- },
1187
- "created_at": {
1188
- "name": "created_at",
1189
- "type": "timestamp with time zone",
1190
- "primaryKey": false,
1191
- "notNull": true,
1192
- "default": "now()"
1193
- }
1194
- },
1195
- "indexes": {
1196
- "listing_types_marketplace_slug_uq": {
1197
- "name": "listing_types_marketplace_slug_uq",
1198
- "columns": [
1199
- {
1200
- "expression": "marketplace_id",
1201
- "isExpression": false,
1202
- "asc": true,
1203
- "nulls": "last"
1204
- },
1205
- {
1206
- "expression": "slug",
1207
- "isExpression": false,
1208
- "asc": true,
1209
- "nulls": "last"
1210
- }
1211
- ],
1212
- "isUnique": true,
1213
- "concurrently": false,
1214
- "method": "btree",
1215
- "with": {}
1216
- }
1217
- },
1218
- "foreignKeys": {
1219
- "listing_types_marketplace_id_marketplaces_id_fk": {
1220
- "name": "listing_types_marketplace_id_marketplaces_id_fk",
1221
- "tableFrom": "listing_types",
1222
- "tableTo": "marketplaces",
1223
- "columnsFrom": [
1224
- "marketplace_id"
1225
- ],
1226
- "columnsTo": [
1227
- "id"
1228
- ],
1229
- "onDelete": "cascade",
1230
- "onUpdate": "no action"
1231
- }
1232
- },
1233
- "compositePrimaryKeys": {},
1234
- "uniqueConstraints": {},
1235
- "policies": {},
1236
- "checkConstraints": {},
1237
- "isRLSEnabled": false
1238
- },
1239
- "public.listing_versions": {
1240
- "name": "listing_versions",
1241
- "schema": "",
1242
- "columns": {
1243
- "id": {
1244
- "name": "id",
1245
- "type": "text",
1246
- "primaryKey": true,
1247
- "notNull": true
1248
- },
1249
- "listing_id": {
1250
- "name": "listing_id",
1251
- "type": "text",
1252
- "primaryKey": false,
1253
- "notNull": true
1254
- },
1255
- "version": {
1256
- "name": "version",
1257
- "type": "integer",
1258
- "primaryKey": false,
1259
- "notNull": true
1260
- },
1261
- "title": {
1262
- "name": "title",
1263
- "type": "text",
1264
- "primaryKey": false,
1265
- "notNull": true
1266
- },
1267
- "description": {
1268
- "name": "description",
1269
- "type": "text",
1270
- "primaryKey": false,
1271
- "notNull": false
1272
- },
1273
- "price_amount_minor": {
1274
- "name": "price_amount_minor",
1275
- "type": "integer",
1276
- "primaryKey": false,
1277
- "notNull": false
1278
- },
1279
- "price_currency": {
1280
- "name": "price_currency",
1281
- "type": "text",
1282
- "primaryKey": false,
1283
- "notNull": false
1284
- },
1285
- "metadata": {
1286
- "name": "metadata",
1287
- "type": "jsonb",
1288
- "primaryKey": false,
1289
- "notNull": false
1290
- },
1291
- "created_at": {
1292
- "name": "created_at",
1293
- "type": "timestamp with time zone",
1294
- "primaryKey": false,
1295
- "notNull": true,
1296
- "default": "now()"
1297
- }
1298
- },
1299
- "indexes": {
1300
- "listing_versions_listing_version_uq": {
1301
- "name": "listing_versions_listing_version_uq",
1302
- "columns": [
1303
- {
1304
- "expression": "listing_id",
1305
- "isExpression": false,
1306
- "asc": true,
1307
- "nulls": "last"
1308
- },
1309
- {
1310
- "expression": "version",
1311
- "isExpression": false,
1312
- "asc": true,
1313
- "nulls": "last"
1314
- }
1315
- ],
1316
- "isUnique": true,
1317
- "concurrently": false,
1318
- "method": "btree",
1319
- "with": {}
1320
- }
1321
- },
1322
- "foreignKeys": {
1323
- "listing_versions_listing_id_listings_id_fk": {
1324
- "name": "listing_versions_listing_id_listings_id_fk",
1325
- "tableFrom": "listing_versions",
1326
- "tableTo": "listings",
1327
- "columnsFrom": [
1328
- "listing_id"
1329
- ],
1330
- "columnsTo": [
1331
- "id"
1332
- ],
1333
- "onDelete": "cascade",
1334
- "onUpdate": "no action"
1335
- }
1336
- },
1337
- "compositePrimaryKeys": {},
1338
- "uniqueConstraints": {},
1339
- "policies": {},
1340
- "checkConstraints": {},
1341
- "isRLSEnabled": false
1342
- },
1343
- "public.listings": {
1344
- "name": "listings",
1345
- "schema": "",
1346
- "columns": {
1347
- "id": {
1348
- "name": "id",
1349
- "type": "text",
1350
- "primaryKey": true,
1351
- "notNull": true
1352
- },
1353
- "marketplace_id": {
1354
- "name": "marketplace_id",
1355
- "type": "text",
1356
- "primaryKey": false,
1357
- "notNull": true
1358
- },
1359
- "actor_id": {
1360
- "name": "actor_id",
1361
- "type": "text",
1362
- "primaryKey": false,
1363
- "notNull": true
1364
- },
1365
- "listing_type_id": {
1366
- "name": "listing_type_id",
1367
- "type": "text",
1368
- "primaryKey": false,
1369
- "notNull": true
1370
- },
1371
- "current_version_id": {
1372
- "name": "current_version_id",
1373
- "type": "text",
1374
- "primaryKey": false,
1375
- "notNull": false
1376
- },
1377
- "status": {
1378
- "name": "status",
1379
- "type": "text",
1380
- "primaryKey": false,
1381
- "notNull": true,
1382
- "default": "'draft'"
1383
- },
1384
- "created_at": {
1385
- "name": "created_at",
1386
- "type": "timestamp with time zone",
1387
- "primaryKey": false,
1388
- "notNull": true,
1389
- "default": "now()"
1390
- },
1391
- "updated_at": {
1392
- "name": "updated_at",
1393
- "type": "timestamp with time zone",
1394
- "primaryKey": false,
1395
- "notNull": true,
1396
- "default": "now()"
1397
- }
1398
- },
1399
- "indexes": {
1400
- "listings_marketplace_idx": {
1401
- "name": "listings_marketplace_idx",
1402
- "columns": [
1403
- {
1404
- "expression": "marketplace_id",
1405
- "isExpression": false,
1406
- "asc": true,
1407
- "nulls": "last"
1408
- }
1409
- ],
1410
- "isUnique": false,
1411
- "concurrently": false,
1412
- "method": "btree",
1413
- "with": {}
1414
- }
1415
- },
1416
- "foreignKeys": {
1417
- "listings_marketplace_id_marketplaces_id_fk": {
1418
- "name": "listings_marketplace_id_marketplaces_id_fk",
1419
- "tableFrom": "listings",
1420
- "tableTo": "marketplaces",
1421
- "columnsFrom": [
1422
- "marketplace_id"
1423
- ],
1424
- "columnsTo": [
1425
- "id"
1426
- ],
1427
- "onDelete": "cascade",
1428
- "onUpdate": "no action"
1429
- },
1430
- "listings_actor_id_actors_id_fk": {
1431
- "name": "listings_actor_id_actors_id_fk",
1432
- "tableFrom": "listings",
1433
- "tableTo": "actors",
1434
- "columnsFrom": [
1435
- "actor_id"
1436
- ],
1437
- "columnsTo": [
1438
- "id"
1439
- ],
1440
- "onDelete": "cascade",
1441
- "onUpdate": "no action"
1442
- },
1443
- "listings_listing_type_id_listing_types_id_fk": {
1444
- "name": "listings_listing_type_id_listing_types_id_fk",
1445
- "tableFrom": "listings",
1446
- "tableTo": "listing_types",
1447
- "columnsFrom": [
1448
- "listing_type_id"
1449
- ],
1450
- "columnsTo": [
1451
- "id"
1452
- ],
1453
- "onDelete": "restrict",
1454
- "onUpdate": "no action"
1455
- }
1456
- },
1457
- "compositePrimaryKeys": {},
1458
- "uniqueConstraints": {},
1459
- "policies": {},
1460
- "checkConstraints": {},
1461
- "isRLSEnabled": false
1462
- },
1463
- "public.marketplaces": {
1464
- "name": "marketplaces",
1465
- "schema": "",
1466
- "columns": {
1467
- "id": {
1468
- "name": "id",
1469
- "type": "text",
1470
- "primaryKey": true,
1471
- "notNull": true
1472
- },
1473
- "name": {
1474
- "name": "name",
1475
- "type": "text",
1476
- "primaryKey": false,
1477
- "notNull": true
1478
- },
1479
- "slug": {
1480
- "name": "slug",
1481
- "type": "text",
1482
- "primaryKey": false,
1483
- "notNull": true
1484
- },
1485
- "created_at": {
1486
- "name": "created_at",
1487
- "type": "timestamp with time zone",
1488
- "primaryKey": false,
1489
- "notNull": true,
1490
- "default": "now()"
1491
- },
1492
- "updated_at": {
1493
- "name": "updated_at",
1494
- "type": "timestamp with time zone",
1495
- "primaryKey": false,
1496
- "notNull": true,
1497
- "default": "now()"
1498
- }
1499
- },
1500
- "indexes": {
1501
- "marketplaces_slug_uq": {
1502
- "name": "marketplaces_slug_uq",
1503
- "columns": [
1504
- {
1505
- "expression": "slug",
1506
- "isExpression": false,
1507
- "asc": true,
1508
- "nulls": "last"
1509
- }
1510
- ],
1511
- "isUnique": true,
1512
- "concurrently": false,
1513
- "method": "btree",
1514
- "with": {}
1515
- }
1516
- },
1517
- "foreignKeys": {},
1518
- "compositePrimaryKeys": {},
1519
- "uniqueConstraints": {},
1520
- "policies": {},
1521
- "checkConstraints": {},
1522
- "isRLSEnabled": false
1523
- },
1524
- "public.moderation_cases": {
1525
- "name": "moderation_cases",
1526
- "schema": "",
1527
- "columns": {
1528
- "id": {
1529
- "name": "id",
1530
- "type": "text",
1531
- "primaryKey": true,
1532
- "notNull": true
1533
- },
1534
- "marketplace_id": {
1535
- "name": "marketplace_id",
1536
- "type": "text",
1537
- "primaryKey": false,
1538
- "notNull": true
1539
- },
1540
- "subject_type": {
1541
- "name": "subject_type",
1542
- "type": "text",
1543
- "primaryKey": false,
1544
- "notNull": true
1545
- },
1546
- "subject_id": {
1547
- "name": "subject_id",
1548
- "type": "text",
1549
- "primaryKey": false,
1550
- "notNull": true
1551
- },
1552
- "status": {
1553
- "name": "status",
1554
- "type": "text",
1555
- "primaryKey": false,
1556
- "notNull": true,
1557
- "default": "'open'"
1558
- },
1559
- "notes": {
1560
- "name": "notes",
1561
- "type": "text",
1562
- "primaryKey": false,
1563
- "notNull": false
1564
- },
1565
- "created_at": {
1566
- "name": "created_at",
1567
- "type": "timestamp with time zone",
1568
- "primaryKey": false,
1569
- "notNull": true,
1570
- "default": "now()"
1571
- },
1572
- "updated_at": {
1573
- "name": "updated_at",
1574
- "type": "timestamp with time zone",
1575
- "primaryKey": false,
1576
- "notNull": true,
1577
- "default": "now()"
1578
- }
1579
- },
1580
- "indexes": {
1581
- "moderation_cases_marketplace_idx": {
1582
- "name": "moderation_cases_marketplace_idx",
1583
- "columns": [
1584
- {
1585
- "expression": "marketplace_id",
1586
- "isExpression": false,
1587
- "asc": true,
1588
- "nulls": "last"
1589
- }
1590
- ],
1591
- "isUnique": false,
1592
- "concurrently": false,
1593
- "method": "btree",
1594
- "with": {}
1595
- }
1596
- },
1597
- "foreignKeys": {
1598
- "moderation_cases_marketplace_id_marketplaces_id_fk": {
1599
- "name": "moderation_cases_marketplace_id_marketplaces_id_fk",
1600
- "tableFrom": "moderation_cases",
1601
- "tableTo": "marketplaces",
1602
- "columnsFrom": [
1603
- "marketplace_id"
1604
- ],
1605
- "columnsTo": [
1606
- "id"
1607
- ],
1608
- "onDelete": "cascade",
1609
- "onUpdate": "no action"
1610
- }
1611
- },
1612
- "compositePrimaryKeys": {},
1613
- "uniqueConstraints": {},
1614
- "policies": {},
1615
- "checkConstraints": {},
1616
- "isRLSEnabled": false
1617
- },
1618
- "public.offers": {
1619
- "name": "offers",
1620
- "schema": "",
1621
- "columns": {
1622
- "id": {
1623
- "name": "id",
1624
- "type": "text",
1625
- "primaryKey": true,
1626
- "notNull": true
1627
- },
1628
- "marketplace_id": {
1629
- "name": "marketplace_id",
1630
- "type": "text",
1631
- "primaryKey": false,
1632
- "notNull": true
1633
- },
1634
- "listing_id": {
1635
- "name": "listing_id",
1636
- "type": "text",
1637
- "primaryKey": false,
1638
- "notNull": true
1639
- },
1640
- "buyer_actor_id": {
1641
- "name": "buyer_actor_id",
1642
- "type": "text",
1643
- "primaryKey": false,
1644
- "notNull": true
1645
- },
1646
- "status": {
1647
- "name": "status",
1648
- "type": "text",
1649
- "primaryKey": false,
1650
- "notNull": true,
1651
- "default": "'open'"
1652
- },
1653
- "proposed_price_amount_minor": {
1654
- "name": "proposed_price_amount_minor",
1655
- "type": "integer",
1656
- "primaryKey": false,
1657
- "notNull": false
1658
- },
1659
- "proposed_price_currency": {
1660
- "name": "proposed_price_currency",
1661
- "type": "text",
1662
- "primaryKey": false,
1663
- "notNull": false
1664
- },
1665
- "metadata": {
1666
- "name": "metadata",
1667
- "type": "jsonb",
1668
- "primaryKey": false,
1669
- "notNull": false
1670
- },
1671
- "created_at": {
1672
- "name": "created_at",
1673
- "type": "timestamp with time zone",
1674
- "primaryKey": false,
1675
- "notNull": true,
1676
- "default": "now()"
1677
- },
1678
- "updated_at": {
1679
- "name": "updated_at",
1680
- "type": "timestamp with time zone",
1681
- "primaryKey": false,
1682
- "notNull": true,
1683
- "default": "now()"
1684
- }
1685
- },
1686
- "indexes": {
1687
- "offers_marketplace_idx": {
1688
- "name": "offers_marketplace_idx",
1689
- "columns": [
1690
- {
1691
- "expression": "marketplace_id",
1692
- "isExpression": false,
1693
- "asc": true,
1694
- "nulls": "last"
1695
- }
1696
- ],
1697
- "isUnique": false,
1698
- "concurrently": false,
1699
- "method": "btree",
1700
- "with": {}
1701
- }
1702
- },
1703
- "foreignKeys": {
1704
- "offers_marketplace_id_marketplaces_id_fk": {
1705
- "name": "offers_marketplace_id_marketplaces_id_fk",
1706
- "tableFrom": "offers",
1707
- "tableTo": "marketplaces",
1708
- "columnsFrom": [
1709
- "marketplace_id"
1710
- ],
1711
- "columnsTo": [
1712
- "id"
1713
- ],
1714
- "onDelete": "cascade",
1715
- "onUpdate": "no action"
1716
- },
1717
- "offers_listing_id_listings_id_fk": {
1718
- "name": "offers_listing_id_listings_id_fk",
1719
- "tableFrom": "offers",
1720
- "tableTo": "listings",
1721
- "columnsFrom": [
1722
- "listing_id"
1723
- ],
1724
- "columnsTo": [
1725
- "id"
1726
- ],
1727
- "onDelete": "cascade",
1728
- "onUpdate": "no action"
1729
- },
1730
- "offers_buyer_actor_id_actors_id_fk": {
1731
- "name": "offers_buyer_actor_id_actors_id_fk",
1732
- "tableFrom": "offers",
1733
- "tableTo": "actors",
1734
- "columnsFrom": [
1735
- "buyer_actor_id"
1736
- ],
1737
- "columnsTo": [
1738
- "id"
1739
- ],
1740
- "onDelete": "cascade",
1741
- "onUpdate": "no action"
1742
- }
1743
- },
1744
- "compositePrimaryKeys": {},
1745
- "uniqueConstraints": {},
1746
- "policies": {},
1747
- "checkConstraints": {},
1748
- "isRLSEnabled": false
1749
- },
1750
- "public.order_items": {
1751
- "name": "order_items",
1752
- "schema": "",
1753
- "columns": {
1754
- "id": {
1755
- "name": "id",
1756
- "type": "text",
1757
- "primaryKey": true,
1758
- "notNull": true
1759
- },
1760
- "order_id": {
1761
- "name": "order_id",
1762
- "type": "text",
1763
- "primaryKey": false,
1764
- "notNull": true
1765
- },
1766
- "listing_version_id": {
1767
- "name": "listing_version_id",
1768
- "type": "text",
1769
- "primaryKey": false,
1770
- "notNull": true
1771
- },
1772
- "quantity": {
1773
- "name": "quantity",
1774
- "type": "integer",
1775
- "primaryKey": false,
1776
- "notNull": true,
1777
- "default": 1
1778
- },
1779
- "unit_amount_minor": {
1780
- "name": "unit_amount_minor",
1781
- "type": "integer",
1782
- "primaryKey": false,
1783
- "notNull": true
1784
- },
1785
- "unit_currency": {
1786
- "name": "unit_currency",
1787
- "type": "text",
1788
- "primaryKey": false,
1789
- "notNull": true
1790
- },
1791
- "metadata": {
1792
- "name": "metadata",
1793
- "type": "jsonb",
1794
- "primaryKey": false,
1795
- "notNull": false
1796
- }
1797
- },
1798
- "indexes": {
1799
- "order_items_order_idx": {
1800
- "name": "order_items_order_idx",
1801
- "columns": [
1802
- {
1803
- "expression": "order_id",
1804
- "isExpression": false,
1805
- "asc": true,
1806
- "nulls": "last"
1807
- }
1808
- ],
1809
- "isUnique": false,
1810
- "concurrently": false,
1811
- "method": "btree",
1812
- "with": {}
1813
- }
1814
- },
1815
- "foreignKeys": {
1816
- "order_items_order_id_orders_id_fk": {
1817
- "name": "order_items_order_id_orders_id_fk",
1818
- "tableFrom": "order_items",
1819
- "tableTo": "orders",
1820
- "columnsFrom": [
1821
- "order_id"
1822
- ],
1823
- "columnsTo": [
1824
- "id"
1825
- ],
1826
- "onDelete": "cascade",
1827
- "onUpdate": "no action"
1828
- },
1829
- "order_items_listing_version_id_listing_versions_id_fk": {
1830
- "name": "order_items_listing_version_id_listing_versions_id_fk",
1831
- "tableFrom": "order_items",
1832
- "tableTo": "listing_versions",
1833
- "columnsFrom": [
1834
- "listing_version_id"
1835
- ],
1836
- "columnsTo": [
1837
- "id"
1838
- ],
1839
- "onDelete": "restrict",
1840
- "onUpdate": "no action"
1841
- }
1842
- },
1843
- "compositePrimaryKeys": {},
1844
- "uniqueConstraints": {},
1845
- "policies": {},
1846
- "checkConstraints": {},
1847
- "isRLSEnabled": false
1848
- },
1849
- "public.orders": {
1850
- "name": "orders",
1851
- "schema": "",
1852
- "columns": {
1853
- "id": {
1854
- "name": "id",
1855
- "type": "text",
1856
- "primaryKey": true,
1857
- "notNull": true
1858
- },
1859
- "marketplace_id": {
1860
- "name": "marketplace_id",
1861
- "type": "text",
1862
- "primaryKey": false,
1863
- "notNull": true
1864
- },
1865
- "buyer_actor_id": {
1866
- "name": "buyer_actor_id",
1867
- "type": "text",
1868
- "primaryKey": false,
1869
- "notNull": true
1870
- },
1871
- "seller_actor_id": {
1872
- "name": "seller_actor_id",
1873
- "type": "text",
1874
- "primaryKey": false,
1875
- "notNull": true
1876
- },
1877
- "listing_id": {
1878
- "name": "listing_id",
1879
- "type": "text",
1880
- "primaryKey": false,
1881
- "notNull": true
1882
- },
1883
- "offer_id": {
1884
- "name": "offer_id",
1885
- "type": "text",
1886
- "primaryKey": false,
1887
- "notNull": false
1888
- },
1889
- "status": {
1890
- "name": "status",
1891
- "type": "text",
1892
- "primaryKey": false,
1893
- "notNull": true,
1894
- "default": "'created'"
1895
- },
1896
- "total_amount_minor": {
1897
- "name": "total_amount_minor",
1898
- "type": "integer",
1899
- "primaryKey": false,
1900
- "notNull": true
1901
- },
1902
- "total_currency": {
1903
- "name": "total_currency",
1904
- "type": "text",
1905
- "primaryKey": false,
1906
- "notNull": true
1907
- },
1908
- "metadata": {
1909
- "name": "metadata",
1910
- "type": "jsonb",
1911
- "primaryKey": false,
1912
- "notNull": false
1913
- },
1914
- "created_at": {
1915
- "name": "created_at",
1916
- "type": "timestamp with time zone",
1917
- "primaryKey": false,
1918
- "notNull": true,
1919
- "default": "now()"
1920
- },
1921
- "updated_at": {
1922
- "name": "updated_at",
1923
- "type": "timestamp with time zone",
1924
- "primaryKey": false,
1925
- "notNull": true,
1926
- "default": "now()"
1927
- }
1928
- },
1929
- "indexes": {
1930
- "orders_marketplace_idx": {
1931
- "name": "orders_marketplace_idx",
1932
- "columns": [
1933
- {
1934
- "expression": "marketplace_id",
1935
- "isExpression": false,
1936
- "asc": true,
1937
- "nulls": "last"
1938
- }
1939
- ],
1940
- "isUnique": false,
1941
- "concurrently": false,
1942
- "method": "btree",
1943
- "with": {}
1944
- }
1945
- },
1946
- "foreignKeys": {
1947
- "orders_marketplace_id_marketplaces_id_fk": {
1948
- "name": "orders_marketplace_id_marketplaces_id_fk",
1949
- "tableFrom": "orders",
1950
- "tableTo": "marketplaces",
1951
- "columnsFrom": [
1952
- "marketplace_id"
1953
- ],
1954
- "columnsTo": [
1955
- "id"
1956
- ],
1957
- "onDelete": "cascade",
1958
- "onUpdate": "no action"
1959
- },
1960
- "orders_buyer_actor_id_actors_id_fk": {
1961
- "name": "orders_buyer_actor_id_actors_id_fk",
1962
- "tableFrom": "orders",
1963
- "tableTo": "actors",
1964
- "columnsFrom": [
1965
- "buyer_actor_id"
1966
- ],
1967
- "columnsTo": [
1968
- "id"
1969
- ],
1970
- "onDelete": "cascade",
1971
- "onUpdate": "no action"
1972
- },
1973
- "orders_seller_actor_id_actors_id_fk": {
1974
- "name": "orders_seller_actor_id_actors_id_fk",
1975
- "tableFrom": "orders",
1976
- "tableTo": "actors",
1977
- "columnsFrom": [
1978
- "seller_actor_id"
1979
- ],
1980
- "columnsTo": [
1981
- "id"
1982
- ],
1983
- "onDelete": "cascade",
1984
- "onUpdate": "no action"
1985
- },
1986
- "orders_listing_id_listings_id_fk": {
1987
- "name": "orders_listing_id_listings_id_fk",
1988
- "tableFrom": "orders",
1989
- "tableTo": "listings",
1990
- "columnsFrom": [
1991
- "listing_id"
1992
- ],
1993
- "columnsTo": [
1994
- "id"
1995
- ],
1996
- "onDelete": "restrict",
1997
- "onUpdate": "no action"
1998
- },
1999
- "orders_offer_id_offers_id_fk": {
2000
- "name": "orders_offer_id_offers_id_fk",
2001
- "tableFrom": "orders",
2002
- "tableTo": "offers",
2003
- "columnsFrom": [
2004
- "offer_id"
2005
- ],
2006
- "columnsTo": [
2007
- "id"
2008
- ],
2009
- "onDelete": "set null",
2010
- "onUpdate": "no action"
2011
- }
2012
- },
2013
- "compositePrimaryKeys": {},
2014
- "uniqueConstraints": {},
2015
- "policies": {},
2016
- "checkConstraints": {},
2017
- "isRLSEnabled": false
2018
- },
2019
- "public.payment_challenges": {
2020
- "name": "payment_challenges",
2021
- "schema": "",
2022
- "columns": {
2023
- "id": {
2024
- "name": "id",
2025
- "type": "text",
2026
- "primaryKey": true,
2027
- "notNull": true
2028
- },
2029
- "marketplace_id": {
2030
- "name": "marketplace_id",
2031
- "type": "text",
2032
- "primaryKey": false,
2033
- "notNull": true
2034
- },
2035
- "order_id": {
2036
- "name": "order_id",
2037
- "type": "text",
2038
- "primaryKey": false,
2039
- "notNull": true
2040
- },
2041
- "status": {
2042
- "name": "status",
2043
- "type": "text",
2044
- "primaryKey": false,
2045
- "notNull": true,
2046
- "default": "'pending'"
2047
- },
2048
- "rail": {
2049
- "name": "rail",
2050
- "type": "text",
2051
- "primaryKey": false,
2052
- "notNull": true
2053
- },
2054
- "challenge_payload": {
2055
- "name": "challenge_payload",
2056
- "type": "jsonb",
2057
- "primaryKey": false,
2058
- "notNull": true
2059
- },
2060
- "expires_at": {
2061
- "name": "expires_at",
2062
- "type": "timestamp with time zone",
2063
- "primaryKey": false,
2064
- "notNull": false
2065
- },
2066
- "created_at": {
2067
- "name": "created_at",
2068
- "type": "timestamp with time zone",
2069
- "primaryKey": false,
2070
- "notNull": true,
2071
- "default": "now()"
2072
- },
2073
- "updated_at": {
2074
- "name": "updated_at",
2075
- "type": "timestamp with time zone",
2076
- "primaryKey": false,
2077
- "notNull": true,
2078
- "default": "now()"
2079
- }
2080
- },
2081
- "indexes": {
2082
- "payment_challenges_order_idx": {
2083
- "name": "payment_challenges_order_idx",
2084
- "columns": [
2085
- {
2086
- "expression": "order_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
- },
2098
- "foreignKeys": {
2099
- "payment_challenges_marketplace_id_marketplaces_id_fk": {
2100
- "name": "payment_challenges_marketplace_id_marketplaces_id_fk",
2101
- "tableFrom": "payment_challenges",
2102
- "tableTo": "marketplaces",
2103
- "columnsFrom": [
2104
- "marketplace_id"
2105
- ],
2106
- "columnsTo": [
2107
- "id"
2108
- ],
2109
- "onDelete": "cascade",
2110
- "onUpdate": "no action"
2111
- },
2112
- "payment_challenges_order_id_orders_id_fk": {
2113
- "name": "payment_challenges_order_id_orders_id_fk",
2114
- "tableFrom": "payment_challenges",
2115
- "tableTo": "orders",
2116
- "columnsFrom": [
2117
- "order_id"
2118
- ],
2119
- "columnsTo": [
2120
- "id"
2121
- ],
2122
- "onDelete": "cascade",
2123
- "onUpdate": "no action"
2124
- }
2125
- },
2126
- "compositePrimaryKeys": {},
2127
- "uniqueConstraints": {},
2128
- "policies": {},
2129
- "checkConstraints": {},
2130
- "isRLSEnabled": false
2131
- },
2132
- "public.payment_receipts": {
2133
- "name": "payment_receipts",
2134
- "schema": "",
2135
- "columns": {
2136
- "id": {
2137
- "name": "id",
2138
- "type": "text",
2139
- "primaryKey": true,
2140
- "notNull": true
2141
- },
2142
- "marketplace_id": {
2143
- "name": "marketplace_id",
2144
- "type": "text",
2145
- "primaryKey": false,
2146
- "notNull": true
2147
- },
2148
- "order_id": {
2149
- "name": "order_id",
2150
- "type": "text",
2151
- "primaryKey": false,
2152
- "notNull": true
2153
- },
2154
- "challenge_id": {
2155
- "name": "challenge_id",
2156
- "type": "text",
2157
- "primaryKey": false,
2158
- "notNull": true
2159
- },
2160
- "rail": {
2161
- "name": "rail",
2162
- "type": "text",
2163
- "primaryKey": false,
2164
- "notNull": true
2165
- },
2166
- "receipt_payload": {
2167
- "name": "receipt_payload",
2168
- "type": "jsonb",
2169
- "primaryKey": false,
2170
- "notNull": true
2171
- },
2172
- "verified_at": {
2173
- "name": "verified_at",
2174
- "type": "timestamp with time zone",
2175
- "primaryKey": false,
2176
- "notNull": true
2177
- },
2178
- "created_at": {
2179
- "name": "created_at",
2180
- "type": "timestamp with time zone",
2181
- "primaryKey": false,
2182
- "notNull": true,
2183
- "default": "now()"
2184
- }
2185
- },
2186
- "indexes": {
2187
- "payment_receipts_order_idx": {
2188
- "name": "payment_receipts_order_idx",
2189
- "columns": [
2190
- {
2191
- "expression": "order_id",
2192
- "isExpression": false,
2193
- "asc": true,
2194
- "nulls": "last"
2195
- }
2196
- ],
2197
- "isUnique": false,
2198
- "concurrently": false,
2199
- "method": "btree",
2200
- "with": {}
2201
- }
2202
- },
2203
- "foreignKeys": {
2204
- "payment_receipts_marketplace_id_marketplaces_id_fk": {
2205
- "name": "payment_receipts_marketplace_id_marketplaces_id_fk",
2206
- "tableFrom": "payment_receipts",
2207
- "tableTo": "marketplaces",
2208
- "columnsFrom": [
2209
- "marketplace_id"
2210
- ],
2211
- "columnsTo": [
2212
- "id"
2213
- ],
2214
- "onDelete": "cascade",
2215
- "onUpdate": "no action"
2216
- },
2217
- "payment_receipts_order_id_orders_id_fk": {
2218
- "name": "payment_receipts_order_id_orders_id_fk",
2219
- "tableFrom": "payment_receipts",
2220
- "tableTo": "orders",
2221
- "columnsFrom": [
2222
- "order_id"
2223
- ],
2224
- "columnsTo": [
2225
- "id"
2226
- ],
2227
- "onDelete": "cascade",
2228
- "onUpdate": "no action"
2229
- },
2230
- "payment_receipts_challenge_id_payment_challenges_id_fk": {
2231
- "name": "payment_receipts_challenge_id_payment_challenges_id_fk",
2232
- "tableFrom": "payment_receipts",
2233
- "tableTo": "payment_challenges",
2234
- "columnsFrom": [
2235
- "challenge_id"
2236
- ],
2237
- "columnsTo": [
2238
- "id"
2239
- ],
2240
- "onDelete": "cascade",
2241
- "onUpdate": "no action"
2242
- }
2243
- },
2244
- "compositePrimaryKeys": {},
2245
- "uniqueConstraints": {},
2246
- "policies": {},
2247
- "checkConstraints": {},
2248
- "isRLSEnabled": false
2249
- },
2250
- "public.reviews": {
2251
- "name": "reviews",
2252
- "schema": "",
2253
- "columns": {
2254
- "id": {
2255
- "name": "id",
2256
- "type": "text",
2257
- "primaryKey": true,
2258
- "notNull": true
2259
- },
2260
- "marketplace_id": {
2261
- "name": "marketplace_id",
2262
- "type": "text",
2263
- "primaryKey": false,
2264
- "notNull": true
2265
- },
2266
- "order_id": {
2267
- "name": "order_id",
2268
- "type": "text",
2269
- "primaryKey": false,
2270
- "notNull": true
2271
- },
2272
- "reviewer_actor_id": {
2273
- "name": "reviewer_actor_id",
2274
- "type": "text",
2275
- "primaryKey": false,
2276
- "notNull": true
2277
- },
2278
- "rating": {
2279
- "name": "rating",
2280
- "type": "integer",
2281
- "primaryKey": false,
2282
- "notNull": true
2283
- },
2284
- "comment": {
2285
- "name": "comment",
2286
- "type": "text",
2287
- "primaryKey": false,
2288
- "notNull": false
2289
- },
2290
- "created_at": {
2291
- "name": "created_at",
2292
- "type": "timestamp with time zone",
2293
- "primaryKey": false,
2294
- "notNull": true,
2295
- "default": "now()"
2296
- }
2297
- },
2298
- "indexes": {
2299
- "reviews_order_reviewer_uq": {
2300
- "name": "reviews_order_reviewer_uq",
2301
- "columns": [
2302
- {
2303
- "expression": "order_id",
2304
- "isExpression": false,
2305
- "asc": true,
2306
- "nulls": "last"
2307
- },
2308
- {
2309
- "expression": "reviewer_actor_id",
2310
- "isExpression": false,
2311
- "asc": true,
2312
- "nulls": "last"
2313
- }
2314
- ],
2315
- "isUnique": true,
2316
- "concurrently": false,
2317
- "method": "btree",
2318
- "with": {}
2319
- }
2320
- },
2321
- "foreignKeys": {
2322
- "reviews_marketplace_id_marketplaces_id_fk": {
2323
- "name": "reviews_marketplace_id_marketplaces_id_fk",
2324
- "tableFrom": "reviews",
2325
- "tableTo": "marketplaces",
2326
- "columnsFrom": [
2327
- "marketplace_id"
2328
- ],
2329
- "columnsTo": [
2330
- "id"
2331
- ],
2332
- "onDelete": "cascade",
2333
- "onUpdate": "no action"
2334
- },
2335
- "reviews_order_id_orders_id_fk": {
2336
- "name": "reviews_order_id_orders_id_fk",
2337
- "tableFrom": "reviews",
2338
- "tableTo": "orders",
2339
- "columnsFrom": [
2340
- "order_id"
2341
- ],
2342
- "columnsTo": [
2343
- "id"
2344
- ],
2345
- "onDelete": "cascade",
2346
- "onUpdate": "no action"
2347
- },
2348
- "reviews_reviewer_actor_id_actors_id_fk": {
2349
- "name": "reviews_reviewer_actor_id_actors_id_fk",
2350
- "tableFrom": "reviews",
2351
- "tableTo": "actors",
2352
- "columnsFrom": [
2353
- "reviewer_actor_id"
2354
- ],
2355
- "columnsTo": [
2356
- "id"
2357
- ],
2358
- "onDelete": "cascade",
2359
- "onUpdate": "no action"
2360
- }
2361
- },
2362
- "compositePrimaryKeys": {},
2363
- "uniqueConstraints": {},
2364
- "policies": {},
2365
- "checkConstraints": {},
2366
- "isRLSEnabled": false
2367
- },
2368
- "public.settlement_rules": {
2369
- "name": "settlement_rules",
2370
- "schema": "",
2371
- "columns": {
2372
- "id": {
2373
- "name": "id",
2374
- "type": "text",
2375
- "primaryKey": true,
2376
- "notNull": true
2377
- },
2378
- "marketplace_id": {
2379
- "name": "marketplace_id",
2380
- "type": "text",
2381
- "primaryKey": false,
2382
- "notNull": true
2383
- },
2384
- "name": {
2385
- "name": "name",
2386
- "type": "text",
2387
- "primaryKey": false,
2388
- "notNull": true
2389
- },
2390
- "rules": {
2391
- "name": "rules",
2392
- "type": "jsonb",
2393
- "primaryKey": false,
2394
- "notNull": true
2395
- },
2396
- "created_at": {
2397
- "name": "created_at",
2398
- "type": "timestamp with time zone",
2399
- "primaryKey": false,
2400
- "notNull": true,
2401
- "default": "now()"
2402
- }
2403
- },
2404
- "indexes": {
2405
- "settlement_rules_marketplace_idx": {
2406
- "name": "settlement_rules_marketplace_idx",
2407
- "columns": [
2408
- {
2409
- "expression": "marketplace_id",
2410
- "isExpression": false,
2411
- "asc": true,
2412
- "nulls": "last"
2413
- }
2414
- ],
2415
- "isUnique": false,
2416
- "concurrently": false,
2417
- "method": "btree",
2418
- "with": {}
2419
- }
2420
- },
2421
- "foreignKeys": {
2422
- "settlement_rules_marketplace_id_marketplaces_id_fk": {
2423
- "name": "settlement_rules_marketplace_id_marketplaces_id_fk",
2424
- "tableFrom": "settlement_rules",
2425
- "tableTo": "marketplaces",
2426
- "columnsFrom": [
2427
- "marketplace_id"
2428
- ],
2429
- "columnsTo": [
2430
- "id"
2431
- ],
2432
- "onDelete": "cascade",
2433
- "onUpdate": "no action"
2434
- }
2435
- },
2436
- "compositePrimaryKeys": {},
2437
- "uniqueConstraints": {},
2438
- "policies": {},
2439
- "checkConstraints": {},
2440
- "isRLSEnabled": false
2441
- },
2442
- "public.settlements": {
2443
- "name": "settlements",
2444
- "schema": "",
2445
- "columns": {
2446
- "id": {
2447
- "name": "id",
2448
- "type": "text",
2449
- "primaryKey": true,
2450
- "notNull": true
2451
- },
2452
- "marketplace_id": {
2453
- "name": "marketplace_id",
2454
- "type": "text",
2455
- "primaryKey": false,
2456
- "notNull": true
2457
- },
2458
- "order_id": {
2459
- "name": "order_id",
2460
- "type": "text",
2461
- "primaryKey": false,
2462
- "notNull": true
2463
- },
2464
- "status": {
2465
- "name": "status",
2466
- "type": "text",
2467
- "primaryKey": false,
2468
- "notNull": true,
2469
- "default": "'pending'"
2470
- },
2471
- "amount_minor": {
2472
- "name": "amount_minor",
2473
- "type": "integer",
2474
- "primaryKey": false,
2475
- "notNull": true
2476
- },
2477
- "currency": {
2478
- "name": "currency",
2479
- "type": "text",
2480
- "primaryKey": false,
2481
- "notNull": true
2482
- },
2483
- "metadata": {
2484
- "name": "metadata",
2485
- "type": "jsonb",
2486
- "primaryKey": false,
2487
- "notNull": false
2488
- },
2489
- "created_at": {
2490
- "name": "created_at",
2491
- "type": "timestamp with time zone",
2492
- "primaryKey": false,
2493
- "notNull": true,
2494
- "default": "now()"
2495
- },
2496
- "updated_at": {
2497
- "name": "updated_at",
2498
- "type": "timestamp with time zone",
2499
- "primaryKey": false,
2500
- "notNull": true,
2501
- "default": "now()"
2502
- }
2503
- },
2504
- "indexes": {
2505
- "settlements_order_idx": {
2506
- "name": "settlements_order_idx",
2507
- "columns": [
2508
- {
2509
- "expression": "order_id",
2510
- "isExpression": false,
2511
- "asc": true,
2512
- "nulls": "last"
2513
- }
2514
- ],
2515
- "isUnique": false,
2516
- "concurrently": false,
2517
- "method": "btree",
2518
- "with": {}
2519
- }
2520
- },
2521
- "foreignKeys": {
2522
- "settlements_marketplace_id_marketplaces_id_fk": {
2523
- "name": "settlements_marketplace_id_marketplaces_id_fk",
2524
- "tableFrom": "settlements",
2525
- "tableTo": "marketplaces",
2526
- "columnsFrom": [
2527
- "marketplace_id"
2528
- ],
2529
- "columnsTo": [
2530
- "id"
2531
- ],
2532
- "onDelete": "cascade",
2533
- "onUpdate": "no action"
2534
- },
2535
- "settlements_order_id_orders_id_fk": {
2536
- "name": "settlements_order_id_orders_id_fk",
2537
- "tableFrom": "settlements",
2538
- "tableTo": "orders",
2539
- "columnsFrom": [
2540
- "order_id"
2541
- ],
2542
- "columnsTo": [
2543
- "id"
2544
- ],
2545
- "onDelete": "cascade",
2546
- "onUpdate": "no action"
2547
- }
2548
- },
2549
- "compositePrimaryKeys": {},
2550
- "uniqueConstraints": {},
2551
- "policies": {},
2552
- "checkConstraints": {},
2553
- "isRLSEnabled": false
2554
- },
2555
- "public.webhook_deliveries": {
2556
- "name": "webhook_deliveries",
2557
- "schema": "",
2558
- "columns": {
2559
- "id": {
2560
- "name": "id",
2561
- "type": "text",
2562
- "primaryKey": true,
2563
- "notNull": true
2564
- },
2565
- "subscription_id": {
2566
- "name": "subscription_id",
2567
- "type": "text",
2568
- "primaryKey": false,
2569
- "notNull": true
2570
- },
2571
- "event_id": {
2572
- "name": "event_id",
2573
- "type": "text",
2574
- "primaryKey": false,
2575
- "notNull": true
2576
- },
2577
- "status": {
2578
- "name": "status",
2579
- "type": "text",
2580
- "primaryKey": false,
2581
- "notNull": true,
2582
- "default": "'pending'"
2583
- },
2584
- "attempts": {
2585
- "name": "attempts",
2586
- "type": "integer",
2587
- "primaryKey": false,
2588
- "notNull": true,
2589
- "default": 0
2590
- },
2591
- "last_error": {
2592
- "name": "last_error",
2593
- "type": "text",
2594
- "primaryKey": false,
2595
- "notNull": false
2596
- },
2597
- "created_at": {
2598
- "name": "created_at",
2599
- "type": "timestamp with time zone",
2600
- "primaryKey": false,
2601
- "notNull": true,
2602
- "default": "now()"
2603
- },
2604
- "updated_at": {
2605
- "name": "updated_at",
2606
- "type": "timestamp with time zone",
2607
- "primaryKey": false,
2608
- "notNull": true,
2609
- "default": "now()"
2610
- }
2611
- },
2612
- "indexes": {
2613
- "webhook_deliveries_status_idx": {
2614
- "name": "webhook_deliveries_status_idx",
2615
- "columns": [
2616
- {
2617
- "expression": "status",
2618
- "isExpression": false,
2619
- "asc": true,
2620
- "nulls": "last"
2621
- }
2622
- ],
2623
- "isUnique": false,
2624
- "concurrently": false,
2625
- "method": "btree",
2626
- "with": {}
2627
- }
2628
- },
2629
- "foreignKeys": {
2630
- "webhook_deliveries_subscription_id_webhook_subscriptions_id_fk": {
2631
- "name": "webhook_deliveries_subscription_id_webhook_subscriptions_id_fk",
2632
- "tableFrom": "webhook_deliveries",
2633
- "tableTo": "webhook_subscriptions",
2634
- "columnsFrom": [
2635
- "subscription_id"
2636
- ],
2637
- "columnsTo": [
2638
- "id"
2639
- ],
2640
- "onDelete": "cascade",
2641
- "onUpdate": "no action"
2642
- },
2643
- "webhook_deliveries_event_id_domain_events_id_fk": {
2644
- "name": "webhook_deliveries_event_id_domain_events_id_fk",
2645
- "tableFrom": "webhook_deliveries",
2646
- "tableTo": "domain_events",
2647
- "columnsFrom": [
2648
- "event_id"
2649
- ],
2650
- "columnsTo": [
2651
- "id"
2652
- ],
2653
- "onDelete": "cascade",
2654
- "onUpdate": "no action"
2655
- }
2656
- },
2657
- "compositePrimaryKeys": {},
2658
- "uniqueConstraints": {},
2659
- "policies": {},
2660
- "checkConstraints": {},
2661
- "isRLSEnabled": false
2662
- },
2663
- "public.webhook_subscriptions": {
2664
- "name": "webhook_subscriptions",
2665
- "schema": "",
2666
- "columns": {
2667
- "id": {
2668
- "name": "id",
2669
- "type": "text",
2670
- "primaryKey": true,
2671
- "notNull": true
2672
- },
2673
- "marketplace_id": {
2674
- "name": "marketplace_id",
2675
- "type": "text",
2676
- "primaryKey": false,
2677
- "notNull": true
2678
- },
2679
- "url": {
2680
- "name": "url",
2681
- "type": "text",
2682
- "primaryKey": false,
2683
- "notNull": true
2684
- },
2685
- "secret": {
2686
- "name": "secret",
2687
- "type": "text",
2688
- "primaryKey": false,
2689
- "notNull": true
2690
- },
2691
- "event_types": {
2692
- "name": "event_types",
2693
- "type": "jsonb",
2694
- "primaryKey": false,
2695
- "notNull": false
2696
- },
2697
- "created_at": {
2698
- "name": "created_at",
2699
- "type": "timestamp with time zone",
2700
- "primaryKey": false,
2701
- "notNull": true,
2702
- "default": "now()"
2703
- }
2704
- },
2705
- "indexes": {
2706
- "webhook_subscriptions_marketplace_idx": {
2707
- "name": "webhook_subscriptions_marketplace_idx",
2708
- "columns": [
2709
- {
2710
- "expression": "marketplace_id",
2711
- "isExpression": false,
2712
- "asc": true,
2713
- "nulls": "last"
2714
- }
2715
- ],
2716
- "isUnique": false,
2717
- "concurrently": false,
2718
- "method": "btree",
2719
- "with": {}
2720
- }
2721
- },
2722
- "foreignKeys": {
2723
- "webhook_subscriptions_marketplace_id_marketplaces_id_fk": {
2724
- "name": "webhook_subscriptions_marketplace_id_marketplaces_id_fk",
2725
- "tableFrom": "webhook_subscriptions",
2726
- "tableTo": "marketplaces",
2727
- "columnsFrom": [
2728
- "marketplace_id"
2729
- ],
2730
- "columnsTo": [
2731
- "id"
2732
- ],
2733
- "onDelete": "cascade",
2734
- "onUpdate": "no action"
2735
- }
2736
- },
2737
- "compositePrimaryKeys": {},
2738
- "uniqueConstraints": {},
2739
- "policies": {},
2740
- "checkConstraints": {},
2741
- "isRLSEnabled": false
2742
- }
2743
- },
2744
- "enums": {},
2745
- "schemas": {},
2746
- "sequences": {},
2747
- "roles": {},
2748
- "policies": {},
2749
- "views": {},
2750
- "_meta": {
2751
- "columns": {},
2752
- "schemas": {},
2753
- "tables": {}
2754
- }
2755
- }