@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,2056 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "481d6dd6-dfbe-40e0-a23a-934562ad591d",
5
+ "prevId": "e02051c3-ac10-4ede-be8a-c63b20791136",
6
+ "tables": {
7
+ "alert_subscriptions": {
8
+ "name": "alert_subscriptions",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "email": {
18
+ "name": "email",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "kind": {
25
+ "name": "kind",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "variant_id": {
32
+ "name": "variant_id",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false
37
+ },
38
+ "product_id": {
39
+ "name": "product_id",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": true,
43
+ "autoincrement": false
44
+ },
45
+ "status": {
46
+ "name": "status",
47
+ "type": "text",
48
+ "primaryKey": false,
49
+ "notNull": true,
50
+ "autoincrement": false
51
+ },
52
+ "confirm_token": {
53
+ "name": "confirm_token",
54
+ "type": "text",
55
+ "primaryKey": false,
56
+ "notNull": true,
57
+ "autoincrement": false
58
+ },
59
+ "unsubscribe_token": {
60
+ "name": "unsubscribe_token",
61
+ "type": "text",
62
+ "primaryKey": false,
63
+ "notNull": true,
64
+ "autoincrement": false
65
+ },
66
+ "origin": {
67
+ "name": "origin",
68
+ "type": "text",
69
+ "primaryKey": false,
70
+ "notNull": true,
71
+ "autoincrement": false
72
+ },
73
+ "baseline_price_minor": {
74
+ "name": "baseline_price_minor",
75
+ "type": "integer",
76
+ "primaryKey": false,
77
+ "notNull": false,
78
+ "autoincrement": false
79
+ },
80
+ "created_at": {
81
+ "name": "created_at",
82
+ "type": "text",
83
+ "primaryKey": false,
84
+ "notNull": true,
85
+ "autoincrement": false
86
+ },
87
+ "updated_at": {
88
+ "name": "updated_at",
89
+ "type": "text",
90
+ "primaryKey": false,
91
+ "notNull": true,
92
+ "autoincrement": false
93
+ },
94
+ "confirmed_at": {
95
+ "name": "confirmed_at",
96
+ "type": "text",
97
+ "primaryKey": false,
98
+ "notNull": false,
99
+ "autoincrement": false
100
+ }
101
+ },
102
+ "indexes": {
103
+ "alert_subscriptions_address_unique": {
104
+ "name": "alert_subscriptions_address_unique",
105
+ "columns": [
106
+ "email",
107
+ "variant_id",
108
+ "kind"
109
+ ],
110
+ "isUnique": true
111
+ },
112
+ "alert_subscriptions_confirm_token_unique": {
113
+ "name": "alert_subscriptions_confirm_token_unique",
114
+ "columns": [
115
+ "confirm_token"
116
+ ],
117
+ "isUnique": true
118
+ },
119
+ "alert_subscriptions_unsubscribe_token_unique": {
120
+ "name": "alert_subscriptions_unsubscribe_token_unique",
121
+ "columns": [
122
+ "unsubscribe_token"
123
+ ],
124
+ "isUnique": true
125
+ },
126
+ "alert_subscriptions_fan_out_idx": {
127
+ "name": "alert_subscriptions_fan_out_idx",
128
+ "columns": [
129
+ "variant_id",
130
+ "kind",
131
+ "status"
132
+ ],
133
+ "isUnique": false
134
+ }
135
+ },
136
+ "foreignKeys": {},
137
+ "compositePrimaryKeys": {},
138
+ "uniqueConstraints": {},
139
+ "checkConstraints": {
140
+ "alert_subscriptions_kind": {
141
+ "name": "alert_subscriptions_kind",
142
+ "value": "\"alert_subscriptions\".\"kind\" IN ('back_in_stock', 'price_drop')"
143
+ },
144
+ "alert_subscriptions_status": {
145
+ "name": "alert_subscriptions_status",
146
+ "value": "\"alert_subscriptions\".\"status\" IN ('pending', 'active', 'fired', 'unsubscribed')"
147
+ }
148
+ }
149
+ },
150
+ "audit_entries": {
151
+ "name": "audit_entries",
152
+ "columns": {
153
+ "id": {
154
+ "name": "id",
155
+ "type": "text",
156
+ "primaryKey": true,
157
+ "notNull": true,
158
+ "autoincrement": false
159
+ },
160
+ "at": {
161
+ "name": "at",
162
+ "type": "text",
163
+ "primaryKey": false,
164
+ "notNull": true,
165
+ "autoincrement": false
166
+ },
167
+ "actor_kind": {
168
+ "name": "actor_kind",
169
+ "type": "text",
170
+ "primaryKey": false,
171
+ "notNull": true,
172
+ "autoincrement": false
173
+ },
174
+ "actor_id": {
175
+ "name": "actor_id",
176
+ "type": "text",
177
+ "primaryKey": false,
178
+ "notNull": true,
179
+ "autoincrement": false
180
+ },
181
+ "command": {
182
+ "name": "command",
183
+ "type": "text",
184
+ "primaryKey": false,
185
+ "notNull": true,
186
+ "autoincrement": false
187
+ },
188
+ "subjects": {
189
+ "name": "subjects",
190
+ "type": "text",
191
+ "primaryKey": false,
192
+ "notNull": true,
193
+ "autoincrement": false
194
+ },
195
+ "correlation_id": {
196
+ "name": "correlation_id",
197
+ "type": "text",
198
+ "primaryKey": false,
199
+ "notNull": false,
200
+ "autoincrement": false
201
+ },
202
+ "idempotency_key": {
203
+ "name": "idempotency_key",
204
+ "type": "text",
205
+ "primaryKey": false,
206
+ "notNull": false,
207
+ "autoincrement": false
208
+ },
209
+ "request_hash": {
210
+ "name": "request_hash",
211
+ "type": "text",
212
+ "primaryKey": false,
213
+ "notNull": false,
214
+ "autoincrement": false
215
+ },
216
+ "outcome": {
217
+ "name": "outcome",
218
+ "type": "text",
219
+ "primaryKey": false,
220
+ "notNull": true,
221
+ "autoincrement": false
222
+ },
223
+ "response_status": {
224
+ "name": "response_status",
225
+ "type": "integer",
226
+ "primaryKey": false,
227
+ "notNull": false,
228
+ "autoincrement": false
229
+ },
230
+ "response_body": {
231
+ "name": "response_body",
232
+ "type": "text",
233
+ "primaryKey": false,
234
+ "notNull": false,
235
+ "autoincrement": false
236
+ }
237
+ },
238
+ "indexes": {
239
+ "audit_entries_applied_key_unique": {
240
+ "name": "audit_entries_applied_key_unique",
241
+ "columns": [
242
+ "actor_id",
243
+ "command",
244
+ "idempotency_key"
245
+ ],
246
+ "isUnique": true,
247
+ "where": "\"audit_entries\".\"outcome\" = 'applied' AND \"audit_entries\".\"idempotency_key\" IS NOT NULL"
248
+ },
249
+ "audit_entries_at_idx": {
250
+ "name": "audit_entries_at_idx",
251
+ "columns": [
252
+ "at",
253
+ "id"
254
+ ],
255
+ "isUnique": false
256
+ },
257
+ "audit_entries_correlation_idx": {
258
+ "name": "audit_entries_correlation_idx",
259
+ "columns": [
260
+ "correlation_id"
261
+ ],
262
+ "isUnique": false
263
+ }
264
+ },
265
+ "foreignKeys": {},
266
+ "compositePrimaryKeys": {},
267
+ "uniqueConstraints": {},
268
+ "checkConstraints": {
269
+ "audit_entries_outcome": {
270
+ "name": "audit_entries_outcome",
271
+ "value": "\"audit_entries\".\"outcome\" IN ('applied', 'refused', 'replayed')"
272
+ }
273
+ }
274
+ },
275
+ "carts": {
276
+ "name": "carts",
277
+ "columns": {
278
+ "token": {
279
+ "name": "token",
280
+ "type": "text",
281
+ "primaryKey": true,
282
+ "notNull": true,
283
+ "autoincrement": false
284
+ },
285
+ "customer_id": {
286
+ "name": "customer_id",
287
+ "type": "text",
288
+ "primaryKey": false,
289
+ "notNull": false,
290
+ "autoincrement": false
291
+ },
292
+ "currency": {
293
+ "name": "currency",
294
+ "type": "text",
295
+ "primaryKey": false,
296
+ "notNull": true,
297
+ "autoincrement": false
298
+ },
299
+ "items": {
300
+ "name": "items",
301
+ "type": "text",
302
+ "primaryKey": false,
303
+ "notNull": true,
304
+ "autoincrement": false,
305
+ "default": "'[]'"
306
+ },
307
+ "line_count": {
308
+ "name": "line_count",
309
+ "type": "integer",
310
+ "primaryKey": false,
311
+ "notNull": true,
312
+ "autoincrement": false,
313
+ "default": 0
314
+ },
315
+ "subtotal_minor": {
316
+ "name": "subtotal_minor",
317
+ "type": "integer",
318
+ "primaryKey": false,
319
+ "notNull": true,
320
+ "autoincrement": false,
321
+ "default": 0
322
+ },
323
+ "expires_at": {
324
+ "name": "expires_at",
325
+ "type": "text",
326
+ "primaryKey": false,
327
+ "notNull": true,
328
+ "autoincrement": false
329
+ },
330
+ "created_at": {
331
+ "name": "created_at",
332
+ "type": "text",
333
+ "primaryKey": false,
334
+ "notNull": true,
335
+ "autoincrement": false
336
+ },
337
+ "updated_at": {
338
+ "name": "updated_at",
339
+ "type": "text",
340
+ "primaryKey": false,
341
+ "notNull": true,
342
+ "autoincrement": false
343
+ },
344
+ "abandoned_notified_at": {
345
+ "name": "abandoned_notified_at",
346
+ "type": "text",
347
+ "primaryKey": false,
348
+ "notNull": false,
349
+ "autoincrement": false
350
+ }
351
+ },
352
+ "indexes": {
353
+ "carts_expires_idx": {
354
+ "name": "carts_expires_idx",
355
+ "columns": [
356
+ "expires_at"
357
+ ],
358
+ "isUnique": false
359
+ },
360
+ "carts_updated_idx": {
361
+ "name": "carts_updated_idx",
362
+ "columns": [
363
+ "updated_at"
364
+ ],
365
+ "isUnique": false
366
+ },
367
+ "carts_customer_idx": {
368
+ "name": "carts_customer_idx",
369
+ "columns": [
370
+ "customer_id"
371
+ ],
372
+ "isUnique": false,
373
+ "where": "\"carts\".\"customer_id\" IS NOT NULL"
374
+ }
375
+ },
376
+ "foreignKeys": {},
377
+ "compositePrimaryKeys": {},
378
+ "uniqueConstraints": {},
379
+ "checkConstraints": {}
380
+ },
381
+ "categories": {
382
+ "name": "categories",
383
+ "columns": {
384
+ "id": {
385
+ "name": "id",
386
+ "type": "text",
387
+ "primaryKey": true,
388
+ "notNull": true,
389
+ "autoincrement": false
390
+ },
391
+ "parent_id": {
392
+ "name": "parent_id",
393
+ "type": "text",
394
+ "primaryKey": false,
395
+ "notNull": false,
396
+ "autoincrement": false
397
+ },
398
+ "slug": {
399
+ "name": "slug",
400
+ "type": "text",
401
+ "primaryKey": false,
402
+ "notNull": true,
403
+ "autoincrement": false
404
+ },
405
+ "name": {
406
+ "name": "name",
407
+ "type": "text",
408
+ "primaryKey": false,
409
+ "notNull": true,
410
+ "autoincrement": false
411
+ },
412
+ "description": {
413
+ "name": "description",
414
+ "type": "text",
415
+ "primaryKey": false,
416
+ "notNull": true,
417
+ "autoincrement": false,
418
+ "default": "''"
419
+ },
420
+ "position": {
421
+ "name": "position",
422
+ "type": "integer",
423
+ "primaryKey": false,
424
+ "notNull": true,
425
+ "autoincrement": false,
426
+ "default": 0
427
+ },
428
+ "created_at": {
429
+ "name": "created_at",
430
+ "type": "text",
431
+ "primaryKey": false,
432
+ "notNull": true,
433
+ "autoincrement": false
434
+ }
435
+ },
436
+ "indexes": {
437
+ "categories_slug_unique": {
438
+ "name": "categories_slug_unique",
439
+ "columns": [
440
+ "slug"
441
+ ],
442
+ "isUnique": true
443
+ },
444
+ "categories_parent_idx": {
445
+ "name": "categories_parent_idx",
446
+ "columns": [
447
+ "parent_id"
448
+ ],
449
+ "isUnique": false
450
+ }
451
+ },
452
+ "foreignKeys": {},
453
+ "compositePrimaryKeys": {},
454
+ "uniqueConstraints": {},
455
+ "checkConstraints": {}
456
+ },
457
+ "customers": {
458
+ "name": "customers",
459
+ "columns": {
460
+ "id": {
461
+ "name": "id",
462
+ "type": "text",
463
+ "primaryKey": true,
464
+ "notNull": true,
465
+ "autoincrement": false
466
+ },
467
+ "email": {
468
+ "name": "email",
469
+ "type": "text",
470
+ "primaryKey": false,
471
+ "notNull": true,
472
+ "autoincrement": false
473
+ },
474
+ "password_hash": {
475
+ "name": "password_hash",
476
+ "type": "text",
477
+ "primaryKey": false,
478
+ "notNull": true,
479
+ "autoincrement": false
480
+ },
481
+ "first_name": {
482
+ "name": "first_name",
483
+ "type": "text",
484
+ "primaryKey": false,
485
+ "notNull": true,
486
+ "autoincrement": false,
487
+ "default": "''"
488
+ },
489
+ "last_name": {
490
+ "name": "last_name",
491
+ "type": "text",
492
+ "primaryKey": false,
493
+ "notNull": true,
494
+ "autoincrement": false,
495
+ "default": "''"
496
+ },
497
+ "phone": {
498
+ "name": "phone",
499
+ "type": "text",
500
+ "primaryKey": false,
501
+ "notNull": true,
502
+ "autoincrement": false,
503
+ "default": "''"
504
+ },
505
+ "addresses": {
506
+ "name": "addresses",
507
+ "type": "text",
508
+ "primaryKey": false,
509
+ "notNull": true,
510
+ "autoincrement": false,
511
+ "default": "'[]'"
512
+ },
513
+ "order_count": {
514
+ "name": "order_count",
515
+ "type": "integer",
516
+ "primaryKey": false,
517
+ "notNull": true,
518
+ "autoincrement": false,
519
+ "default": 0
520
+ },
521
+ "total_spent_minor": {
522
+ "name": "total_spent_minor",
523
+ "type": "integer",
524
+ "primaryKey": false,
525
+ "notNull": true,
526
+ "autoincrement": false,
527
+ "default": 0
528
+ },
529
+ "metadata": {
530
+ "name": "metadata",
531
+ "type": "text",
532
+ "primaryKey": false,
533
+ "notNull": true,
534
+ "autoincrement": false,
535
+ "default": "'{}'"
536
+ },
537
+ "roles": {
538
+ "name": "roles",
539
+ "type": "text",
540
+ "primaryKey": false,
541
+ "notNull": true,
542
+ "autoincrement": false,
543
+ "default": "'[\"customer\"]'"
544
+ },
545
+ "requires_password_reset": {
546
+ "name": "requires_password_reset",
547
+ "type": "integer",
548
+ "primaryKey": false,
549
+ "notNull": true,
550
+ "autoincrement": false,
551
+ "default": false
552
+ },
553
+ "created_at": {
554
+ "name": "created_at",
555
+ "type": "text",
556
+ "primaryKey": false,
557
+ "notNull": true,
558
+ "autoincrement": false
559
+ },
560
+ "updated_at": {
561
+ "name": "updated_at",
562
+ "type": "text",
563
+ "primaryKey": false,
564
+ "notNull": true,
565
+ "autoincrement": false
566
+ }
567
+ },
568
+ "indexes": {
569
+ "customers_email_unique": {
570
+ "name": "customers_email_unique",
571
+ "columns": [
572
+ "email"
573
+ ],
574
+ "isUnique": true
575
+ }
576
+ },
577
+ "foreignKeys": {},
578
+ "compositePrimaryKeys": {},
579
+ "uniqueConstraints": {},
580
+ "checkConstraints": {}
581
+ },
582
+ "email_suppressions": {
583
+ "name": "email_suppressions",
584
+ "columns": {
585
+ "email": {
586
+ "name": "email",
587
+ "type": "text",
588
+ "primaryKey": true,
589
+ "notNull": true,
590
+ "autoincrement": false
591
+ },
592
+ "reason": {
593
+ "name": "reason",
594
+ "type": "text",
595
+ "primaryKey": false,
596
+ "notNull": true,
597
+ "autoincrement": false
598
+ },
599
+ "event_id": {
600
+ "name": "event_id",
601
+ "type": "text",
602
+ "primaryKey": false,
603
+ "notNull": true,
604
+ "autoincrement": false
605
+ },
606
+ "created_at": {
607
+ "name": "created_at",
608
+ "type": "text",
609
+ "primaryKey": false,
610
+ "notNull": true,
611
+ "autoincrement": false
612
+ }
613
+ },
614
+ "indexes": {},
615
+ "foreignKeys": {},
616
+ "compositePrimaryKeys": {},
617
+ "uniqueConstraints": {},
618
+ "checkConstraints": {
619
+ "email_suppressions_reason": {
620
+ "name": "email_suppressions_reason",
621
+ "value": "\"email_suppressions\".\"reason\" IN ('hard_bounce', 'complaint')"
622
+ }
623
+ }
624
+ },
625
+ "events": {
626
+ "name": "events",
627
+ "columns": {
628
+ "seq": {
629
+ "name": "seq",
630
+ "type": "integer",
631
+ "primaryKey": true,
632
+ "notNull": true,
633
+ "autoincrement": true
634
+ },
635
+ "id": {
636
+ "name": "id",
637
+ "type": "text",
638
+ "primaryKey": false,
639
+ "notNull": true,
640
+ "autoincrement": false
641
+ },
642
+ "type": {
643
+ "name": "type",
644
+ "type": "text",
645
+ "primaryKey": false,
646
+ "notNull": true,
647
+ "autoincrement": false
648
+ },
649
+ "envelope": {
650
+ "name": "envelope",
651
+ "type": "text",
652
+ "primaryKey": false,
653
+ "notNull": true,
654
+ "autoincrement": false
655
+ },
656
+ "correlation_id": {
657
+ "name": "correlation_id",
658
+ "type": "text",
659
+ "primaryKey": false,
660
+ "notNull": true,
661
+ "autoincrement": false
662
+ },
663
+ "created_at": {
664
+ "name": "created_at",
665
+ "type": "text",
666
+ "primaryKey": false,
667
+ "notNull": true,
668
+ "autoincrement": false
669
+ },
670
+ "subject_type": {
671
+ "name": "subject_type",
672
+ "type": "text",
673
+ "primaryKey": false,
674
+ "notNull": false,
675
+ "autoincrement": false
676
+ },
677
+ "subject_id": {
678
+ "name": "subject_id",
679
+ "type": "text",
680
+ "primaryKey": false,
681
+ "notNull": false,
682
+ "autoincrement": false
683
+ },
684
+ "delivered_at": {
685
+ "name": "delivered_at",
686
+ "type": "text",
687
+ "primaryKey": false,
688
+ "notNull": false,
689
+ "autoincrement": false
690
+ },
691
+ "attempts": {
692
+ "name": "attempts",
693
+ "type": "integer",
694
+ "primaryKey": false,
695
+ "notNull": true,
696
+ "autoincrement": false,
697
+ "default": 0
698
+ },
699
+ "dead_at": {
700
+ "name": "dead_at",
701
+ "type": "text",
702
+ "primaryKey": false,
703
+ "notNull": false,
704
+ "autoincrement": false
705
+ },
706
+ "retry_at": {
707
+ "name": "retry_at",
708
+ "type": "text",
709
+ "primaryKey": false,
710
+ "notNull": false,
711
+ "autoincrement": false
712
+ }
713
+ },
714
+ "indexes": {
715
+ "events_id_unique": {
716
+ "name": "events_id_unique",
717
+ "columns": [
718
+ "id"
719
+ ],
720
+ "isUnique": true
721
+ },
722
+ "events_undelivered_idx": {
723
+ "name": "events_undelivered_idx",
724
+ "columns": [
725
+ "delivered_at",
726
+ "seq"
727
+ ],
728
+ "isUnique": false
729
+ },
730
+ "events_correlation_idx": {
731
+ "name": "events_correlation_idx",
732
+ "columns": [
733
+ "correlation_id",
734
+ "seq"
735
+ ],
736
+ "isUnique": false
737
+ },
738
+ "events_catch_up_idx": {
739
+ "name": "events_catch_up_idx",
740
+ "columns": [
741
+ "dead_at",
742
+ "delivered_at",
743
+ "seq"
744
+ ],
745
+ "isUnique": false
746
+ },
747
+ "events_subject_idx": {
748
+ "name": "events_subject_idx",
749
+ "columns": [
750
+ "subject_type",
751
+ "subject_id",
752
+ "seq"
753
+ ],
754
+ "isUnique": false
755
+ }
756
+ },
757
+ "foreignKeys": {},
758
+ "compositePrimaryKeys": {},
759
+ "uniqueConstraints": {},
760
+ "checkConstraints": {}
761
+ },
762
+ "inventory_reservations": {
763
+ "name": "inventory_reservations",
764
+ "columns": {
765
+ "reservation_id": {
766
+ "name": "reservation_id",
767
+ "type": "text",
768
+ "primaryKey": true,
769
+ "notNull": true,
770
+ "autoincrement": false
771
+ },
772
+ "variant_id": {
773
+ "name": "variant_id",
774
+ "type": "text",
775
+ "primaryKey": false,
776
+ "notNull": true,
777
+ "autoincrement": false
778
+ },
779
+ "qty": {
780
+ "name": "qty",
781
+ "type": "integer",
782
+ "primaryKey": false,
783
+ "notNull": true,
784
+ "autoincrement": false
785
+ },
786
+ "order_ref": {
787
+ "name": "order_ref",
788
+ "type": "text",
789
+ "primaryKey": false,
790
+ "notNull": false,
791
+ "autoincrement": false
792
+ },
793
+ "expires_at": {
794
+ "name": "expires_at",
795
+ "type": "text",
796
+ "primaryKey": false,
797
+ "notNull": true,
798
+ "autoincrement": false
799
+ },
800
+ "created_at": {
801
+ "name": "created_at",
802
+ "type": "text",
803
+ "primaryKey": false,
804
+ "notNull": true,
805
+ "autoincrement": false
806
+ }
807
+ },
808
+ "indexes": {
809
+ "inv_reservations_variant_idx": {
810
+ "name": "inv_reservations_variant_idx",
811
+ "columns": [
812
+ "variant_id"
813
+ ],
814
+ "isUnique": false
815
+ },
816
+ "inv_reservations_expires_idx": {
817
+ "name": "inv_reservations_expires_idx",
818
+ "columns": [
819
+ "expires_at"
820
+ ],
821
+ "isUnique": false
822
+ }
823
+ },
824
+ "foreignKeys": {},
825
+ "compositePrimaryKeys": {},
826
+ "uniqueConstraints": {},
827
+ "checkConstraints": {}
828
+ },
829
+ "order_access_keys": {
830
+ "name": "order_access_keys",
831
+ "columns": {
832
+ "id": {
833
+ "name": "id",
834
+ "type": "text",
835
+ "primaryKey": true,
836
+ "notNull": true,
837
+ "autoincrement": false
838
+ },
839
+ "order_id": {
840
+ "name": "order_id",
841
+ "type": "text",
842
+ "primaryKey": false,
843
+ "notNull": true,
844
+ "autoincrement": false
845
+ },
846
+ "key_hash": {
847
+ "name": "key_hash",
848
+ "type": "text",
849
+ "primaryKey": false,
850
+ "notNull": true,
851
+ "autoincrement": false
852
+ },
853
+ "purpose": {
854
+ "name": "purpose",
855
+ "type": "text",
856
+ "primaryKey": false,
857
+ "notNull": true,
858
+ "autoincrement": false
859
+ },
860
+ "created_at": {
861
+ "name": "created_at",
862
+ "type": "text",
863
+ "primaryKey": false,
864
+ "notNull": true,
865
+ "autoincrement": false
866
+ },
867
+ "expires_at": {
868
+ "name": "expires_at",
869
+ "type": "text",
870
+ "primaryKey": false,
871
+ "notNull": true,
872
+ "autoincrement": false
873
+ }
874
+ },
875
+ "indexes": {
876
+ "order_access_keys_key_hash_idx": {
877
+ "name": "order_access_keys_key_hash_idx",
878
+ "columns": [
879
+ "key_hash"
880
+ ],
881
+ "isUnique": true
882
+ },
883
+ "order_access_keys_order_idx": {
884
+ "name": "order_access_keys_order_idx",
885
+ "columns": [
886
+ "order_id"
887
+ ],
888
+ "isUnique": false
889
+ }
890
+ },
891
+ "foreignKeys": {},
892
+ "compositePrimaryKeys": {},
893
+ "uniqueConstraints": {},
894
+ "checkConstraints": {}
895
+ },
896
+ "order_history": {
897
+ "name": "order_history",
898
+ "columns": {
899
+ "id": {
900
+ "name": "id",
901
+ "type": "text",
902
+ "primaryKey": true,
903
+ "notNull": true,
904
+ "autoincrement": false
905
+ },
906
+ "order_id": {
907
+ "name": "order_id",
908
+ "type": "text",
909
+ "primaryKey": false,
910
+ "notNull": true,
911
+ "autoincrement": false
912
+ },
913
+ "from_status": {
914
+ "name": "from_status",
915
+ "type": "text",
916
+ "primaryKey": false,
917
+ "notNull": false,
918
+ "autoincrement": false
919
+ },
920
+ "to_status": {
921
+ "name": "to_status",
922
+ "type": "text",
923
+ "primaryKey": false,
924
+ "notNull": true,
925
+ "autoincrement": false
926
+ },
927
+ "actor": {
928
+ "name": "actor",
929
+ "type": "text",
930
+ "primaryKey": false,
931
+ "notNull": true,
932
+ "autoincrement": false
933
+ },
934
+ "note": {
935
+ "name": "note",
936
+ "type": "text",
937
+ "primaryKey": false,
938
+ "notNull": true,
939
+ "autoincrement": false,
940
+ "default": "''"
941
+ },
942
+ "timestamp": {
943
+ "name": "timestamp",
944
+ "type": "text",
945
+ "primaryKey": false,
946
+ "notNull": true,
947
+ "autoincrement": false
948
+ }
949
+ },
950
+ "indexes": {
951
+ "order_history_order_idx": {
952
+ "name": "order_history_order_idx",
953
+ "columns": [
954
+ "order_id"
955
+ ],
956
+ "isUnique": false
957
+ }
958
+ },
959
+ "foreignKeys": {},
960
+ "compositePrimaryKeys": {},
961
+ "uniqueConstraints": {},
962
+ "checkConstraints": {}
963
+ },
964
+ "order_refunds": {
965
+ "name": "order_refunds",
966
+ "columns": {
967
+ "id": {
968
+ "name": "id",
969
+ "type": "text",
970
+ "primaryKey": true,
971
+ "notNull": true,
972
+ "autoincrement": false
973
+ },
974
+ "order_id": {
975
+ "name": "order_id",
976
+ "type": "text",
977
+ "primaryKey": false,
978
+ "notNull": true,
979
+ "autoincrement": false
980
+ },
981
+ "amount_minor": {
982
+ "name": "amount_minor",
983
+ "type": "integer",
984
+ "primaryKey": false,
985
+ "notNull": true,
986
+ "autoincrement": false
987
+ },
988
+ "currency": {
989
+ "name": "currency",
990
+ "type": "text",
991
+ "primaryKey": false,
992
+ "notNull": true,
993
+ "autoincrement": false
994
+ },
995
+ "provider_refund_id": {
996
+ "name": "provider_refund_id",
997
+ "type": "text",
998
+ "primaryKey": false,
999
+ "notNull": false,
1000
+ "autoincrement": false
1001
+ },
1002
+ "status": {
1003
+ "name": "status",
1004
+ "type": "text",
1005
+ "primaryKey": false,
1006
+ "notNull": true,
1007
+ "autoincrement": false,
1008
+ "default": "'pending'"
1009
+ },
1010
+ "reason": {
1011
+ "name": "reason",
1012
+ "type": "text",
1013
+ "primaryKey": false,
1014
+ "notNull": false,
1015
+ "autoincrement": false
1016
+ },
1017
+ "actor": {
1018
+ "name": "actor",
1019
+ "type": "text",
1020
+ "primaryKey": false,
1021
+ "notNull": true,
1022
+ "autoincrement": false
1023
+ },
1024
+ "created_at": {
1025
+ "name": "created_at",
1026
+ "type": "text",
1027
+ "primaryKey": false,
1028
+ "notNull": true,
1029
+ "autoincrement": false
1030
+ },
1031
+ "request_id": {
1032
+ "name": "request_id",
1033
+ "type": "text",
1034
+ "primaryKey": false,
1035
+ "notNull": false,
1036
+ "autoincrement": false
1037
+ }
1038
+ },
1039
+ "indexes": {
1040
+ "order_refunds_order_idx": {
1041
+ "name": "order_refunds_order_idx",
1042
+ "columns": [
1043
+ "order_id"
1044
+ ],
1045
+ "isUnique": false
1046
+ },
1047
+ "order_refunds_order_request_idx": {
1048
+ "name": "order_refunds_order_request_idx",
1049
+ "columns": [
1050
+ "order_id",
1051
+ "request_id"
1052
+ ],
1053
+ "isUnique": true
1054
+ }
1055
+ },
1056
+ "foreignKeys": {},
1057
+ "compositePrimaryKeys": {},
1058
+ "uniqueConstraints": {},
1059
+ "checkConstraints": {}
1060
+ },
1061
+ "order_sequences": {
1062
+ "name": "order_sequences",
1063
+ "columns": {
1064
+ "id": {
1065
+ "name": "id",
1066
+ "type": "integer",
1067
+ "primaryKey": true,
1068
+ "notNull": true,
1069
+ "autoincrement": false
1070
+ },
1071
+ "next_value": {
1072
+ "name": "next_value",
1073
+ "type": "integer",
1074
+ "primaryKey": false,
1075
+ "notNull": true,
1076
+ "autoincrement": false
1077
+ }
1078
+ },
1079
+ "indexes": {},
1080
+ "foreignKeys": {},
1081
+ "compositePrimaryKeys": {},
1082
+ "uniqueConstraints": {},
1083
+ "checkConstraints": {}
1084
+ },
1085
+ "order_shipments": {
1086
+ "name": "order_shipments",
1087
+ "columns": {
1088
+ "order_id": {
1089
+ "name": "order_id",
1090
+ "type": "text",
1091
+ "primaryKey": true,
1092
+ "notNull": true,
1093
+ "autoincrement": false
1094
+ },
1095
+ "carrier": {
1096
+ "name": "carrier",
1097
+ "type": "text",
1098
+ "primaryKey": false,
1099
+ "notNull": true,
1100
+ "autoincrement": false
1101
+ },
1102
+ "tracking_number": {
1103
+ "name": "tracking_number",
1104
+ "type": "text",
1105
+ "primaryKey": false,
1106
+ "notNull": true,
1107
+ "autoincrement": false
1108
+ },
1109
+ "created_at": {
1110
+ "name": "created_at",
1111
+ "type": "text",
1112
+ "primaryKey": false,
1113
+ "notNull": true,
1114
+ "autoincrement": false
1115
+ }
1116
+ },
1117
+ "indexes": {
1118
+ "order_shipments_tracking_number_idx": {
1119
+ "name": "order_shipments_tracking_number_idx",
1120
+ "columns": [
1121
+ "tracking_number"
1122
+ ],
1123
+ "isUnique": false
1124
+ }
1125
+ },
1126
+ "foreignKeys": {
1127
+ "order_shipments_order_id_orders_id_fk": {
1128
+ "name": "order_shipments_order_id_orders_id_fk",
1129
+ "tableFrom": "order_shipments",
1130
+ "tableTo": "orders",
1131
+ "columnsFrom": [
1132
+ "order_id"
1133
+ ],
1134
+ "columnsTo": [
1135
+ "id"
1136
+ ],
1137
+ "onDelete": "no action",
1138
+ "onUpdate": "no action"
1139
+ }
1140
+ },
1141
+ "compositePrimaryKeys": {},
1142
+ "uniqueConstraints": {},
1143
+ "checkConstraints": {}
1144
+ },
1145
+ "orders": {
1146
+ "name": "orders",
1147
+ "columns": {
1148
+ "id": {
1149
+ "name": "id",
1150
+ "type": "text",
1151
+ "primaryKey": true,
1152
+ "notNull": true,
1153
+ "autoincrement": false
1154
+ },
1155
+ "order_number": {
1156
+ "name": "order_number",
1157
+ "type": "text",
1158
+ "primaryKey": false,
1159
+ "notNull": true,
1160
+ "autoincrement": false
1161
+ },
1162
+ "sequence": {
1163
+ "name": "sequence",
1164
+ "type": "integer",
1165
+ "primaryKey": false,
1166
+ "notNull": true,
1167
+ "autoincrement": false
1168
+ },
1169
+ "customer_id": {
1170
+ "name": "customer_id",
1171
+ "type": "text",
1172
+ "primaryKey": false,
1173
+ "notNull": false,
1174
+ "autoincrement": false
1175
+ },
1176
+ "status": {
1177
+ "name": "status",
1178
+ "type": "text",
1179
+ "primaryKey": false,
1180
+ "notNull": true,
1181
+ "autoincrement": false,
1182
+ "default": "'pending'"
1183
+ },
1184
+ "email": {
1185
+ "name": "email",
1186
+ "type": "text",
1187
+ "primaryKey": false,
1188
+ "notNull": true,
1189
+ "autoincrement": false
1190
+ },
1191
+ "billing_address": {
1192
+ "name": "billing_address",
1193
+ "type": "text",
1194
+ "primaryKey": false,
1195
+ "notNull": true,
1196
+ "autoincrement": false
1197
+ },
1198
+ "shipping_address": {
1199
+ "name": "shipping_address",
1200
+ "type": "text",
1201
+ "primaryKey": false,
1202
+ "notNull": true,
1203
+ "autoincrement": false
1204
+ },
1205
+ "line_items": {
1206
+ "name": "line_items",
1207
+ "type": "text",
1208
+ "primaryKey": false,
1209
+ "notNull": true,
1210
+ "autoincrement": false
1211
+ },
1212
+ "subtotal_minor": {
1213
+ "name": "subtotal_minor",
1214
+ "type": "integer",
1215
+ "primaryKey": false,
1216
+ "notNull": true,
1217
+ "autoincrement": false
1218
+ },
1219
+ "tax_total_minor": {
1220
+ "name": "tax_total_minor",
1221
+ "type": "integer",
1222
+ "primaryKey": false,
1223
+ "notNull": true,
1224
+ "autoincrement": false,
1225
+ "default": 0
1226
+ },
1227
+ "shipping_total_minor": {
1228
+ "name": "shipping_total_minor",
1229
+ "type": "integer",
1230
+ "primaryKey": false,
1231
+ "notNull": true,
1232
+ "autoincrement": false,
1233
+ "default": 0
1234
+ },
1235
+ "discount_total_minor": {
1236
+ "name": "discount_total_minor",
1237
+ "type": "integer",
1238
+ "primaryKey": false,
1239
+ "notNull": true,
1240
+ "autoincrement": false,
1241
+ "default": 0
1242
+ },
1243
+ "total_minor": {
1244
+ "name": "total_minor",
1245
+ "type": "integer",
1246
+ "primaryKey": false,
1247
+ "notNull": true,
1248
+ "autoincrement": false
1249
+ },
1250
+ "currency": {
1251
+ "name": "currency",
1252
+ "type": "text",
1253
+ "primaryKey": false,
1254
+ "notNull": true,
1255
+ "autoincrement": false
1256
+ },
1257
+ "notes": {
1258
+ "name": "notes",
1259
+ "type": "text",
1260
+ "primaryKey": false,
1261
+ "notNull": true,
1262
+ "autoincrement": false,
1263
+ "default": "''"
1264
+ },
1265
+ "metadata": {
1266
+ "name": "metadata",
1267
+ "type": "text",
1268
+ "primaryKey": false,
1269
+ "notNull": true,
1270
+ "autoincrement": false,
1271
+ "default": "'{}'"
1272
+ },
1273
+ "payment_intent_id": {
1274
+ "name": "payment_intent_id",
1275
+ "type": "text",
1276
+ "primaryKey": false,
1277
+ "notNull": false,
1278
+ "autoincrement": false
1279
+ },
1280
+ "cart_token": {
1281
+ "name": "cart_token",
1282
+ "type": "text",
1283
+ "primaryKey": false,
1284
+ "notNull": false,
1285
+ "autoincrement": false
1286
+ },
1287
+ "captured_minor": {
1288
+ "name": "captured_minor",
1289
+ "type": "integer",
1290
+ "primaryKey": false,
1291
+ "notNull": true,
1292
+ "autoincrement": false,
1293
+ "default": 0
1294
+ },
1295
+ "captured_at": {
1296
+ "name": "captured_at",
1297
+ "type": "text",
1298
+ "primaryKey": false,
1299
+ "notNull": false,
1300
+ "autoincrement": false
1301
+ },
1302
+ "refunded_minor": {
1303
+ "name": "refunded_minor",
1304
+ "type": "integer",
1305
+ "primaryKey": false,
1306
+ "notNull": true,
1307
+ "autoincrement": false,
1308
+ "default": 0
1309
+ },
1310
+ "capture_method": {
1311
+ "name": "capture_method",
1312
+ "type": "text",
1313
+ "primaryKey": false,
1314
+ "notNull": false,
1315
+ "autoincrement": false
1316
+ },
1317
+ "created_at": {
1318
+ "name": "created_at",
1319
+ "type": "text",
1320
+ "primaryKey": false,
1321
+ "notNull": true,
1322
+ "autoincrement": false
1323
+ },
1324
+ "updated_at": {
1325
+ "name": "updated_at",
1326
+ "type": "text",
1327
+ "primaryKey": false,
1328
+ "notNull": true,
1329
+ "autoincrement": false
1330
+ }
1331
+ },
1332
+ "indexes": {
1333
+ "orders_number_unique": {
1334
+ "name": "orders_number_unique",
1335
+ "columns": [
1336
+ "order_number"
1337
+ ],
1338
+ "isUnique": true
1339
+ },
1340
+ "orders_sequence_unique": {
1341
+ "name": "orders_sequence_unique",
1342
+ "columns": [
1343
+ "sequence"
1344
+ ],
1345
+ "isUnique": true
1346
+ },
1347
+ "orders_customer_idx": {
1348
+ "name": "orders_customer_idx",
1349
+ "columns": [
1350
+ "customer_id"
1351
+ ],
1352
+ "isUnique": false
1353
+ },
1354
+ "orders_status_idx": {
1355
+ "name": "orders_status_idx",
1356
+ "columns": [
1357
+ "status"
1358
+ ],
1359
+ "isUnique": false
1360
+ },
1361
+ "orders_payment_intent_idx": {
1362
+ "name": "orders_payment_intent_idx",
1363
+ "columns": [
1364
+ "payment_intent_id"
1365
+ ],
1366
+ "isUnique": false
1367
+ },
1368
+ "orders_pending_cart_unique": {
1369
+ "name": "orders_pending_cart_unique",
1370
+ "columns": [
1371
+ "cart_token"
1372
+ ],
1373
+ "isUnique": true,
1374
+ "where": "status = 'pending'"
1375
+ }
1376
+ },
1377
+ "foreignKeys": {},
1378
+ "compositePrimaryKeys": {},
1379
+ "uniqueConstraints": {},
1380
+ "checkConstraints": {}
1381
+ },
1382
+ "processed_events": {
1383
+ "name": "processed_events",
1384
+ "columns": {
1385
+ "handler_name": {
1386
+ "name": "handler_name",
1387
+ "type": "text",
1388
+ "primaryKey": false,
1389
+ "notNull": true,
1390
+ "autoincrement": false
1391
+ },
1392
+ "event_id": {
1393
+ "name": "event_id",
1394
+ "type": "text",
1395
+ "primaryKey": false,
1396
+ "notNull": true,
1397
+ "autoincrement": false
1398
+ },
1399
+ "processed_at": {
1400
+ "name": "processed_at",
1401
+ "type": "text",
1402
+ "primaryKey": false,
1403
+ "notNull": true,
1404
+ "autoincrement": false
1405
+ }
1406
+ },
1407
+ "indexes": {},
1408
+ "foreignKeys": {},
1409
+ "compositePrimaryKeys": {
1410
+ "processed_events_handler_name_event_id_pk": {
1411
+ "columns": [
1412
+ "handler_name",
1413
+ "event_id"
1414
+ ],
1415
+ "name": "processed_events_handler_name_event_id_pk"
1416
+ }
1417
+ },
1418
+ "uniqueConstraints": {},
1419
+ "checkConstraints": {}
1420
+ },
1421
+ "product_categories": {
1422
+ "name": "product_categories",
1423
+ "columns": {
1424
+ "product_id": {
1425
+ "name": "product_id",
1426
+ "type": "text",
1427
+ "primaryKey": false,
1428
+ "notNull": true,
1429
+ "autoincrement": false
1430
+ },
1431
+ "category_id": {
1432
+ "name": "category_id",
1433
+ "type": "text",
1434
+ "primaryKey": false,
1435
+ "notNull": true,
1436
+ "autoincrement": false
1437
+ }
1438
+ },
1439
+ "indexes": {
1440
+ "product_categories_category_idx": {
1441
+ "name": "product_categories_category_idx",
1442
+ "columns": [
1443
+ "category_id"
1444
+ ],
1445
+ "isUnique": false
1446
+ }
1447
+ },
1448
+ "foreignKeys": {},
1449
+ "compositePrimaryKeys": {
1450
+ "product_categories_product_id_category_id_pk": {
1451
+ "columns": [
1452
+ "product_id",
1453
+ "category_id"
1454
+ ],
1455
+ "name": "product_categories_product_id_category_id_pk"
1456
+ }
1457
+ },
1458
+ "uniqueConstraints": {},
1459
+ "checkConstraints": {}
1460
+ },
1461
+ "products": {
1462
+ "name": "products",
1463
+ "columns": {
1464
+ "id": {
1465
+ "name": "id",
1466
+ "type": "text",
1467
+ "primaryKey": true,
1468
+ "notNull": true,
1469
+ "autoincrement": false
1470
+ },
1471
+ "slug": {
1472
+ "name": "slug",
1473
+ "type": "text",
1474
+ "primaryKey": false,
1475
+ "notNull": true,
1476
+ "autoincrement": false
1477
+ },
1478
+ "name": {
1479
+ "name": "name",
1480
+ "type": "text",
1481
+ "primaryKey": false,
1482
+ "notNull": true,
1483
+ "autoincrement": false
1484
+ },
1485
+ "description": {
1486
+ "name": "description",
1487
+ "type": "text",
1488
+ "primaryKey": false,
1489
+ "notNull": true,
1490
+ "autoincrement": false,
1491
+ "default": "''"
1492
+ },
1493
+ "short_description": {
1494
+ "name": "short_description",
1495
+ "type": "text",
1496
+ "primaryKey": false,
1497
+ "notNull": true,
1498
+ "autoincrement": false,
1499
+ "default": "''"
1500
+ },
1501
+ "status": {
1502
+ "name": "status",
1503
+ "type": "text",
1504
+ "primaryKey": false,
1505
+ "notNull": true,
1506
+ "autoincrement": false,
1507
+ "default": "'draft'"
1508
+ },
1509
+ "type": {
1510
+ "name": "type",
1511
+ "type": "text",
1512
+ "primaryKey": false,
1513
+ "notNull": true,
1514
+ "autoincrement": false,
1515
+ "default": "'simple'"
1516
+ },
1517
+ "seo_title": {
1518
+ "name": "seo_title",
1519
+ "type": "text",
1520
+ "primaryKey": false,
1521
+ "notNull": true,
1522
+ "autoincrement": false,
1523
+ "default": "''"
1524
+ },
1525
+ "seo_description": {
1526
+ "name": "seo_description",
1527
+ "type": "text",
1528
+ "primaryKey": false,
1529
+ "notNull": true,
1530
+ "autoincrement": false,
1531
+ "default": "''"
1532
+ },
1533
+ "media": {
1534
+ "name": "media",
1535
+ "type": "text",
1536
+ "primaryKey": false,
1537
+ "notNull": true,
1538
+ "autoincrement": false,
1539
+ "default": "'[]'"
1540
+ },
1541
+ "metadata": {
1542
+ "name": "metadata",
1543
+ "type": "text",
1544
+ "primaryKey": false,
1545
+ "notNull": true,
1546
+ "autoincrement": false,
1547
+ "default": "'{}'"
1548
+ },
1549
+ "created_at": {
1550
+ "name": "created_at",
1551
+ "type": "text",
1552
+ "primaryKey": false,
1553
+ "notNull": true,
1554
+ "autoincrement": false
1555
+ },
1556
+ "updated_at": {
1557
+ "name": "updated_at",
1558
+ "type": "text",
1559
+ "primaryKey": false,
1560
+ "notNull": true,
1561
+ "autoincrement": false
1562
+ }
1563
+ },
1564
+ "indexes": {
1565
+ "products_slug_unique": {
1566
+ "name": "products_slug_unique",
1567
+ "columns": [
1568
+ "slug"
1569
+ ],
1570
+ "isUnique": true
1571
+ },
1572
+ "products_status_idx": {
1573
+ "name": "products_status_idx",
1574
+ "columns": [
1575
+ "status"
1576
+ ],
1577
+ "isUnique": false
1578
+ }
1579
+ },
1580
+ "foreignKeys": {},
1581
+ "compositePrimaryKeys": {},
1582
+ "uniqueConstraints": {},
1583
+ "checkConstraints": {}
1584
+ },
1585
+ "refresh_tokens": {
1586
+ "name": "refresh_tokens",
1587
+ "columns": {
1588
+ "id": {
1589
+ "name": "id",
1590
+ "type": "text",
1591
+ "primaryKey": true,
1592
+ "notNull": true,
1593
+ "autoincrement": false
1594
+ },
1595
+ "customer_id": {
1596
+ "name": "customer_id",
1597
+ "type": "text",
1598
+ "primaryKey": false,
1599
+ "notNull": true,
1600
+ "autoincrement": false
1601
+ },
1602
+ "token_hash": {
1603
+ "name": "token_hash",
1604
+ "type": "text",
1605
+ "primaryKey": false,
1606
+ "notNull": true,
1607
+ "autoincrement": false
1608
+ },
1609
+ "revoked_at": {
1610
+ "name": "revoked_at",
1611
+ "type": "text",
1612
+ "primaryKey": false,
1613
+ "notNull": false,
1614
+ "autoincrement": false
1615
+ },
1616
+ "replaced_by_jti": {
1617
+ "name": "replaced_by_jti",
1618
+ "type": "text",
1619
+ "primaryKey": false,
1620
+ "notNull": false,
1621
+ "autoincrement": false
1622
+ },
1623
+ "expires_at": {
1624
+ "name": "expires_at",
1625
+ "type": "text",
1626
+ "primaryKey": false,
1627
+ "notNull": true,
1628
+ "autoincrement": false
1629
+ },
1630
+ "created_at": {
1631
+ "name": "created_at",
1632
+ "type": "text",
1633
+ "primaryKey": false,
1634
+ "notNull": true,
1635
+ "autoincrement": false
1636
+ }
1637
+ },
1638
+ "indexes": {
1639
+ "refresh_tokens_customer_idx": {
1640
+ "name": "refresh_tokens_customer_idx",
1641
+ "columns": [
1642
+ "customer_id"
1643
+ ],
1644
+ "isUnique": false
1645
+ }
1646
+ },
1647
+ "foreignKeys": {},
1648
+ "compositePrimaryKeys": {},
1649
+ "uniqueConstraints": {},
1650
+ "checkConstraints": {}
1651
+ },
1652
+ "reviews": {
1653
+ "name": "reviews",
1654
+ "columns": {
1655
+ "id": {
1656
+ "name": "id",
1657
+ "type": "text",
1658
+ "primaryKey": true,
1659
+ "notNull": true,
1660
+ "autoincrement": false
1661
+ },
1662
+ "product_id": {
1663
+ "name": "product_id",
1664
+ "type": "text",
1665
+ "primaryKey": false,
1666
+ "notNull": true,
1667
+ "autoincrement": false
1668
+ },
1669
+ "customer_id": {
1670
+ "name": "customer_id",
1671
+ "type": "text",
1672
+ "primaryKey": false,
1673
+ "notNull": false,
1674
+ "autoincrement": false
1675
+ },
1676
+ "order_id": {
1677
+ "name": "order_id",
1678
+ "type": "text",
1679
+ "primaryKey": false,
1680
+ "notNull": false,
1681
+ "autoincrement": false
1682
+ },
1683
+ "rating": {
1684
+ "name": "rating",
1685
+ "type": "integer",
1686
+ "primaryKey": false,
1687
+ "notNull": true,
1688
+ "autoincrement": false
1689
+ },
1690
+ "title": {
1691
+ "name": "title",
1692
+ "type": "text",
1693
+ "primaryKey": false,
1694
+ "notNull": true,
1695
+ "autoincrement": false,
1696
+ "default": "''"
1697
+ },
1698
+ "body": {
1699
+ "name": "body",
1700
+ "type": "text",
1701
+ "primaryKey": false,
1702
+ "notNull": true,
1703
+ "autoincrement": false,
1704
+ "default": "''"
1705
+ },
1706
+ "moderation_status": {
1707
+ "name": "moderation_status",
1708
+ "type": "text",
1709
+ "primaryKey": false,
1710
+ "notNull": true,
1711
+ "autoincrement": false,
1712
+ "default": "'pending'"
1713
+ },
1714
+ "submitted_at": {
1715
+ "name": "submitted_at",
1716
+ "type": "text",
1717
+ "primaryKey": false,
1718
+ "notNull": true,
1719
+ "autoincrement": false
1720
+ },
1721
+ "moderated_at": {
1722
+ "name": "moderated_at",
1723
+ "type": "text",
1724
+ "primaryKey": false,
1725
+ "notNull": false,
1726
+ "autoincrement": false
1727
+ },
1728
+ "moderated_by": {
1729
+ "name": "moderated_by",
1730
+ "type": "text",
1731
+ "primaryKey": false,
1732
+ "notNull": false,
1733
+ "autoincrement": false
1734
+ }
1735
+ },
1736
+ "indexes": {
1737
+ "reviews_product_idx": {
1738
+ "name": "reviews_product_idx",
1739
+ "columns": [
1740
+ "product_id"
1741
+ ],
1742
+ "isUnique": false
1743
+ },
1744
+ "reviews_status_idx": {
1745
+ "name": "reviews_status_idx",
1746
+ "columns": [
1747
+ "moderation_status"
1748
+ ],
1749
+ "isUnique": false
1750
+ }
1751
+ },
1752
+ "foreignKeys": {},
1753
+ "compositePrimaryKeys": {},
1754
+ "uniqueConstraints": {},
1755
+ "checkConstraints": {}
1756
+ },
1757
+ "settings": {
1758
+ "name": "settings",
1759
+ "columns": {
1760
+ "slot": {
1761
+ "name": "slot",
1762
+ "type": "text",
1763
+ "primaryKey": false,
1764
+ "notNull": true,
1765
+ "autoincrement": false
1766
+ },
1767
+ "path": {
1768
+ "name": "path",
1769
+ "type": "text",
1770
+ "primaryKey": false,
1771
+ "notNull": true,
1772
+ "autoincrement": false
1773
+ },
1774
+ "ciphertext": {
1775
+ "name": "ciphertext",
1776
+ "type": "blob",
1777
+ "primaryKey": false,
1778
+ "notNull": false,
1779
+ "autoincrement": false
1780
+ },
1781
+ "plain": {
1782
+ "name": "plain",
1783
+ "type": "text",
1784
+ "primaryKey": false,
1785
+ "notNull": false,
1786
+ "autoincrement": false
1787
+ },
1788
+ "iv": {
1789
+ "name": "iv",
1790
+ "type": "blob",
1791
+ "primaryKey": false,
1792
+ "notNull": false,
1793
+ "autoincrement": false
1794
+ },
1795
+ "tag": {
1796
+ "name": "tag",
1797
+ "type": "blob",
1798
+ "primaryKey": false,
1799
+ "notNull": false,
1800
+ "autoincrement": false
1801
+ },
1802
+ "key_id": {
1803
+ "name": "key_id",
1804
+ "type": "text",
1805
+ "primaryKey": false,
1806
+ "notNull": false,
1807
+ "autoincrement": false
1808
+ },
1809
+ "updated_at": {
1810
+ "name": "updated_at",
1811
+ "type": "text",
1812
+ "primaryKey": false,
1813
+ "notNull": true,
1814
+ "autoincrement": false
1815
+ },
1816
+ "updated_by": {
1817
+ "name": "updated_by",
1818
+ "type": "text",
1819
+ "primaryKey": false,
1820
+ "notNull": false,
1821
+ "autoincrement": false
1822
+ }
1823
+ },
1824
+ "indexes": {},
1825
+ "foreignKeys": {},
1826
+ "compositePrimaryKeys": {
1827
+ "settings_slot_path_pk": {
1828
+ "columns": [
1829
+ "slot",
1830
+ "path"
1831
+ ],
1832
+ "name": "settings_slot_path_pk"
1833
+ }
1834
+ },
1835
+ "uniqueConstraints": {},
1836
+ "checkConstraints": {
1837
+ "settings_one_value": {
1838
+ "name": "settings_one_value",
1839
+ "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))"
1840
+ }
1841
+ }
1842
+ },
1843
+ "stock_adjustments": {
1844
+ "name": "stock_adjustments",
1845
+ "columns": {
1846
+ "id": {
1847
+ "name": "id",
1848
+ "type": "text",
1849
+ "primaryKey": true,
1850
+ "notNull": true,
1851
+ "autoincrement": false
1852
+ },
1853
+ "variant_id": {
1854
+ "name": "variant_id",
1855
+ "type": "text",
1856
+ "primaryKey": false,
1857
+ "notNull": true,
1858
+ "autoincrement": false
1859
+ },
1860
+ "adjustment": {
1861
+ "name": "adjustment",
1862
+ "type": "integer",
1863
+ "primaryKey": false,
1864
+ "notNull": true,
1865
+ "autoincrement": false
1866
+ },
1867
+ "reason": {
1868
+ "name": "reason",
1869
+ "type": "text",
1870
+ "primaryKey": false,
1871
+ "notNull": true,
1872
+ "autoincrement": false
1873
+ },
1874
+ "actor": {
1875
+ "name": "actor",
1876
+ "type": "text",
1877
+ "primaryKey": false,
1878
+ "notNull": true,
1879
+ "autoincrement": false
1880
+ },
1881
+ "previous_qty": {
1882
+ "name": "previous_qty",
1883
+ "type": "integer",
1884
+ "primaryKey": false,
1885
+ "notNull": true,
1886
+ "autoincrement": false
1887
+ },
1888
+ "new_qty": {
1889
+ "name": "new_qty",
1890
+ "type": "integer",
1891
+ "primaryKey": false,
1892
+ "notNull": true,
1893
+ "autoincrement": false
1894
+ },
1895
+ "timestamp": {
1896
+ "name": "timestamp",
1897
+ "type": "text",
1898
+ "primaryKey": false,
1899
+ "notNull": true,
1900
+ "autoincrement": false
1901
+ }
1902
+ },
1903
+ "indexes": {
1904
+ "stock_adjustments_variant_idx": {
1905
+ "name": "stock_adjustments_variant_idx",
1906
+ "columns": [
1907
+ "variant_id"
1908
+ ],
1909
+ "isUnique": false
1910
+ }
1911
+ },
1912
+ "foreignKeys": {},
1913
+ "compositePrimaryKeys": {},
1914
+ "uniqueConstraints": {},
1915
+ "checkConstraints": {}
1916
+ },
1917
+ "variants": {
1918
+ "name": "variants",
1919
+ "columns": {
1920
+ "id": {
1921
+ "name": "id",
1922
+ "type": "text",
1923
+ "primaryKey": true,
1924
+ "notNull": true,
1925
+ "autoincrement": false
1926
+ },
1927
+ "product_id": {
1928
+ "name": "product_id",
1929
+ "type": "text",
1930
+ "primaryKey": false,
1931
+ "notNull": true,
1932
+ "autoincrement": false
1933
+ },
1934
+ "sku": {
1935
+ "name": "sku",
1936
+ "type": "text",
1937
+ "primaryKey": false,
1938
+ "notNull": true,
1939
+ "autoincrement": false
1940
+ },
1941
+ "name": {
1942
+ "name": "name",
1943
+ "type": "text",
1944
+ "primaryKey": false,
1945
+ "notNull": true,
1946
+ "autoincrement": false,
1947
+ "default": "''"
1948
+ },
1949
+ "price_minor": {
1950
+ "name": "price_minor",
1951
+ "type": "integer",
1952
+ "primaryKey": false,
1953
+ "notNull": true,
1954
+ "autoincrement": false
1955
+ },
1956
+ "compare_at_price_minor": {
1957
+ "name": "compare_at_price_minor",
1958
+ "type": "integer",
1959
+ "primaryKey": false,
1960
+ "notNull": false,
1961
+ "autoincrement": false
1962
+ },
1963
+ "weight_grams": {
1964
+ "name": "weight_grams",
1965
+ "type": "integer",
1966
+ "primaryKey": false,
1967
+ "notNull": false,
1968
+ "autoincrement": false
1969
+ },
1970
+ "dimensions": {
1971
+ "name": "dimensions",
1972
+ "type": "text",
1973
+ "primaryKey": false,
1974
+ "notNull": false,
1975
+ "autoincrement": false
1976
+ },
1977
+ "stock": {
1978
+ "name": "stock",
1979
+ "type": "integer",
1980
+ "primaryKey": false,
1981
+ "notNull": true,
1982
+ "autoincrement": false,
1983
+ "default": 0
1984
+ },
1985
+ "low_stock_threshold": {
1986
+ "name": "low_stock_threshold",
1987
+ "type": "integer",
1988
+ "primaryKey": false,
1989
+ "notNull": true,
1990
+ "autoincrement": false,
1991
+ "default": 0
1992
+ },
1993
+ "options": {
1994
+ "name": "options",
1995
+ "type": "text",
1996
+ "primaryKey": false,
1997
+ "notNull": true,
1998
+ "autoincrement": false,
1999
+ "default": "'[]'"
2000
+ },
2001
+ "status": {
2002
+ "name": "status",
2003
+ "type": "text",
2004
+ "primaryKey": false,
2005
+ "notNull": true,
2006
+ "autoincrement": false,
2007
+ "default": "'active'"
2008
+ },
2009
+ "created_at": {
2010
+ "name": "created_at",
2011
+ "type": "text",
2012
+ "primaryKey": false,
2013
+ "notNull": true,
2014
+ "autoincrement": false
2015
+ },
2016
+ "updated_at": {
2017
+ "name": "updated_at",
2018
+ "type": "text",
2019
+ "primaryKey": false,
2020
+ "notNull": true,
2021
+ "autoincrement": false
2022
+ }
2023
+ },
2024
+ "indexes": {
2025
+ "variants_sku_unique": {
2026
+ "name": "variants_sku_unique",
2027
+ "columns": [
2028
+ "sku"
2029
+ ],
2030
+ "isUnique": true
2031
+ },
2032
+ "variants_product_idx": {
2033
+ "name": "variants_product_idx",
2034
+ "columns": [
2035
+ "product_id"
2036
+ ],
2037
+ "isUnique": false
2038
+ }
2039
+ },
2040
+ "foreignKeys": {},
2041
+ "compositePrimaryKeys": {},
2042
+ "uniqueConstraints": {},
2043
+ "checkConstraints": {}
2044
+ }
2045
+ },
2046
+ "views": {},
2047
+ "enums": {},
2048
+ "_meta": {
2049
+ "schemas": {},
2050
+ "tables": {},
2051
+ "columns": {}
2052
+ },
2053
+ "internal": {
2054
+ "indexes": {}
2055
+ }
2056
+ }