@nymbalhq/platform 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +6 -0
  3. package/dist/{chunk-TRLERRUI.js → chunk-KH3BABMV.js} +10467 -7548
  4. package/dist/chunk-KH3BABMV.js.map +1 -0
  5. package/dist/{chunk-NNDIAIT6.js → chunk-TVKV5GBY.js} +102 -7
  6. package/dist/chunk-TVKV5GBY.js.map +1 -0
  7. package/dist/db/schema/index.d.ts +5745 -3404
  8. package/dist/db/schema/index.js +1 -1
  9. package/dist/index.d.ts +678 -47
  10. package/dist/index.js +4055 -2098
  11. package/dist/index.js.map +1 -1
  12. package/dist/register-XP5XVAXM.js +8 -0
  13. package/migrations/postgres/0019_carts_customer_idx.sql +1 -0
  14. package/migrations/postgres/0020_alert_confirmation_sent.sql +1 -0
  15. package/migrations/postgres/0021_proposals.sql +27 -0
  16. package/migrations/postgres/0022_order_source.sql +3 -0
  17. package/migrations/postgres/meta/0019_snapshot.json +2322 -0
  18. package/migrations/postgres/meta/0020_snapshot.json +2328 -0
  19. package/migrations/postgres/meta/0021_snapshot.json +2543 -0
  20. package/migrations/postgres/meta/0022_snapshot.json +2578 -0
  21. package/migrations/postgres/meta/_journal.json +28 -0
  22. package/migrations/sqlite/0019_carts_customer_idx.sql +1 -0
  23. package/migrations/sqlite/0020_alert_confirmation_sent.sql +1 -0
  24. package/migrations/sqlite/0021_proposals.sql +27 -0
  25. package/migrations/sqlite/0022_order_source.sql +3 -0
  26. package/migrations/sqlite/meta/0019_snapshot.json +2056 -0
  27. package/migrations/sqlite/meta/0020_snapshot.json +2063 -0
  28. package/migrations/sqlite/meta/0021_snapshot.json +2246 -0
  29. package/migrations/sqlite/meta/0022_snapshot.json +2270 -0
  30. package/migrations/sqlite/meta/_journal.json +28 -0
  31. package/package.json +24 -21
  32. package/dist/chunk-NNDIAIT6.js.map +0 -1
  33. package/dist/chunk-TRLERRUI.js.map +0 -1
  34. package/dist/register-SBGUI2L5.js +0 -8
  35. /package/dist/{register-SBGUI2L5.js.map → register-XP5XVAXM.js.map} +0 -0
@@ -0,0 +1,2543 @@
1
+ {
2
+ "id": "46250ef1-75f5-4923-9703-deb4de960726",
3
+ "prevId": "f5bbae8c-e9c2-42b2-a684-e1ac7248d2f2",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.alert_subscriptions": {
8
+ "name": "alert_subscriptions",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "text",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "email": {
18
+ "name": "email",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "kind": {
24
+ "name": "kind",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "variant_id": {
30
+ "name": "variant_id",
31
+ "type": "text",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "product_id": {
36
+ "name": "product_id",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": true
40
+ },
41
+ "status": {
42
+ "name": "status",
43
+ "type": "text",
44
+ "primaryKey": false,
45
+ "notNull": true
46
+ },
47
+ "confirm_token": {
48
+ "name": "confirm_token",
49
+ "type": "text",
50
+ "primaryKey": false,
51
+ "notNull": true
52
+ },
53
+ "unsubscribe_token": {
54
+ "name": "unsubscribe_token",
55
+ "type": "text",
56
+ "primaryKey": false,
57
+ "notNull": true
58
+ },
59
+ "origin": {
60
+ "name": "origin",
61
+ "type": "text",
62
+ "primaryKey": false,
63
+ "notNull": true
64
+ },
65
+ "baseline_price_minor": {
66
+ "name": "baseline_price_minor",
67
+ "type": "integer",
68
+ "primaryKey": false,
69
+ "notNull": false
70
+ },
71
+ "created_at": {
72
+ "name": "created_at",
73
+ "type": "timestamp with time zone",
74
+ "primaryKey": false,
75
+ "notNull": true
76
+ },
77
+ "updated_at": {
78
+ "name": "updated_at",
79
+ "type": "timestamp with time zone",
80
+ "primaryKey": false,
81
+ "notNull": true
82
+ },
83
+ "confirmed_at": {
84
+ "name": "confirmed_at",
85
+ "type": "timestamp with time zone",
86
+ "primaryKey": false,
87
+ "notNull": false
88
+ },
89
+ "confirmation_sent_at": {
90
+ "name": "confirmation_sent_at",
91
+ "type": "timestamp with time zone",
92
+ "primaryKey": false,
93
+ "notNull": false
94
+ }
95
+ },
96
+ "indexes": {
97
+ "alert_subscriptions_address_unique": {
98
+ "name": "alert_subscriptions_address_unique",
99
+ "columns": [
100
+ {
101
+ "expression": "email",
102
+ "isExpression": false,
103
+ "asc": true,
104
+ "nulls": "last"
105
+ },
106
+ {
107
+ "expression": "variant_id",
108
+ "isExpression": false,
109
+ "asc": true,
110
+ "nulls": "last"
111
+ },
112
+ {
113
+ "expression": "kind",
114
+ "isExpression": false,
115
+ "asc": true,
116
+ "nulls": "last"
117
+ }
118
+ ],
119
+ "isUnique": true,
120
+ "concurrently": false,
121
+ "method": "btree",
122
+ "with": {}
123
+ },
124
+ "alert_subscriptions_confirm_token_unique": {
125
+ "name": "alert_subscriptions_confirm_token_unique",
126
+ "columns": [
127
+ {
128
+ "expression": "confirm_token",
129
+ "isExpression": false,
130
+ "asc": true,
131
+ "nulls": "last"
132
+ }
133
+ ],
134
+ "isUnique": true,
135
+ "concurrently": false,
136
+ "method": "btree",
137
+ "with": {}
138
+ },
139
+ "alert_subscriptions_unsubscribe_token_unique": {
140
+ "name": "alert_subscriptions_unsubscribe_token_unique",
141
+ "columns": [
142
+ {
143
+ "expression": "unsubscribe_token",
144
+ "isExpression": false,
145
+ "asc": true,
146
+ "nulls": "last"
147
+ }
148
+ ],
149
+ "isUnique": true,
150
+ "concurrently": false,
151
+ "method": "btree",
152
+ "with": {}
153
+ },
154
+ "alert_subscriptions_fan_out_idx": {
155
+ "name": "alert_subscriptions_fan_out_idx",
156
+ "columns": [
157
+ {
158
+ "expression": "variant_id",
159
+ "isExpression": false,
160
+ "asc": true,
161
+ "nulls": "last"
162
+ },
163
+ {
164
+ "expression": "kind",
165
+ "isExpression": false,
166
+ "asc": true,
167
+ "nulls": "last"
168
+ },
169
+ {
170
+ "expression": "status",
171
+ "isExpression": false,
172
+ "asc": true,
173
+ "nulls": "last"
174
+ }
175
+ ],
176
+ "isUnique": false,
177
+ "concurrently": false,
178
+ "method": "btree",
179
+ "with": {}
180
+ }
181
+ },
182
+ "foreignKeys": {},
183
+ "compositePrimaryKeys": {},
184
+ "uniqueConstraints": {},
185
+ "policies": {},
186
+ "checkConstraints": {
187
+ "alert_subscriptions_kind": {
188
+ "name": "alert_subscriptions_kind",
189
+ "value": "\"alert_subscriptions\".\"kind\" IN ('back_in_stock', 'price_drop')"
190
+ },
191
+ "alert_subscriptions_status": {
192
+ "name": "alert_subscriptions_status",
193
+ "value": "\"alert_subscriptions\".\"status\" IN ('pending', 'active', 'fired', 'unsubscribed')"
194
+ }
195
+ },
196
+ "isRLSEnabled": false
197
+ },
198
+ "public.audit_entries": {
199
+ "name": "audit_entries",
200
+ "schema": "",
201
+ "columns": {
202
+ "id": {
203
+ "name": "id",
204
+ "type": "text",
205
+ "primaryKey": true,
206
+ "notNull": true
207
+ },
208
+ "at": {
209
+ "name": "at",
210
+ "type": "timestamp with time zone",
211
+ "primaryKey": false,
212
+ "notNull": true
213
+ },
214
+ "actor_kind": {
215
+ "name": "actor_kind",
216
+ "type": "text",
217
+ "primaryKey": false,
218
+ "notNull": true
219
+ },
220
+ "actor_id": {
221
+ "name": "actor_id",
222
+ "type": "text",
223
+ "primaryKey": false,
224
+ "notNull": true
225
+ },
226
+ "command": {
227
+ "name": "command",
228
+ "type": "text",
229
+ "primaryKey": false,
230
+ "notNull": true
231
+ },
232
+ "subjects": {
233
+ "name": "subjects",
234
+ "type": "jsonb",
235
+ "primaryKey": false,
236
+ "notNull": true
237
+ },
238
+ "correlation_id": {
239
+ "name": "correlation_id",
240
+ "type": "text",
241
+ "primaryKey": false,
242
+ "notNull": false
243
+ },
244
+ "idempotency_key": {
245
+ "name": "idempotency_key",
246
+ "type": "text",
247
+ "primaryKey": false,
248
+ "notNull": false
249
+ },
250
+ "request_hash": {
251
+ "name": "request_hash",
252
+ "type": "text",
253
+ "primaryKey": false,
254
+ "notNull": false
255
+ },
256
+ "outcome": {
257
+ "name": "outcome",
258
+ "type": "text",
259
+ "primaryKey": false,
260
+ "notNull": true
261
+ },
262
+ "response_status": {
263
+ "name": "response_status",
264
+ "type": "integer",
265
+ "primaryKey": false,
266
+ "notNull": false
267
+ },
268
+ "response_body": {
269
+ "name": "response_body",
270
+ "type": "jsonb",
271
+ "primaryKey": false,
272
+ "notNull": false
273
+ }
274
+ },
275
+ "indexes": {
276
+ "audit_entries_applied_key_unique": {
277
+ "name": "audit_entries_applied_key_unique",
278
+ "columns": [
279
+ {
280
+ "expression": "actor_id",
281
+ "isExpression": false,
282
+ "asc": true,
283
+ "nulls": "last"
284
+ },
285
+ {
286
+ "expression": "command",
287
+ "isExpression": false,
288
+ "asc": true,
289
+ "nulls": "last"
290
+ },
291
+ {
292
+ "expression": "idempotency_key",
293
+ "isExpression": false,
294
+ "asc": true,
295
+ "nulls": "last"
296
+ }
297
+ ],
298
+ "isUnique": true,
299
+ "where": "\"audit_entries\".\"outcome\" = 'applied' AND \"audit_entries\".\"idempotency_key\" IS NOT NULL",
300
+ "concurrently": false,
301
+ "method": "btree",
302
+ "with": {}
303
+ },
304
+ "audit_entries_at_idx": {
305
+ "name": "audit_entries_at_idx",
306
+ "columns": [
307
+ {
308
+ "expression": "at",
309
+ "isExpression": false,
310
+ "asc": true,
311
+ "nulls": "last"
312
+ },
313
+ {
314
+ "expression": "id",
315
+ "isExpression": false,
316
+ "asc": true,
317
+ "nulls": "last"
318
+ }
319
+ ],
320
+ "isUnique": false,
321
+ "concurrently": false,
322
+ "method": "btree",
323
+ "with": {}
324
+ },
325
+ "audit_entries_correlation_idx": {
326
+ "name": "audit_entries_correlation_idx",
327
+ "columns": [
328
+ {
329
+ "expression": "correlation_id",
330
+ "isExpression": false,
331
+ "asc": true,
332
+ "nulls": "last"
333
+ }
334
+ ],
335
+ "isUnique": false,
336
+ "concurrently": false,
337
+ "method": "btree",
338
+ "with": {}
339
+ }
340
+ },
341
+ "foreignKeys": {},
342
+ "compositePrimaryKeys": {},
343
+ "uniqueConstraints": {},
344
+ "policies": {},
345
+ "checkConstraints": {
346
+ "audit_entries_outcome": {
347
+ "name": "audit_entries_outcome",
348
+ "value": "\"audit_entries\".\"outcome\" IN ('applied', 'refused', 'replayed')"
349
+ }
350
+ },
351
+ "isRLSEnabled": false
352
+ },
353
+ "public.carts": {
354
+ "name": "carts",
355
+ "schema": "",
356
+ "columns": {
357
+ "token": {
358
+ "name": "token",
359
+ "type": "text",
360
+ "primaryKey": true,
361
+ "notNull": true
362
+ },
363
+ "customer_id": {
364
+ "name": "customer_id",
365
+ "type": "text",
366
+ "primaryKey": false,
367
+ "notNull": false
368
+ },
369
+ "currency": {
370
+ "name": "currency",
371
+ "type": "text",
372
+ "primaryKey": false,
373
+ "notNull": true
374
+ },
375
+ "items": {
376
+ "name": "items",
377
+ "type": "jsonb",
378
+ "primaryKey": false,
379
+ "notNull": true,
380
+ "default": "'[]'::jsonb"
381
+ },
382
+ "line_count": {
383
+ "name": "line_count",
384
+ "type": "integer",
385
+ "primaryKey": false,
386
+ "notNull": true,
387
+ "default": 0
388
+ },
389
+ "subtotal_minor": {
390
+ "name": "subtotal_minor",
391
+ "type": "integer",
392
+ "primaryKey": false,
393
+ "notNull": true,
394
+ "default": 0
395
+ },
396
+ "expires_at": {
397
+ "name": "expires_at",
398
+ "type": "timestamp with time zone",
399
+ "primaryKey": false,
400
+ "notNull": true
401
+ },
402
+ "created_at": {
403
+ "name": "created_at",
404
+ "type": "timestamp with time zone",
405
+ "primaryKey": false,
406
+ "notNull": true
407
+ },
408
+ "updated_at": {
409
+ "name": "updated_at",
410
+ "type": "timestamp with time zone",
411
+ "primaryKey": false,
412
+ "notNull": true
413
+ },
414
+ "abandoned_notified_at": {
415
+ "name": "abandoned_notified_at",
416
+ "type": "timestamp with time zone",
417
+ "primaryKey": false,
418
+ "notNull": false
419
+ }
420
+ },
421
+ "indexes": {
422
+ "carts_expires_idx": {
423
+ "name": "carts_expires_idx",
424
+ "columns": [
425
+ {
426
+ "expression": "expires_at",
427
+ "isExpression": false,
428
+ "asc": true,
429
+ "nulls": "last"
430
+ }
431
+ ],
432
+ "isUnique": false,
433
+ "concurrently": false,
434
+ "method": "btree",
435
+ "with": {}
436
+ },
437
+ "carts_updated_idx": {
438
+ "name": "carts_updated_idx",
439
+ "columns": [
440
+ {
441
+ "expression": "updated_at",
442
+ "isExpression": false,
443
+ "asc": true,
444
+ "nulls": "last"
445
+ }
446
+ ],
447
+ "isUnique": false,
448
+ "concurrently": false,
449
+ "method": "btree",
450
+ "with": {}
451
+ },
452
+ "carts_customer_idx": {
453
+ "name": "carts_customer_idx",
454
+ "columns": [
455
+ {
456
+ "expression": "customer_id",
457
+ "isExpression": false,
458
+ "asc": true,
459
+ "nulls": "last"
460
+ }
461
+ ],
462
+ "isUnique": false,
463
+ "where": "\"carts\".\"customer_id\" IS NOT NULL",
464
+ "concurrently": false,
465
+ "method": "btree",
466
+ "with": {}
467
+ }
468
+ },
469
+ "foreignKeys": {},
470
+ "compositePrimaryKeys": {},
471
+ "uniqueConstraints": {},
472
+ "policies": {},
473
+ "checkConstraints": {},
474
+ "isRLSEnabled": false
475
+ },
476
+ "public.categories": {
477
+ "name": "categories",
478
+ "schema": "",
479
+ "columns": {
480
+ "id": {
481
+ "name": "id",
482
+ "type": "text",
483
+ "primaryKey": true,
484
+ "notNull": true
485
+ },
486
+ "parent_id": {
487
+ "name": "parent_id",
488
+ "type": "text",
489
+ "primaryKey": false,
490
+ "notNull": false
491
+ },
492
+ "slug": {
493
+ "name": "slug",
494
+ "type": "text",
495
+ "primaryKey": false,
496
+ "notNull": true
497
+ },
498
+ "name": {
499
+ "name": "name",
500
+ "type": "text",
501
+ "primaryKey": false,
502
+ "notNull": true
503
+ },
504
+ "description": {
505
+ "name": "description",
506
+ "type": "text",
507
+ "primaryKey": false,
508
+ "notNull": true,
509
+ "default": "''"
510
+ },
511
+ "position": {
512
+ "name": "position",
513
+ "type": "integer",
514
+ "primaryKey": false,
515
+ "notNull": true,
516
+ "default": 0
517
+ },
518
+ "created_at": {
519
+ "name": "created_at",
520
+ "type": "timestamp with time zone",
521
+ "primaryKey": false,
522
+ "notNull": true
523
+ }
524
+ },
525
+ "indexes": {
526
+ "categories_slug_unique": {
527
+ "name": "categories_slug_unique",
528
+ "columns": [
529
+ {
530
+ "expression": "slug",
531
+ "isExpression": false,
532
+ "asc": true,
533
+ "nulls": "last"
534
+ }
535
+ ],
536
+ "isUnique": true,
537
+ "concurrently": false,
538
+ "method": "btree",
539
+ "with": {}
540
+ },
541
+ "categories_parent_idx": {
542
+ "name": "categories_parent_idx",
543
+ "columns": [
544
+ {
545
+ "expression": "parent_id",
546
+ "isExpression": false,
547
+ "asc": true,
548
+ "nulls": "last"
549
+ }
550
+ ],
551
+ "isUnique": false,
552
+ "concurrently": false,
553
+ "method": "btree",
554
+ "with": {}
555
+ }
556
+ },
557
+ "foreignKeys": {},
558
+ "compositePrimaryKeys": {},
559
+ "uniqueConstraints": {},
560
+ "policies": {},
561
+ "checkConstraints": {},
562
+ "isRLSEnabled": false
563
+ },
564
+ "public.customers": {
565
+ "name": "customers",
566
+ "schema": "",
567
+ "columns": {
568
+ "id": {
569
+ "name": "id",
570
+ "type": "text",
571
+ "primaryKey": true,
572
+ "notNull": true
573
+ },
574
+ "email": {
575
+ "name": "email",
576
+ "type": "text",
577
+ "primaryKey": false,
578
+ "notNull": true
579
+ },
580
+ "password_hash": {
581
+ "name": "password_hash",
582
+ "type": "text",
583
+ "primaryKey": false,
584
+ "notNull": true
585
+ },
586
+ "first_name": {
587
+ "name": "first_name",
588
+ "type": "text",
589
+ "primaryKey": false,
590
+ "notNull": true,
591
+ "default": "''"
592
+ },
593
+ "last_name": {
594
+ "name": "last_name",
595
+ "type": "text",
596
+ "primaryKey": false,
597
+ "notNull": true,
598
+ "default": "''"
599
+ },
600
+ "phone": {
601
+ "name": "phone",
602
+ "type": "text",
603
+ "primaryKey": false,
604
+ "notNull": true,
605
+ "default": "''"
606
+ },
607
+ "addresses": {
608
+ "name": "addresses",
609
+ "type": "jsonb",
610
+ "primaryKey": false,
611
+ "notNull": true,
612
+ "default": "'[]'::jsonb"
613
+ },
614
+ "order_count": {
615
+ "name": "order_count",
616
+ "type": "integer",
617
+ "primaryKey": false,
618
+ "notNull": true,
619
+ "default": 0
620
+ },
621
+ "total_spent_minor": {
622
+ "name": "total_spent_minor",
623
+ "type": "integer",
624
+ "primaryKey": false,
625
+ "notNull": true,
626
+ "default": 0
627
+ },
628
+ "metadata": {
629
+ "name": "metadata",
630
+ "type": "jsonb",
631
+ "primaryKey": false,
632
+ "notNull": true,
633
+ "default": "'{}'::jsonb"
634
+ },
635
+ "roles": {
636
+ "name": "roles",
637
+ "type": "jsonb",
638
+ "primaryKey": false,
639
+ "notNull": true,
640
+ "default": "'[\"customer\"]'::jsonb"
641
+ },
642
+ "requires_password_reset": {
643
+ "name": "requires_password_reset",
644
+ "type": "boolean",
645
+ "primaryKey": false,
646
+ "notNull": true,
647
+ "default": false
648
+ },
649
+ "created_at": {
650
+ "name": "created_at",
651
+ "type": "timestamp with time zone",
652
+ "primaryKey": false,
653
+ "notNull": true
654
+ },
655
+ "updated_at": {
656
+ "name": "updated_at",
657
+ "type": "timestamp with time zone",
658
+ "primaryKey": false,
659
+ "notNull": true
660
+ }
661
+ },
662
+ "indexes": {
663
+ "customers_email_unique": {
664
+ "name": "customers_email_unique",
665
+ "columns": [
666
+ {
667
+ "expression": "email",
668
+ "isExpression": false,
669
+ "asc": true,
670
+ "nulls": "last"
671
+ }
672
+ ],
673
+ "isUnique": true,
674
+ "concurrently": false,
675
+ "method": "btree",
676
+ "with": {}
677
+ }
678
+ },
679
+ "foreignKeys": {},
680
+ "compositePrimaryKeys": {},
681
+ "uniqueConstraints": {},
682
+ "policies": {},
683
+ "checkConstraints": {},
684
+ "isRLSEnabled": false
685
+ },
686
+ "public.email_suppressions": {
687
+ "name": "email_suppressions",
688
+ "schema": "",
689
+ "columns": {
690
+ "email": {
691
+ "name": "email",
692
+ "type": "text",
693
+ "primaryKey": true,
694
+ "notNull": true
695
+ },
696
+ "reason": {
697
+ "name": "reason",
698
+ "type": "text",
699
+ "primaryKey": false,
700
+ "notNull": true
701
+ },
702
+ "event_id": {
703
+ "name": "event_id",
704
+ "type": "text",
705
+ "primaryKey": false,
706
+ "notNull": true
707
+ },
708
+ "created_at": {
709
+ "name": "created_at",
710
+ "type": "timestamp with time zone",
711
+ "primaryKey": false,
712
+ "notNull": true
713
+ }
714
+ },
715
+ "indexes": {},
716
+ "foreignKeys": {},
717
+ "compositePrimaryKeys": {},
718
+ "uniqueConstraints": {},
719
+ "policies": {},
720
+ "checkConstraints": {
721
+ "email_suppressions_reason": {
722
+ "name": "email_suppressions_reason",
723
+ "value": "\"email_suppressions\".\"reason\" IN ('hard_bounce', 'complaint')"
724
+ }
725
+ },
726
+ "isRLSEnabled": false
727
+ },
728
+ "public.events": {
729
+ "name": "events",
730
+ "schema": "",
731
+ "columns": {
732
+ "seq": {
733
+ "name": "seq",
734
+ "type": "bigserial",
735
+ "primaryKey": true,
736
+ "notNull": true
737
+ },
738
+ "id": {
739
+ "name": "id",
740
+ "type": "text",
741
+ "primaryKey": false,
742
+ "notNull": true
743
+ },
744
+ "type": {
745
+ "name": "type",
746
+ "type": "text",
747
+ "primaryKey": false,
748
+ "notNull": true
749
+ },
750
+ "envelope": {
751
+ "name": "envelope",
752
+ "type": "jsonb",
753
+ "primaryKey": false,
754
+ "notNull": true
755
+ },
756
+ "correlation_id": {
757
+ "name": "correlation_id",
758
+ "type": "text",
759
+ "primaryKey": false,
760
+ "notNull": true
761
+ },
762
+ "created_at": {
763
+ "name": "created_at",
764
+ "type": "timestamp with time zone",
765
+ "primaryKey": false,
766
+ "notNull": true
767
+ },
768
+ "subject_type": {
769
+ "name": "subject_type",
770
+ "type": "text",
771
+ "primaryKey": false,
772
+ "notNull": false
773
+ },
774
+ "subject_id": {
775
+ "name": "subject_id",
776
+ "type": "text",
777
+ "primaryKey": false,
778
+ "notNull": false
779
+ },
780
+ "delivered_at": {
781
+ "name": "delivered_at",
782
+ "type": "timestamp with time zone",
783
+ "primaryKey": false,
784
+ "notNull": false
785
+ },
786
+ "attempts": {
787
+ "name": "attempts",
788
+ "type": "integer",
789
+ "primaryKey": false,
790
+ "notNull": true,
791
+ "default": 0
792
+ },
793
+ "dead_at": {
794
+ "name": "dead_at",
795
+ "type": "timestamp with time zone",
796
+ "primaryKey": false,
797
+ "notNull": false
798
+ },
799
+ "retry_at": {
800
+ "name": "retry_at",
801
+ "type": "timestamp with time zone",
802
+ "primaryKey": false,
803
+ "notNull": false
804
+ }
805
+ },
806
+ "indexes": {
807
+ "events_id_unique": {
808
+ "name": "events_id_unique",
809
+ "columns": [
810
+ {
811
+ "expression": "id",
812
+ "isExpression": false,
813
+ "asc": true,
814
+ "nulls": "last"
815
+ }
816
+ ],
817
+ "isUnique": true,
818
+ "concurrently": false,
819
+ "method": "btree",
820
+ "with": {}
821
+ },
822
+ "events_undelivered_idx": {
823
+ "name": "events_undelivered_idx",
824
+ "columns": [
825
+ {
826
+ "expression": "delivered_at",
827
+ "isExpression": false,
828
+ "asc": true,
829
+ "nulls": "last"
830
+ },
831
+ {
832
+ "expression": "seq",
833
+ "isExpression": false,
834
+ "asc": true,
835
+ "nulls": "last"
836
+ }
837
+ ],
838
+ "isUnique": false,
839
+ "concurrently": false,
840
+ "method": "btree",
841
+ "with": {}
842
+ },
843
+ "events_correlation_idx": {
844
+ "name": "events_correlation_idx",
845
+ "columns": [
846
+ {
847
+ "expression": "correlation_id",
848
+ "isExpression": false,
849
+ "asc": true,
850
+ "nulls": "last"
851
+ },
852
+ {
853
+ "expression": "seq",
854
+ "isExpression": false,
855
+ "asc": true,
856
+ "nulls": "last"
857
+ }
858
+ ],
859
+ "isUnique": false,
860
+ "concurrently": false,
861
+ "method": "btree",
862
+ "with": {}
863
+ },
864
+ "events_catch_up_idx": {
865
+ "name": "events_catch_up_idx",
866
+ "columns": [
867
+ {
868
+ "expression": "dead_at",
869
+ "isExpression": false,
870
+ "asc": true,
871
+ "nulls": "last"
872
+ },
873
+ {
874
+ "expression": "delivered_at",
875
+ "isExpression": false,
876
+ "asc": true,
877
+ "nulls": "last"
878
+ },
879
+ {
880
+ "expression": "seq",
881
+ "isExpression": false,
882
+ "asc": true,
883
+ "nulls": "last"
884
+ }
885
+ ],
886
+ "isUnique": false,
887
+ "concurrently": false,
888
+ "method": "btree",
889
+ "with": {}
890
+ },
891
+ "events_subject_idx": {
892
+ "name": "events_subject_idx",
893
+ "columns": [
894
+ {
895
+ "expression": "subject_type",
896
+ "isExpression": false,
897
+ "asc": true,
898
+ "nulls": "last"
899
+ },
900
+ {
901
+ "expression": "subject_id",
902
+ "isExpression": false,
903
+ "asc": true,
904
+ "nulls": "last"
905
+ },
906
+ {
907
+ "expression": "seq",
908
+ "isExpression": false,
909
+ "asc": true,
910
+ "nulls": "last"
911
+ }
912
+ ],
913
+ "isUnique": false,
914
+ "concurrently": false,
915
+ "method": "btree",
916
+ "with": {}
917
+ }
918
+ },
919
+ "foreignKeys": {},
920
+ "compositePrimaryKeys": {},
921
+ "uniqueConstraints": {},
922
+ "policies": {},
923
+ "checkConstraints": {},
924
+ "isRLSEnabled": false
925
+ },
926
+ "public.inventory_reservations": {
927
+ "name": "inventory_reservations",
928
+ "schema": "",
929
+ "columns": {
930
+ "reservation_id": {
931
+ "name": "reservation_id",
932
+ "type": "text",
933
+ "primaryKey": true,
934
+ "notNull": true
935
+ },
936
+ "variant_id": {
937
+ "name": "variant_id",
938
+ "type": "text",
939
+ "primaryKey": false,
940
+ "notNull": true
941
+ },
942
+ "qty": {
943
+ "name": "qty",
944
+ "type": "integer",
945
+ "primaryKey": false,
946
+ "notNull": true
947
+ },
948
+ "order_ref": {
949
+ "name": "order_ref",
950
+ "type": "text",
951
+ "primaryKey": false,
952
+ "notNull": false
953
+ },
954
+ "expires_at": {
955
+ "name": "expires_at",
956
+ "type": "timestamp with time zone",
957
+ "primaryKey": false,
958
+ "notNull": true
959
+ },
960
+ "created_at": {
961
+ "name": "created_at",
962
+ "type": "timestamp with time zone",
963
+ "primaryKey": false,
964
+ "notNull": true
965
+ }
966
+ },
967
+ "indexes": {
968
+ "inv_reservations_variant_idx": {
969
+ "name": "inv_reservations_variant_idx",
970
+ "columns": [
971
+ {
972
+ "expression": "variant_id",
973
+ "isExpression": false,
974
+ "asc": true,
975
+ "nulls": "last"
976
+ }
977
+ ],
978
+ "isUnique": false,
979
+ "concurrently": false,
980
+ "method": "btree",
981
+ "with": {}
982
+ },
983
+ "inv_reservations_expires_idx": {
984
+ "name": "inv_reservations_expires_idx",
985
+ "columns": [
986
+ {
987
+ "expression": "expires_at",
988
+ "isExpression": false,
989
+ "asc": true,
990
+ "nulls": "last"
991
+ }
992
+ ],
993
+ "isUnique": false,
994
+ "concurrently": false,
995
+ "method": "btree",
996
+ "with": {}
997
+ }
998
+ },
999
+ "foreignKeys": {},
1000
+ "compositePrimaryKeys": {},
1001
+ "uniqueConstraints": {},
1002
+ "policies": {},
1003
+ "checkConstraints": {},
1004
+ "isRLSEnabled": false
1005
+ },
1006
+ "public.order_access_keys": {
1007
+ "name": "order_access_keys",
1008
+ "schema": "",
1009
+ "columns": {
1010
+ "id": {
1011
+ "name": "id",
1012
+ "type": "text",
1013
+ "primaryKey": true,
1014
+ "notNull": true
1015
+ },
1016
+ "order_id": {
1017
+ "name": "order_id",
1018
+ "type": "text",
1019
+ "primaryKey": false,
1020
+ "notNull": true
1021
+ },
1022
+ "key_hash": {
1023
+ "name": "key_hash",
1024
+ "type": "text",
1025
+ "primaryKey": false,
1026
+ "notNull": true
1027
+ },
1028
+ "purpose": {
1029
+ "name": "purpose",
1030
+ "type": "text",
1031
+ "primaryKey": false,
1032
+ "notNull": true
1033
+ },
1034
+ "created_at": {
1035
+ "name": "created_at",
1036
+ "type": "timestamp with time zone",
1037
+ "primaryKey": false,
1038
+ "notNull": true
1039
+ },
1040
+ "expires_at": {
1041
+ "name": "expires_at",
1042
+ "type": "timestamp with time zone",
1043
+ "primaryKey": false,
1044
+ "notNull": true
1045
+ }
1046
+ },
1047
+ "indexes": {
1048
+ "order_access_keys_key_hash_idx": {
1049
+ "name": "order_access_keys_key_hash_idx",
1050
+ "columns": [
1051
+ {
1052
+ "expression": "key_hash",
1053
+ "isExpression": false,
1054
+ "asc": true,
1055
+ "nulls": "last"
1056
+ }
1057
+ ],
1058
+ "isUnique": true,
1059
+ "concurrently": false,
1060
+ "method": "btree",
1061
+ "with": {}
1062
+ },
1063
+ "order_access_keys_order_idx": {
1064
+ "name": "order_access_keys_order_idx",
1065
+ "columns": [
1066
+ {
1067
+ "expression": "order_id",
1068
+ "isExpression": false,
1069
+ "asc": true,
1070
+ "nulls": "last"
1071
+ }
1072
+ ],
1073
+ "isUnique": false,
1074
+ "concurrently": false,
1075
+ "method": "btree",
1076
+ "with": {}
1077
+ }
1078
+ },
1079
+ "foreignKeys": {},
1080
+ "compositePrimaryKeys": {},
1081
+ "uniqueConstraints": {},
1082
+ "policies": {},
1083
+ "checkConstraints": {},
1084
+ "isRLSEnabled": false
1085
+ },
1086
+ "public.order_history": {
1087
+ "name": "order_history",
1088
+ "schema": "",
1089
+ "columns": {
1090
+ "id": {
1091
+ "name": "id",
1092
+ "type": "text",
1093
+ "primaryKey": true,
1094
+ "notNull": true
1095
+ },
1096
+ "order_id": {
1097
+ "name": "order_id",
1098
+ "type": "text",
1099
+ "primaryKey": false,
1100
+ "notNull": true
1101
+ },
1102
+ "from_status": {
1103
+ "name": "from_status",
1104
+ "type": "text",
1105
+ "primaryKey": false,
1106
+ "notNull": false
1107
+ },
1108
+ "to_status": {
1109
+ "name": "to_status",
1110
+ "type": "text",
1111
+ "primaryKey": false,
1112
+ "notNull": true
1113
+ },
1114
+ "actor": {
1115
+ "name": "actor",
1116
+ "type": "text",
1117
+ "primaryKey": false,
1118
+ "notNull": true
1119
+ },
1120
+ "note": {
1121
+ "name": "note",
1122
+ "type": "text",
1123
+ "primaryKey": false,
1124
+ "notNull": true,
1125
+ "default": "''"
1126
+ },
1127
+ "timestamp": {
1128
+ "name": "timestamp",
1129
+ "type": "timestamp with time zone",
1130
+ "primaryKey": false,
1131
+ "notNull": true
1132
+ }
1133
+ },
1134
+ "indexes": {
1135
+ "order_history_order_idx": {
1136
+ "name": "order_history_order_idx",
1137
+ "columns": [
1138
+ {
1139
+ "expression": "order_id",
1140
+ "isExpression": false,
1141
+ "asc": true,
1142
+ "nulls": "last"
1143
+ }
1144
+ ],
1145
+ "isUnique": false,
1146
+ "concurrently": false,
1147
+ "method": "btree",
1148
+ "with": {}
1149
+ }
1150
+ },
1151
+ "foreignKeys": {},
1152
+ "compositePrimaryKeys": {},
1153
+ "uniqueConstraints": {},
1154
+ "policies": {},
1155
+ "checkConstraints": {},
1156
+ "isRLSEnabled": false
1157
+ },
1158
+ "public.order_refunds": {
1159
+ "name": "order_refunds",
1160
+ "schema": "",
1161
+ "columns": {
1162
+ "id": {
1163
+ "name": "id",
1164
+ "type": "text",
1165
+ "primaryKey": true,
1166
+ "notNull": true
1167
+ },
1168
+ "order_id": {
1169
+ "name": "order_id",
1170
+ "type": "text",
1171
+ "primaryKey": false,
1172
+ "notNull": true
1173
+ },
1174
+ "amount_minor": {
1175
+ "name": "amount_minor",
1176
+ "type": "integer",
1177
+ "primaryKey": false,
1178
+ "notNull": true
1179
+ },
1180
+ "currency": {
1181
+ "name": "currency",
1182
+ "type": "text",
1183
+ "primaryKey": false,
1184
+ "notNull": true
1185
+ },
1186
+ "provider_refund_id": {
1187
+ "name": "provider_refund_id",
1188
+ "type": "text",
1189
+ "primaryKey": false,
1190
+ "notNull": false
1191
+ },
1192
+ "status": {
1193
+ "name": "status",
1194
+ "type": "text",
1195
+ "primaryKey": false,
1196
+ "notNull": true,
1197
+ "default": "'pending'"
1198
+ },
1199
+ "reason": {
1200
+ "name": "reason",
1201
+ "type": "text",
1202
+ "primaryKey": false,
1203
+ "notNull": false
1204
+ },
1205
+ "actor": {
1206
+ "name": "actor",
1207
+ "type": "text",
1208
+ "primaryKey": false,
1209
+ "notNull": true
1210
+ },
1211
+ "created_at": {
1212
+ "name": "created_at",
1213
+ "type": "timestamp with time zone",
1214
+ "primaryKey": false,
1215
+ "notNull": true
1216
+ },
1217
+ "request_id": {
1218
+ "name": "request_id",
1219
+ "type": "text",
1220
+ "primaryKey": false,
1221
+ "notNull": false
1222
+ }
1223
+ },
1224
+ "indexes": {
1225
+ "order_refunds_order_idx": {
1226
+ "name": "order_refunds_order_idx",
1227
+ "columns": [
1228
+ {
1229
+ "expression": "order_id",
1230
+ "isExpression": false,
1231
+ "asc": true,
1232
+ "nulls": "last"
1233
+ }
1234
+ ],
1235
+ "isUnique": false,
1236
+ "concurrently": false,
1237
+ "method": "btree",
1238
+ "with": {}
1239
+ },
1240
+ "order_refunds_order_request_idx": {
1241
+ "name": "order_refunds_order_request_idx",
1242
+ "columns": [
1243
+ {
1244
+ "expression": "order_id",
1245
+ "isExpression": false,
1246
+ "asc": true,
1247
+ "nulls": "last"
1248
+ },
1249
+ {
1250
+ "expression": "request_id",
1251
+ "isExpression": false,
1252
+ "asc": true,
1253
+ "nulls": "last"
1254
+ }
1255
+ ],
1256
+ "isUnique": true,
1257
+ "concurrently": false,
1258
+ "method": "btree",
1259
+ "with": {}
1260
+ }
1261
+ },
1262
+ "foreignKeys": {},
1263
+ "compositePrimaryKeys": {},
1264
+ "uniqueConstraints": {},
1265
+ "policies": {},
1266
+ "checkConstraints": {},
1267
+ "isRLSEnabled": false
1268
+ },
1269
+ "public.order_sequences": {
1270
+ "name": "order_sequences",
1271
+ "schema": "",
1272
+ "columns": {
1273
+ "id": {
1274
+ "name": "id",
1275
+ "type": "integer",
1276
+ "primaryKey": true,
1277
+ "notNull": true
1278
+ },
1279
+ "next_value": {
1280
+ "name": "next_value",
1281
+ "type": "integer",
1282
+ "primaryKey": false,
1283
+ "notNull": true
1284
+ }
1285
+ },
1286
+ "indexes": {},
1287
+ "foreignKeys": {},
1288
+ "compositePrimaryKeys": {},
1289
+ "uniqueConstraints": {},
1290
+ "policies": {},
1291
+ "checkConstraints": {},
1292
+ "isRLSEnabled": false
1293
+ },
1294
+ "public.order_shipments": {
1295
+ "name": "order_shipments",
1296
+ "schema": "",
1297
+ "columns": {
1298
+ "order_id": {
1299
+ "name": "order_id",
1300
+ "type": "text",
1301
+ "primaryKey": true,
1302
+ "notNull": true
1303
+ },
1304
+ "carrier": {
1305
+ "name": "carrier",
1306
+ "type": "text",
1307
+ "primaryKey": false,
1308
+ "notNull": true
1309
+ },
1310
+ "tracking_number": {
1311
+ "name": "tracking_number",
1312
+ "type": "text",
1313
+ "primaryKey": false,
1314
+ "notNull": true
1315
+ },
1316
+ "created_at": {
1317
+ "name": "created_at",
1318
+ "type": "timestamp with time zone",
1319
+ "primaryKey": false,
1320
+ "notNull": true
1321
+ }
1322
+ },
1323
+ "indexes": {
1324
+ "order_shipments_tracking_number_idx": {
1325
+ "name": "order_shipments_tracking_number_idx",
1326
+ "columns": [
1327
+ {
1328
+ "expression": "tracking_number",
1329
+ "isExpression": false,
1330
+ "asc": true,
1331
+ "nulls": "last"
1332
+ }
1333
+ ],
1334
+ "isUnique": false,
1335
+ "concurrently": false,
1336
+ "method": "btree",
1337
+ "with": {}
1338
+ }
1339
+ },
1340
+ "foreignKeys": {
1341
+ "order_shipments_order_id_orders_id_fk": {
1342
+ "name": "order_shipments_order_id_orders_id_fk",
1343
+ "tableFrom": "order_shipments",
1344
+ "tableTo": "orders",
1345
+ "columnsFrom": [
1346
+ "order_id"
1347
+ ],
1348
+ "columnsTo": [
1349
+ "id"
1350
+ ],
1351
+ "onDelete": "no action",
1352
+ "onUpdate": "no action"
1353
+ }
1354
+ },
1355
+ "compositePrimaryKeys": {},
1356
+ "uniqueConstraints": {},
1357
+ "policies": {},
1358
+ "checkConstraints": {},
1359
+ "isRLSEnabled": false
1360
+ },
1361
+ "public.orders": {
1362
+ "name": "orders",
1363
+ "schema": "",
1364
+ "columns": {
1365
+ "id": {
1366
+ "name": "id",
1367
+ "type": "text",
1368
+ "primaryKey": true,
1369
+ "notNull": true
1370
+ },
1371
+ "order_number": {
1372
+ "name": "order_number",
1373
+ "type": "text",
1374
+ "primaryKey": false,
1375
+ "notNull": true
1376
+ },
1377
+ "sequence": {
1378
+ "name": "sequence",
1379
+ "type": "integer",
1380
+ "primaryKey": false,
1381
+ "notNull": true
1382
+ },
1383
+ "customer_id": {
1384
+ "name": "customer_id",
1385
+ "type": "text",
1386
+ "primaryKey": false,
1387
+ "notNull": false
1388
+ },
1389
+ "status": {
1390
+ "name": "status",
1391
+ "type": "text",
1392
+ "primaryKey": false,
1393
+ "notNull": true,
1394
+ "default": "'pending'"
1395
+ },
1396
+ "email": {
1397
+ "name": "email",
1398
+ "type": "text",
1399
+ "primaryKey": false,
1400
+ "notNull": true
1401
+ },
1402
+ "billing_address": {
1403
+ "name": "billing_address",
1404
+ "type": "jsonb",
1405
+ "primaryKey": false,
1406
+ "notNull": true
1407
+ },
1408
+ "shipping_address": {
1409
+ "name": "shipping_address",
1410
+ "type": "jsonb",
1411
+ "primaryKey": false,
1412
+ "notNull": true
1413
+ },
1414
+ "line_items": {
1415
+ "name": "line_items",
1416
+ "type": "jsonb",
1417
+ "primaryKey": false,
1418
+ "notNull": true
1419
+ },
1420
+ "subtotal_minor": {
1421
+ "name": "subtotal_minor",
1422
+ "type": "integer",
1423
+ "primaryKey": false,
1424
+ "notNull": true
1425
+ },
1426
+ "tax_total_minor": {
1427
+ "name": "tax_total_minor",
1428
+ "type": "integer",
1429
+ "primaryKey": false,
1430
+ "notNull": true,
1431
+ "default": 0
1432
+ },
1433
+ "shipping_total_minor": {
1434
+ "name": "shipping_total_minor",
1435
+ "type": "integer",
1436
+ "primaryKey": false,
1437
+ "notNull": true,
1438
+ "default": 0
1439
+ },
1440
+ "discount_total_minor": {
1441
+ "name": "discount_total_minor",
1442
+ "type": "integer",
1443
+ "primaryKey": false,
1444
+ "notNull": true,
1445
+ "default": 0
1446
+ },
1447
+ "total_minor": {
1448
+ "name": "total_minor",
1449
+ "type": "integer",
1450
+ "primaryKey": false,
1451
+ "notNull": true
1452
+ },
1453
+ "currency": {
1454
+ "name": "currency",
1455
+ "type": "text",
1456
+ "primaryKey": false,
1457
+ "notNull": true
1458
+ },
1459
+ "notes": {
1460
+ "name": "notes",
1461
+ "type": "text",
1462
+ "primaryKey": false,
1463
+ "notNull": true,
1464
+ "default": "''"
1465
+ },
1466
+ "metadata": {
1467
+ "name": "metadata",
1468
+ "type": "jsonb",
1469
+ "primaryKey": false,
1470
+ "notNull": true,
1471
+ "default": "'{}'::jsonb"
1472
+ },
1473
+ "payment_intent_id": {
1474
+ "name": "payment_intent_id",
1475
+ "type": "text",
1476
+ "primaryKey": false,
1477
+ "notNull": false
1478
+ },
1479
+ "cart_token": {
1480
+ "name": "cart_token",
1481
+ "type": "text",
1482
+ "primaryKey": false,
1483
+ "notNull": false
1484
+ },
1485
+ "captured_minor": {
1486
+ "name": "captured_minor",
1487
+ "type": "integer",
1488
+ "primaryKey": false,
1489
+ "notNull": true,
1490
+ "default": 0
1491
+ },
1492
+ "captured_at": {
1493
+ "name": "captured_at",
1494
+ "type": "timestamp with time zone",
1495
+ "primaryKey": false,
1496
+ "notNull": false
1497
+ },
1498
+ "refunded_minor": {
1499
+ "name": "refunded_minor",
1500
+ "type": "integer",
1501
+ "primaryKey": false,
1502
+ "notNull": true,
1503
+ "default": 0
1504
+ },
1505
+ "capture_method": {
1506
+ "name": "capture_method",
1507
+ "type": "text",
1508
+ "primaryKey": false,
1509
+ "notNull": false
1510
+ },
1511
+ "created_at": {
1512
+ "name": "created_at",
1513
+ "type": "timestamp with time zone",
1514
+ "primaryKey": false,
1515
+ "notNull": true
1516
+ },
1517
+ "updated_at": {
1518
+ "name": "updated_at",
1519
+ "type": "timestamp with time zone",
1520
+ "primaryKey": false,
1521
+ "notNull": true
1522
+ }
1523
+ },
1524
+ "indexes": {
1525
+ "orders_number_unique": {
1526
+ "name": "orders_number_unique",
1527
+ "columns": [
1528
+ {
1529
+ "expression": "order_number",
1530
+ "isExpression": false,
1531
+ "asc": true,
1532
+ "nulls": "last"
1533
+ }
1534
+ ],
1535
+ "isUnique": true,
1536
+ "concurrently": false,
1537
+ "method": "btree",
1538
+ "with": {}
1539
+ },
1540
+ "orders_sequence_unique": {
1541
+ "name": "orders_sequence_unique",
1542
+ "columns": [
1543
+ {
1544
+ "expression": "sequence",
1545
+ "isExpression": false,
1546
+ "asc": true,
1547
+ "nulls": "last"
1548
+ }
1549
+ ],
1550
+ "isUnique": true,
1551
+ "concurrently": false,
1552
+ "method": "btree",
1553
+ "with": {}
1554
+ },
1555
+ "orders_customer_idx": {
1556
+ "name": "orders_customer_idx",
1557
+ "columns": [
1558
+ {
1559
+ "expression": "customer_id",
1560
+ "isExpression": false,
1561
+ "asc": true,
1562
+ "nulls": "last"
1563
+ }
1564
+ ],
1565
+ "isUnique": false,
1566
+ "concurrently": false,
1567
+ "method": "btree",
1568
+ "with": {}
1569
+ },
1570
+ "orders_status_idx": {
1571
+ "name": "orders_status_idx",
1572
+ "columns": [
1573
+ {
1574
+ "expression": "status",
1575
+ "isExpression": false,
1576
+ "asc": true,
1577
+ "nulls": "last"
1578
+ }
1579
+ ],
1580
+ "isUnique": false,
1581
+ "concurrently": false,
1582
+ "method": "btree",
1583
+ "with": {}
1584
+ },
1585
+ "orders_payment_intent_idx": {
1586
+ "name": "orders_payment_intent_idx",
1587
+ "columns": [
1588
+ {
1589
+ "expression": "payment_intent_id",
1590
+ "isExpression": false,
1591
+ "asc": true,
1592
+ "nulls": "last"
1593
+ }
1594
+ ],
1595
+ "isUnique": false,
1596
+ "concurrently": false,
1597
+ "method": "btree",
1598
+ "with": {}
1599
+ },
1600
+ "orders_pending_cart_unique": {
1601
+ "name": "orders_pending_cart_unique",
1602
+ "columns": [
1603
+ {
1604
+ "expression": "cart_token",
1605
+ "isExpression": false,
1606
+ "asc": true,
1607
+ "nulls": "last"
1608
+ }
1609
+ ],
1610
+ "isUnique": true,
1611
+ "where": "status = 'pending'",
1612
+ "concurrently": false,
1613
+ "method": "btree",
1614
+ "with": {}
1615
+ }
1616
+ },
1617
+ "foreignKeys": {},
1618
+ "compositePrimaryKeys": {},
1619
+ "uniqueConstraints": {},
1620
+ "policies": {},
1621
+ "checkConstraints": {},
1622
+ "isRLSEnabled": false
1623
+ },
1624
+ "public.processed_events": {
1625
+ "name": "processed_events",
1626
+ "schema": "",
1627
+ "columns": {
1628
+ "handler_name": {
1629
+ "name": "handler_name",
1630
+ "type": "text",
1631
+ "primaryKey": false,
1632
+ "notNull": true
1633
+ },
1634
+ "event_id": {
1635
+ "name": "event_id",
1636
+ "type": "text",
1637
+ "primaryKey": false,
1638
+ "notNull": true
1639
+ },
1640
+ "processed_at": {
1641
+ "name": "processed_at",
1642
+ "type": "timestamp with time zone",
1643
+ "primaryKey": false,
1644
+ "notNull": true
1645
+ }
1646
+ },
1647
+ "indexes": {},
1648
+ "foreignKeys": {},
1649
+ "compositePrimaryKeys": {
1650
+ "processed_events_handler_name_event_id_pk": {
1651
+ "name": "processed_events_handler_name_event_id_pk",
1652
+ "columns": [
1653
+ "handler_name",
1654
+ "event_id"
1655
+ ]
1656
+ }
1657
+ },
1658
+ "uniqueConstraints": {},
1659
+ "policies": {},
1660
+ "checkConstraints": {},
1661
+ "isRLSEnabled": false
1662
+ },
1663
+ "public.product_categories": {
1664
+ "name": "product_categories",
1665
+ "schema": "",
1666
+ "columns": {
1667
+ "product_id": {
1668
+ "name": "product_id",
1669
+ "type": "text",
1670
+ "primaryKey": false,
1671
+ "notNull": true
1672
+ },
1673
+ "category_id": {
1674
+ "name": "category_id",
1675
+ "type": "text",
1676
+ "primaryKey": false,
1677
+ "notNull": true
1678
+ }
1679
+ },
1680
+ "indexes": {
1681
+ "product_categories_category_idx": {
1682
+ "name": "product_categories_category_idx",
1683
+ "columns": [
1684
+ {
1685
+ "expression": "category_id",
1686
+ "isExpression": false,
1687
+ "asc": true,
1688
+ "nulls": "last"
1689
+ }
1690
+ ],
1691
+ "isUnique": false,
1692
+ "concurrently": false,
1693
+ "method": "btree",
1694
+ "with": {}
1695
+ }
1696
+ },
1697
+ "foreignKeys": {},
1698
+ "compositePrimaryKeys": {
1699
+ "product_categories_product_id_category_id_pk": {
1700
+ "name": "product_categories_product_id_category_id_pk",
1701
+ "columns": [
1702
+ "product_id",
1703
+ "category_id"
1704
+ ]
1705
+ }
1706
+ },
1707
+ "uniqueConstraints": {},
1708
+ "policies": {},
1709
+ "checkConstraints": {},
1710
+ "isRLSEnabled": false
1711
+ },
1712
+ "public.products": {
1713
+ "name": "products",
1714
+ "schema": "",
1715
+ "columns": {
1716
+ "id": {
1717
+ "name": "id",
1718
+ "type": "text",
1719
+ "primaryKey": true,
1720
+ "notNull": true
1721
+ },
1722
+ "slug": {
1723
+ "name": "slug",
1724
+ "type": "text",
1725
+ "primaryKey": false,
1726
+ "notNull": true
1727
+ },
1728
+ "name": {
1729
+ "name": "name",
1730
+ "type": "text",
1731
+ "primaryKey": false,
1732
+ "notNull": true
1733
+ },
1734
+ "description": {
1735
+ "name": "description",
1736
+ "type": "text",
1737
+ "primaryKey": false,
1738
+ "notNull": true,
1739
+ "default": "''"
1740
+ },
1741
+ "short_description": {
1742
+ "name": "short_description",
1743
+ "type": "text",
1744
+ "primaryKey": false,
1745
+ "notNull": true,
1746
+ "default": "''"
1747
+ },
1748
+ "status": {
1749
+ "name": "status",
1750
+ "type": "text",
1751
+ "primaryKey": false,
1752
+ "notNull": true,
1753
+ "default": "'draft'"
1754
+ },
1755
+ "type": {
1756
+ "name": "type",
1757
+ "type": "text",
1758
+ "primaryKey": false,
1759
+ "notNull": true,
1760
+ "default": "'simple'"
1761
+ },
1762
+ "seo_title": {
1763
+ "name": "seo_title",
1764
+ "type": "text",
1765
+ "primaryKey": false,
1766
+ "notNull": true,
1767
+ "default": "''"
1768
+ },
1769
+ "seo_description": {
1770
+ "name": "seo_description",
1771
+ "type": "text",
1772
+ "primaryKey": false,
1773
+ "notNull": true,
1774
+ "default": "''"
1775
+ },
1776
+ "media": {
1777
+ "name": "media",
1778
+ "type": "jsonb",
1779
+ "primaryKey": false,
1780
+ "notNull": true,
1781
+ "default": "'[]'::jsonb"
1782
+ },
1783
+ "metadata": {
1784
+ "name": "metadata",
1785
+ "type": "jsonb",
1786
+ "primaryKey": false,
1787
+ "notNull": true,
1788
+ "default": "'{}'::jsonb"
1789
+ },
1790
+ "created_at": {
1791
+ "name": "created_at",
1792
+ "type": "timestamp with time zone",
1793
+ "primaryKey": false,
1794
+ "notNull": true
1795
+ },
1796
+ "updated_at": {
1797
+ "name": "updated_at",
1798
+ "type": "timestamp with time zone",
1799
+ "primaryKey": false,
1800
+ "notNull": true
1801
+ }
1802
+ },
1803
+ "indexes": {
1804
+ "products_slug_unique": {
1805
+ "name": "products_slug_unique",
1806
+ "columns": [
1807
+ {
1808
+ "expression": "slug",
1809
+ "isExpression": false,
1810
+ "asc": true,
1811
+ "nulls": "last"
1812
+ }
1813
+ ],
1814
+ "isUnique": true,
1815
+ "concurrently": false,
1816
+ "method": "btree",
1817
+ "with": {}
1818
+ },
1819
+ "products_status_idx": {
1820
+ "name": "products_status_idx",
1821
+ "columns": [
1822
+ {
1823
+ "expression": "status",
1824
+ "isExpression": false,
1825
+ "asc": true,
1826
+ "nulls": "last"
1827
+ }
1828
+ ],
1829
+ "isUnique": false,
1830
+ "concurrently": false,
1831
+ "method": "btree",
1832
+ "with": {}
1833
+ }
1834
+ },
1835
+ "foreignKeys": {},
1836
+ "compositePrimaryKeys": {},
1837
+ "uniqueConstraints": {},
1838
+ "policies": {},
1839
+ "checkConstraints": {},
1840
+ "isRLSEnabled": false
1841
+ },
1842
+ "public.proposals": {
1843
+ "name": "proposals",
1844
+ "schema": "",
1845
+ "columns": {
1846
+ "id": {
1847
+ "name": "id",
1848
+ "type": "text",
1849
+ "primaryKey": true,
1850
+ "notNull": true
1851
+ },
1852
+ "tool": {
1853
+ "name": "tool",
1854
+ "type": "text",
1855
+ "primaryKey": false,
1856
+ "notNull": true
1857
+ },
1858
+ "command": {
1859
+ "name": "command",
1860
+ "type": "text",
1861
+ "primaryKey": false,
1862
+ "notNull": true
1863
+ },
1864
+ "args": {
1865
+ "name": "args",
1866
+ "type": "jsonb",
1867
+ "primaryKey": false,
1868
+ "notNull": true
1869
+ },
1870
+ "handles": {
1871
+ "name": "handles",
1872
+ "type": "jsonb",
1873
+ "primaryKey": false,
1874
+ "notNull": false
1875
+ },
1876
+ "idempotency_key": {
1877
+ "name": "idempotency_key",
1878
+ "type": "text",
1879
+ "primaryKey": false,
1880
+ "notNull": false
1881
+ },
1882
+ "proposer_id": {
1883
+ "name": "proposer_id",
1884
+ "type": "text",
1885
+ "primaryKey": false,
1886
+ "notNull": false
1887
+ },
1888
+ "agent_name": {
1889
+ "name": "agent_name",
1890
+ "type": "text",
1891
+ "primaryKey": false,
1892
+ "notNull": true
1893
+ },
1894
+ "agent_version": {
1895
+ "name": "agent_version",
1896
+ "type": "text",
1897
+ "primaryKey": false,
1898
+ "notNull": false
1899
+ },
1900
+ "correlation_id": {
1901
+ "name": "correlation_id",
1902
+ "type": "text",
1903
+ "primaryKey": false,
1904
+ "notNull": true
1905
+ },
1906
+ "status": {
1907
+ "name": "status",
1908
+ "type": "text",
1909
+ "primaryKey": false,
1910
+ "notNull": true
1911
+ },
1912
+ "decided_by_kind": {
1913
+ "name": "decided_by_kind",
1914
+ "type": "text",
1915
+ "primaryKey": false,
1916
+ "notNull": false
1917
+ },
1918
+ "decided_by": {
1919
+ "name": "decided_by",
1920
+ "type": "text",
1921
+ "primaryKey": false,
1922
+ "notNull": false
1923
+ },
1924
+ "decided_at": {
1925
+ "name": "decided_at",
1926
+ "type": "timestamp with time zone",
1927
+ "primaryKey": false,
1928
+ "notNull": false
1929
+ },
1930
+ "reason": {
1931
+ "name": "reason",
1932
+ "type": "text",
1933
+ "primaryKey": false,
1934
+ "notNull": false
1935
+ },
1936
+ "outcome_status": {
1937
+ "name": "outcome_status",
1938
+ "type": "integer",
1939
+ "primaryKey": false,
1940
+ "notNull": false
1941
+ },
1942
+ "outcome_code": {
1943
+ "name": "outcome_code",
1944
+ "type": "text",
1945
+ "primaryKey": false,
1946
+ "notNull": false
1947
+ },
1948
+ "outcome_message": {
1949
+ "name": "outcome_message",
1950
+ "type": "text",
1951
+ "primaryKey": false,
1952
+ "notNull": false
1953
+ },
1954
+ "created_at": {
1955
+ "name": "created_at",
1956
+ "type": "timestamp with time zone",
1957
+ "primaryKey": false,
1958
+ "notNull": true
1959
+ },
1960
+ "settled_at": {
1961
+ "name": "settled_at",
1962
+ "type": "timestamp with time zone",
1963
+ "primaryKey": false,
1964
+ "notNull": false
1965
+ }
1966
+ },
1967
+ "indexes": {
1968
+ "proposals_key_unique": {
1969
+ "name": "proposals_key_unique",
1970
+ "columns": [
1971
+ {
1972
+ "expression": "proposer_id",
1973
+ "isExpression": false,
1974
+ "asc": true,
1975
+ "nulls": "last"
1976
+ },
1977
+ {
1978
+ "expression": "tool",
1979
+ "isExpression": false,
1980
+ "asc": true,
1981
+ "nulls": "last"
1982
+ },
1983
+ {
1984
+ "expression": "idempotency_key",
1985
+ "isExpression": false,
1986
+ "asc": true,
1987
+ "nulls": "last"
1988
+ }
1989
+ ],
1990
+ "isUnique": true,
1991
+ "where": "\"proposals\".\"proposer_id\" IS NOT NULL AND \"proposals\".\"idempotency_key\" IS NOT NULL",
1992
+ "concurrently": false,
1993
+ "method": "btree",
1994
+ "with": {}
1995
+ },
1996
+ "proposals_created_idx": {
1997
+ "name": "proposals_created_idx",
1998
+ "columns": [
1999
+ {
2000
+ "expression": "created_at",
2001
+ "isExpression": false,
2002
+ "asc": true,
2003
+ "nulls": "last"
2004
+ },
2005
+ {
2006
+ "expression": "id",
2007
+ "isExpression": false,
2008
+ "asc": true,
2009
+ "nulls": "last"
2010
+ }
2011
+ ],
2012
+ "isUnique": false,
2013
+ "concurrently": false,
2014
+ "method": "btree",
2015
+ "with": {}
2016
+ },
2017
+ "proposals_status_idx": {
2018
+ "name": "proposals_status_idx",
2019
+ "columns": [
2020
+ {
2021
+ "expression": "status",
2022
+ "isExpression": false,
2023
+ "asc": true,
2024
+ "nulls": "last"
2025
+ },
2026
+ {
2027
+ "expression": "created_at",
2028
+ "isExpression": false,
2029
+ "asc": true,
2030
+ "nulls": "last"
2031
+ },
2032
+ {
2033
+ "expression": "id",
2034
+ "isExpression": false,
2035
+ "asc": true,
2036
+ "nulls": "last"
2037
+ }
2038
+ ],
2039
+ "isUnique": false,
2040
+ "concurrently": false,
2041
+ "method": "btree",
2042
+ "with": {}
2043
+ }
2044
+ },
2045
+ "foreignKeys": {},
2046
+ "compositePrimaryKeys": {},
2047
+ "uniqueConstraints": {},
2048
+ "policies": {},
2049
+ "checkConstraints": {
2050
+ "proposals_status": {
2051
+ "name": "proposals_status",
2052
+ "value": "\"proposals\".\"status\" IN ('pending', 'approved', 'rejected', 'applied', 'failed')"
2053
+ }
2054
+ },
2055
+ "isRLSEnabled": false
2056
+ },
2057
+ "public.refresh_tokens": {
2058
+ "name": "refresh_tokens",
2059
+ "schema": "",
2060
+ "columns": {
2061
+ "id": {
2062
+ "name": "id",
2063
+ "type": "text",
2064
+ "primaryKey": true,
2065
+ "notNull": true
2066
+ },
2067
+ "customer_id": {
2068
+ "name": "customer_id",
2069
+ "type": "text",
2070
+ "primaryKey": false,
2071
+ "notNull": true
2072
+ },
2073
+ "token_hash": {
2074
+ "name": "token_hash",
2075
+ "type": "text",
2076
+ "primaryKey": false,
2077
+ "notNull": true
2078
+ },
2079
+ "revoked_at": {
2080
+ "name": "revoked_at",
2081
+ "type": "timestamp with time zone",
2082
+ "primaryKey": false,
2083
+ "notNull": false
2084
+ },
2085
+ "replaced_by_jti": {
2086
+ "name": "replaced_by_jti",
2087
+ "type": "text",
2088
+ "primaryKey": false,
2089
+ "notNull": false
2090
+ },
2091
+ "expires_at": {
2092
+ "name": "expires_at",
2093
+ "type": "timestamp with time zone",
2094
+ "primaryKey": false,
2095
+ "notNull": true
2096
+ },
2097
+ "created_at": {
2098
+ "name": "created_at",
2099
+ "type": "timestamp with time zone",
2100
+ "primaryKey": false,
2101
+ "notNull": true
2102
+ }
2103
+ },
2104
+ "indexes": {
2105
+ "refresh_tokens_customer_idx": {
2106
+ "name": "refresh_tokens_customer_idx",
2107
+ "columns": [
2108
+ {
2109
+ "expression": "customer_id",
2110
+ "isExpression": false,
2111
+ "asc": true,
2112
+ "nulls": "last"
2113
+ }
2114
+ ],
2115
+ "isUnique": false,
2116
+ "concurrently": false,
2117
+ "method": "btree",
2118
+ "with": {}
2119
+ }
2120
+ },
2121
+ "foreignKeys": {},
2122
+ "compositePrimaryKeys": {},
2123
+ "uniqueConstraints": {},
2124
+ "policies": {},
2125
+ "checkConstraints": {},
2126
+ "isRLSEnabled": false
2127
+ },
2128
+ "public.reviews": {
2129
+ "name": "reviews",
2130
+ "schema": "",
2131
+ "columns": {
2132
+ "id": {
2133
+ "name": "id",
2134
+ "type": "text",
2135
+ "primaryKey": true,
2136
+ "notNull": true
2137
+ },
2138
+ "product_id": {
2139
+ "name": "product_id",
2140
+ "type": "text",
2141
+ "primaryKey": false,
2142
+ "notNull": true
2143
+ },
2144
+ "customer_id": {
2145
+ "name": "customer_id",
2146
+ "type": "text",
2147
+ "primaryKey": false,
2148
+ "notNull": false
2149
+ },
2150
+ "order_id": {
2151
+ "name": "order_id",
2152
+ "type": "text",
2153
+ "primaryKey": false,
2154
+ "notNull": false
2155
+ },
2156
+ "rating": {
2157
+ "name": "rating",
2158
+ "type": "integer",
2159
+ "primaryKey": false,
2160
+ "notNull": true
2161
+ },
2162
+ "title": {
2163
+ "name": "title",
2164
+ "type": "text",
2165
+ "primaryKey": false,
2166
+ "notNull": true,
2167
+ "default": "''"
2168
+ },
2169
+ "body": {
2170
+ "name": "body",
2171
+ "type": "text",
2172
+ "primaryKey": false,
2173
+ "notNull": true,
2174
+ "default": "''"
2175
+ },
2176
+ "moderation_status": {
2177
+ "name": "moderation_status",
2178
+ "type": "text",
2179
+ "primaryKey": false,
2180
+ "notNull": true,
2181
+ "default": "'pending'"
2182
+ },
2183
+ "submitted_at": {
2184
+ "name": "submitted_at",
2185
+ "type": "timestamp with time zone",
2186
+ "primaryKey": false,
2187
+ "notNull": true
2188
+ },
2189
+ "moderated_at": {
2190
+ "name": "moderated_at",
2191
+ "type": "timestamp with time zone",
2192
+ "primaryKey": false,
2193
+ "notNull": false
2194
+ },
2195
+ "moderated_by": {
2196
+ "name": "moderated_by",
2197
+ "type": "text",
2198
+ "primaryKey": false,
2199
+ "notNull": false
2200
+ }
2201
+ },
2202
+ "indexes": {
2203
+ "reviews_product_idx": {
2204
+ "name": "reviews_product_idx",
2205
+ "columns": [
2206
+ {
2207
+ "expression": "product_id",
2208
+ "isExpression": false,
2209
+ "asc": true,
2210
+ "nulls": "last"
2211
+ }
2212
+ ],
2213
+ "isUnique": false,
2214
+ "concurrently": false,
2215
+ "method": "btree",
2216
+ "with": {}
2217
+ },
2218
+ "reviews_status_idx": {
2219
+ "name": "reviews_status_idx",
2220
+ "columns": [
2221
+ {
2222
+ "expression": "moderation_status",
2223
+ "isExpression": false,
2224
+ "asc": true,
2225
+ "nulls": "last"
2226
+ }
2227
+ ],
2228
+ "isUnique": false,
2229
+ "concurrently": false,
2230
+ "method": "btree",
2231
+ "with": {}
2232
+ }
2233
+ },
2234
+ "foreignKeys": {},
2235
+ "compositePrimaryKeys": {},
2236
+ "uniqueConstraints": {},
2237
+ "policies": {},
2238
+ "checkConstraints": {},
2239
+ "isRLSEnabled": false
2240
+ },
2241
+ "public.settings": {
2242
+ "name": "settings",
2243
+ "schema": "",
2244
+ "columns": {
2245
+ "slot": {
2246
+ "name": "slot",
2247
+ "type": "text",
2248
+ "primaryKey": false,
2249
+ "notNull": true
2250
+ },
2251
+ "path": {
2252
+ "name": "path",
2253
+ "type": "text",
2254
+ "primaryKey": false,
2255
+ "notNull": true
2256
+ },
2257
+ "ciphertext": {
2258
+ "name": "ciphertext",
2259
+ "type": "bytea",
2260
+ "primaryKey": false,
2261
+ "notNull": false
2262
+ },
2263
+ "plain": {
2264
+ "name": "plain",
2265
+ "type": "text",
2266
+ "primaryKey": false,
2267
+ "notNull": false
2268
+ },
2269
+ "iv": {
2270
+ "name": "iv",
2271
+ "type": "bytea",
2272
+ "primaryKey": false,
2273
+ "notNull": false
2274
+ },
2275
+ "tag": {
2276
+ "name": "tag",
2277
+ "type": "bytea",
2278
+ "primaryKey": false,
2279
+ "notNull": false
2280
+ },
2281
+ "key_id": {
2282
+ "name": "key_id",
2283
+ "type": "text",
2284
+ "primaryKey": false,
2285
+ "notNull": false
2286
+ },
2287
+ "updated_at": {
2288
+ "name": "updated_at",
2289
+ "type": "timestamp with time zone",
2290
+ "primaryKey": false,
2291
+ "notNull": true
2292
+ },
2293
+ "updated_by": {
2294
+ "name": "updated_by",
2295
+ "type": "text",
2296
+ "primaryKey": false,
2297
+ "notNull": false
2298
+ }
2299
+ },
2300
+ "indexes": {},
2301
+ "foreignKeys": {},
2302
+ "compositePrimaryKeys": {
2303
+ "settings_slot_path_pk": {
2304
+ "name": "settings_slot_path_pk",
2305
+ "columns": [
2306
+ "slot",
2307
+ "path"
2308
+ ]
2309
+ }
2310
+ },
2311
+ "uniqueConstraints": {},
2312
+ "policies": {},
2313
+ "checkConstraints": {
2314
+ "settings_one_value": {
2315
+ "name": "settings_one_value",
2316
+ "value": "(\"settings\".\"ciphertext\" IS NULL) <> (\"settings\".\"plain\" IS NULL) AND (\"settings\".\"ciphertext\" IS NULL OR (\"settings\".\"iv\" IS NOT NULL AND \"settings\".\"tag\" IS NOT NULL AND \"settings\".\"key_id\" IS NOT NULL))"
2317
+ }
2318
+ },
2319
+ "isRLSEnabled": false
2320
+ },
2321
+ "public.stock_adjustments": {
2322
+ "name": "stock_adjustments",
2323
+ "schema": "",
2324
+ "columns": {
2325
+ "id": {
2326
+ "name": "id",
2327
+ "type": "text",
2328
+ "primaryKey": true,
2329
+ "notNull": true
2330
+ },
2331
+ "variant_id": {
2332
+ "name": "variant_id",
2333
+ "type": "text",
2334
+ "primaryKey": false,
2335
+ "notNull": true
2336
+ },
2337
+ "adjustment": {
2338
+ "name": "adjustment",
2339
+ "type": "integer",
2340
+ "primaryKey": false,
2341
+ "notNull": true
2342
+ },
2343
+ "reason": {
2344
+ "name": "reason",
2345
+ "type": "text",
2346
+ "primaryKey": false,
2347
+ "notNull": true
2348
+ },
2349
+ "actor": {
2350
+ "name": "actor",
2351
+ "type": "text",
2352
+ "primaryKey": false,
2353
+ "notNull": true
2354
+ },
2355
+ "previous_qty": {
2356
+ "name": "previous_qty",
2357
+ "type": "integer",
2358
+ "primaryKey": false,
2359
+ "notNull": true
2360
+ },
2361
+ "new_qty": {
2362
+ "name": "new_qty",
2363
+ "type": "integer",
2364
+ "primaryKey": false,
2365
+ "notNull": true
2366
+ },
2367
+ "timestamp": {
2368
+ "name": "timestamp",
2369
+ "type": "timestamp with time zone",
2370
+ "primaryKey": false,
2371
+ "notNull": true
2372
+ }
2373
+ },
2374
+ "indexes": {
2375
+ "stock_adjustments_variant_idx": {
2376
+ "name": "stock_adjustments_variant_idx",
2377
+ "columns": [
2378
+ {
2379
+ "expression": "variant_id",
2380
+ "isExpression": false,
2381
+ "asc": true,
2382
+ "nulls": "last"
2383
+ }
2384
+ ],
2385
+ "isUnique": false,
2386
+ "concurrently": false,
2387
+ "method": "btree",
2388
+ "with": {}
2389
+ }
2390
+ },
2391
+ "foreignKeys": {},
2392
+ "compositePrimaryKeys": {},
2393
+ "uniqueConstraints": {},
2394
+ "policies": {},
2395
+ "checkConstraints": {},
2396
+ "isRLSEnabled": false
2397
+ },
2398
+ "public.variants": {
2399
+ "name": "variants",
2400
+ "schema": "",
2401
+ "columns": {
2402
+ "id": {
2403
+ "name": "id",
2404
+ "type": "text",
2405
+ "primaryKey": true,
2406
+ "notNull": true
2407
+ },
2408
+ "product_id": {
2409
+ "name": "product_id",
2410
+ "type": "text",
2411
+ "primaryKey": false,
2412
+ "notNull": true
2413
+ },
2414
+ "sku": {
2415
+ "name": "sku",
2416
+ "type": "text",
2417
+ "primaryKey": false,
2418
+ "notNull": true
2419
+ },
2420
+ "name": {
2421
+ "name": "name",
2422
+ "type": "text",
2423
+ "primaryKey": false,
2424
+ "notNull": true,
2425
+ "default": "''"
2426
+ },
2427
+ "price_minor": {
2428
+ "name": "price_minor",
2429
+ "type": "integer",
2430
+ "primaryKey": false,
2431
+ "notNull": true
2432
+ },
2433
+ "compare_at_price_minor": {
2434
+ "name": "compare_at_price_minor",
2435
+ "type": "integer",
2436
+ "primaryKey": false,
2437
+ "notNull": false
2438
+ },
2439
+ "weight_grams": {
2440
+ "name": "weight_grams",
2441
+ "type": "integer",
2442
+ "primaryKey": false,
2443
+ "notNull": false
2444
+ },
2445
+ "dimensions": {
2446
+ "name": "dimensions",
2447
+ "type": "jsonb",
2448
+ "primaryKey": false,
2449
+ "notNull": false
2450
+ },
2451
+ "stock": {
2452
+ "name": "stock",
2453
+ "type": "integer",
2454
+ "primaryKey": false,
2455
+ "notNull": true,
2456
+ "default": 0
2457
+ },
2458
+ "low_stock_threshold": {
2459
+ "name": "low_stock_threshold",
2460
+ "type": "integer",
2461
+ "primaryKey": false,
2462
+ "notNull": true,
2463
+ "default": 0
2464
+ },
2465
+ "options": {
2466
+ "name": "options",
2467
+ "type": "jsonb",
2468
+ "primaryKey": false,
2469
+ "notNull": true,
2470
+ "default": "'[]'::jsonb"
2471
+ },
2472
+ "status": {
2473
+ "name": "status",
2474
+ "type": "text",
2475
+ "primaryKey": false,
2476
+ "notNull": true,
2477
+ "default": "'active'"
2478
+ },
2479
+ "created_at": {
2480
+ "name": "created_at",
2481
+ "type": "timestamp with time zone",
2482
+ "primaryKey": false,
2483
+ "notNull": true
2484
+ },
2485
+ "updated_at": {
2486
+ "name": "updated_at",
2487
+ "type": "timestamp with time zone",
2488
+ "primaryKey": false,
2489
+ "notNull": true
2490
+ }
2491
+ },
2492
+ "indexes": {
2493
+ "variants_sku_unique": {
2494
+ "name": "variants_sku_unique",
2495
+ "columns": [
2496
+ {
2497
+ "expression": "sku",
2498
+ "isExpression": false,
2499
+ "asc": true,
2500
+ "nulls": "last"
2501
+ }
2502
+ ],
2503
+ "isUnique": true,
2504
+ "concurrently": false,
2505
+ "method": "btree",
2506
+ "with": {}
2507
+ },
2508
+ "variants_product_idx": {
2509
+ "name": "variants_product_idx",
2510
+ "columns": [
2511
+ {
2512
+ "expression": "product_id",
2513
+ "isExpression": false,
2514
+ "asc": true,
2515
+ "nulls": "last"
2516
+ }
2517
+ ],
2518
+ "isUnique": false,
2519
+ "concurrently": false,
2520
+ "method": "btree",
2521
+ "with": {}
2522
+ }
2523
+ },
2524
+ "foreignKeys": {},
2525
+ "compositePrimaryKeys": {},
2526
+ "uniqueConstraints": {},
2527
+ "policies": {},
2528
+ "checkConstraints": {},
2529
+ "isRLSEnabled": false
2530
+ }
2531
+ },
2532
+ "enums": {},
2533
+ "schemas": {},
2534
+ "sequences": {},
2535
+ "roles": {},
2536
+ "policies": {},
2537
+ "views": {},
2538
+ "_meta": {
2539
+ "columns": {},
2540
+ "schemas": {},
2541
+ "tables": {}
2542
+ }
2543
+ }