@nymbalhq/platform 1.3.0 → 1.5.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 (41) hide show
  1. package/dist/{chunk-QN56IB4G.js → chunk-NNDIAIT6.js} +187 -5
  2. package/dist/chunk-NNDIAIT6.js.map +1 -0
  3. package/dist/{chunk-2PLYK5RU.js → chunk-TRLERRUI.js} +3559 -509
  4. package/dist/chunk-TRLERRUI.js.map +1 -0
  5. package/dist/db/schema/index.d.ts +5276 -3224
  6. package/dist/db/schema/index.js +1 -1
  7. package/dist/index.d.ts +428 -81
  8. package/dist/index.js +1200 -2254
  9. package/dist/index.js.map +1 -1
  10. package/dist/register-SBGUI2L5.js +8 -0
  11. package/migrations/postgres/0013_order_access_keys.sql +11 -0
  12. package/migrations/postgres/0014_alert_subscriptions.sql +22 -0
  13. package/migrations/postgres/0015_events_retry_at.sql +1 -0
  14. package/migrations/postgres/0016_email_suppressions.sql +7 -0
  15. package/migrations/postgres/0017_order_shipments.sql +14 -0
  16. package/migrations/postgres/0018_order_key_expiry.sql +8 -0
  17. package/migrations/postgres/meta/0013_snapshot.json +2000 -0
  18. package/migrations/postgres/meta/0014_snapshot.json +2185 -0
  19. package/migrations/postgres/meta/0015_snapshot.json +2191 -0
  20. package/migrations/postgres/meta/0016_snapshot.json +2233 -0
  21. package/migrations/postgres/meta/0017_snapshot.json +2300 -0
  22. package/migrations/postgres/meta/0018_snapshot.json +2306 -0
  23. package/migrations/postgres/meta/_journal.json +42 -0
  24. package/migrations/sqlite/0013_order_access_keys.sql +11 -0
  25. package/migrations/sqlite/0014_alert_subscriptions.sql +22 -0
  26. package/migrations/sqlite/0015_events_retry_at.sql +1 -0
  27. package/migrations/sqlite/0016_email_suppressions.sql +7 -0
  28. package/migrations/sqlite/0017_order_shipments.sql +9 -0
  29. package/migrations/sqlite/0018_order_key_expiry.sql +25 -0
  30. package/migrations/sqlite/meta/0013_snapshot.json +1788 -0
  31. package/migrations/sqlite/meta/0014_snapshot.json +1931 -0
  32. package/migrations/sqlite/meta/0015_snapshot.json +1938 -0
  33. package/migrations/sqlite/meta/0016_snapshot.json +1981 -0
  34. package/migrations/sqlite/meta/0017_snapshot.json +2041 -0
  35. package/migrations/sqlite/meta/0018_snapshot.json +2048 -0
  36. package/migrations/sqlite/meta/_journal.json +42 -0
  37. package/package.json +17 -47
  38. package/dist/chunk-2PLYK5RU.js.map +0 -1
  39. package/dist/chunk-QN56IB4G.js.map +0 -1
  40. package/dist/register-UUQ64HZP.js +0 -8
  41. /package/dist/{register-UUQ64HZP.js.map → register-SBGUI2L5.js.map} +0 -0
@@ -0,0 +1,1981 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "56488b98-a4a3-474b-96be-6a88b7ca4b83",
5
+ "prevId": "60fa976b-4008-4e64-9013-1b94cf76c8b7",
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
+ },
368
+ "foreignKeys": {},
369
+ "compositePrimaryKeys": {},
370
+ "uniqueConstraints": {},
371
+ "checkConstraints": {}
372
+ },
373
+ "categories": {
374
+ "name": "categories",
375
+ "columns": {
376
+ "id": {
377
+ "name": "id",
378
+ "type": "text",
379
+ "primaryKey": true,
380
+ "notNull": true,
381
+ "autoincrement": false
382
+ },
383
+ "parent_id": {
384
+ "name": "parent_id",
385
+ "type": "text",
386
+ "primaryKey": false,
387
+ "notNull": false,
388
+ "autoincrement": false
389
+ },
390
+ "slug": {
391
+ "name": "slug",
392
+ "type": "text",
393
+ "primaryKey": false,
394
+ "notNull": true,
395
+ "autoincrement": false
396
+ },
397
+ "name": {
398
+ "name": "name",
399
+ "type": "text",
400
+ "primaryKey": false,
401
+ "notNull": true,
402
+ "autoincrement": false
403
+ },
404
+ "description": {
405
+ "name": "description",
406
+ "type": "text",
407
+ "primaryKey": false,
408
+ "notNull": true,
409
+ "autoincrement": false,
410
+ "default": "''"
411
+ },
412
+ "position": {
413
+ "name": "position",
414
+ "type": "integer",
415
+ "primaryKey": false,
416
+ "notNull": true,
417
+ "autoincrement": false,
418
+ "default": 0
419
+ },
420
+ "created_at": {
421
+ "name": "created_at",
422
+ "type": "text",
423
+ "primaryKey": false,
424
+ "notNull": true,
425
+ "autoincrement": false
426
+ }
427
+ },
428
+ "indexes": {
429
+ "categories_slug_unique": {
430
+ "name": "categories_slug_unique",
431
+ "columns": [
432
+ "slug"
433
+ ],
434
+ "isUnique": true
435
+ },
436
+ "categories_parent_idx": {
437
+ "name": "categories_parent_idx",
438
+ "columns": [
439
+ "parent_id"
440
+ ],
441
+ "isUnique": false
442
+ }
443
+ },
444
+ "foreignKeys": {},
445
+ "compositePrimaryKeys": {},
446
+ "uniqueConstraints": {},
447
+ "checkConstraints": {}
448
+ },
449
+ "customers": {
450
+ "name": "customers",
451
+ "columns": {
452
+ "id": {
453
+ "name": "id",
454
+ "type": "text",
455
+ "primaryKey": true,
456
+ "notNull": true,
457
+ "autoincrement": false
458
+ },
459
+ "email": {
460
+ "name": "email",
461
+ "type": "text",
462
+ "primaryKey": false,
463
+ "notNull": true,
464
+ "autoincrement": false
465
+ },
466
+ "password_hash": {
467
+ "name": "password_hash",
468
+ "type": "text",
469
+ "primaryKey": false,
470
+ "notNull": true,
471
+ "autoincrement": false
472
+ },
473
+ "first_name": {
474
+ "name": "first_name",
475
+ "type": "text",
476
+ "primaryKey": false,
477
+ "notNull": true,
478
+ "autoincrement": false,
479
+ "default": "''"
480
+ },
481
+ "last_name": {
482
+ "name": "last_name",
483
+ "type": "text",
484
+ "primaryKey": false,
485
+ "notNull": true,
486
+ "autoincrement": false,
487
+ "default": "''"
488
+ },
489
+ "phone": {
490
+ "name": "phone",
491
+ "type": "text",
492
+ "primaryKey": false,
493
+ "notNull": true,
494
+ "autoincrement": false,
495
+ "default": "''"
496
+ },
497
+ "addresses": {
498
+ "name": "addresses",
499
+ "type": "text",
500
+ "primaryKey": false,
501
+ "notNull": true,
502
+ "autoincrement": false,
503
+ "default": "'[]'"
504
+ },
505
+ "order_count": {
506
+ "name": "order_count",
507
+ "type": "integer",
508
+ "primaryKey": false,
509
+ "notNull": true,
510
+ "autoincrement": false,
511
+ "default": 0
512
+ },
513
+ "total_spent_minor": {
514
+ "name": "total_spent_minor",
515
+ "type": "integer",
516
+ "primaryKey": false,
517
+ "notNull": true,
518
+ "autoincrement": false,
519
+ "default": 0
520
+ },
521
+ "metadata": {
522
+ "name": "metadata",
523
+ "type": "text",
524
+ "primaryKey": false,
525
+ "notNull": true,
526
+ "autoincrement": false,
527
+ "default": "'{}'"
528
+ },
529
+ "roles": {
530
+ "name": "roles",
531
+ "type": "text",
532
+ "primaryKey": false,
533
+ "notNull": true,
534
+ "autoincrement": false,
535
+ "default": "'[\"customer\"]'"
536
+ },
537
+ "requires_password_reset": {
538
+ "name": "requires_password_reset",
539
+ "type": "integer",
540
+ "primaryKey": false,
541
+ "notNull": true,
542
+ "autoincrement": false,
543
+ "default": false
544
+ },
545
+ "created_at": {
546
+ "name": "created_at",
547
+ "type": "text",
548
+ "primaryKey": false,
549
+ "notNull": true,
550
+ "autoincrement": false
551
+ },
552
+ "updated_at": {
553
+ "name": "updated_at",
554
+ "type": "text",
555
+ "primaryKey": false,
556
+ "notNull": true,
557
+ "autoincrement": false
558
+ }
559
+ },
560
+ "indexes": {
561
+ "customers_email_unique": {
562
+ "name": "customers_email_unique",
563
+ "columns": [
564
+ "email"
565
+ ],
566
+ "isUnique": true
567
+ }
568
+ },
569
+ "foreignKeys": {},
570
+ "compositePrimaryKeys": {},
571
+ "uniqueConstraints": {},
572
+ "checkConstraints": {}
573
+ },
574
+ "email_suppressions": {
575
+ "name": "email_suppressions",
576
+ "columns": {
577
+ "email": {
578
+ "name": "email",
579
+ "type": "text",
580
+ "primaryKey": true,
581
+ "notNull": true,
582
+ "autoincrement": false
583
+ },
584
+ "reason": {
585
+ "name": "reason",
586
+ "type": "text",
587
+ "primaryKey": false,
588
+ "notNull": true,
589
+ "autoincrement": false
590
+ },
591
+ "event_id": {
592
+ "name": "event_id",
593
+ "type": "text",
594
+ "primaryKey": false,
595
+ "notNull": true,
596
+ "autoincrement": false
597
+ },
598
+ "created_at": {
599
+ "name": "created_at",
600
+ "type": "text",
601
+ "primaryKey": false,
602
+ "notNull": true,
603
+ "autoincrement": false
604
+ }
605
+ },
606
+ "indexes": {},
607
+ "foreignKeys": {},
608
+ "compositePrimaryKeys": {},
609
+ "uniqueConstraints": {},
610
+ "checkConstraints": {
611
+ "email_suppressions_reason": {
612
+ "name": "email_suppressions_reason",
613
+ "value": "\"email_suppressions\".\"reason\" IN ('hard_bounce', 'complaint')"
614
+ }
615
+ }
616
+ },
617
+ "events": {
618
+ "name": "events",
619
+ "columns": {
620
+ "seq": {
621
+ "name": "seq",
622
+ "type": "integer",
623
+ "primaryKey": true,
624
+ "notNull": true,
625
+ "autoincrement": true
626
+ },
627
+ "id": {
628
+ "name": "id",
629
+ "type": "text",
630
+ "primaryKey": false,
631
+ "notNull": true,
632
+ "autoincrement": false
633
+ },
634
+ "type": {
635
+ "name": "type",
636
+ "type": "text",
637
+ "primaryKey": false,
638
+ "notNull": true,
639
+ "autoincrement": false
640
+ },
641
+ "envelope": {
642
+ "name": "envelope",
643
+ "type": "text",
644
+ "primaryKey": false,
645
+ "notNull": true,
646
+ "autoincrement": false
647
+ },
648
+ "correlation_id": {
649
+ "name": "correlation_id",
650
+ "type": "text",
651
+ "primaryKey": false,
652
+ "notNull": true,
653
+ "autoincrement": false
654
+ },
655
+ "created_at": {
656
+ "name": "created_at",
657
+ "type": "text",
658
+ "primaryKey": false,
659
+ "notNull": true,
660
+ "autoincrement": false
661
+ },
662
+ "subject_type": {
663
+ "name": "subject_type",
664
+ "type": "text",
665
+ "primaryKey": false,
666
+ "notNull": false,
667
+ "autoincrement": false
668
+ },
669
+ "subject_id": {
670
+ "name": "subject_id",
671
+ "type": "text",
672
+ "primaryKey": false,
673
+ "notNull": false,
674
+ "autoincrement": false
675
+ },
676
+ "delivered_at": {
677
+ "name": "delivered_at",
678
+ "type": "text",
679
+ "primaryKey": false,
680
+ "notNull": false,
681
+ "autoincrement": false
682
+ },
683
+ "attempts": {
684
+ "name": "attempts",
685
+ "type": "integer",
686
+ "primaryKey": false,
687
+ "notNull": true,
688
+ "autoincrement": false,
689
+ "default": 0
690
+ },
691
+ "dead_at": {
692
+ "name": "dead_at",
693
+ "type": "text",
694
+ "primaryKey": false,
695
+ "notNull": false,
696
+ "autoincrement": false
697
+ },
698
+ "retry_at": {
699
+ "name": "retry_at",
700
+ "type": "text",
701
+ "primaryKey": false,
702
+ "notNull": false,
703
+ "autoincrement": false
704
+ }
705
+ },
706
+ "indexes": {
707
+ "events_id_unique": {
708
+ "name": "events_id_unique",
709
+ "columns": [
710
+ "id"
711
+ ],
712
+ "isUnique": true
713
+ },
714
+ "events_undelivered_idx": {
715
+ "name": "events_undelivered_idx",
716
+ "columns": [
717
+ "delivered_at",
718
+ "seq"
719
+ ],
720
+ "isUnique": false
721
+ },
722
+ "events_correlation_idx": {
723
+ "name": "events_correlation_idx",
724
+ "columns": [
725
+ "correlation_id",
726
+ "seq"
727
+ ],
728
+ "isUnique": false
729
+ },
730
+ "events_catch_up_idx": {
731
+ "name": "events_catch_up_idx",
732
+ "columns": [
733
+ "dead_at",
734
+ "delivered_at",
735
+ "seq"
736
+ ],
737
+ "isUnique": false
738
+ },
739
+ "events_subject_idx": {
740
+ "name": "events_subject_idx",
741
+ "columns": [
742
+ "subject_type",
743
+ "subject_id",
744
+ "seq"
745
+ ],
746
+ "isUnique": false
747
+ }
748
+ },
749
+ "foreignKeys": {},
750
+ "compositePrimaryKeys": {},
751
+ "uniqueConstraints": {},
752
+ "checkConstraints": {}
753
+ },
754
+ "inventory_reservations": {
755
+ "name": "inventory_reservations",
756
+ "columns": {
757
+ "reservation_id": {
758
+ "name": "reservation_id",
759
+ "type": "text",
760
+ "primaryKey": true,
761
+ "notNull": true,
762
+ "autoincrement": false
763
+ },
764
+ "variant_id": {
765
+ "name": "variant_id",
766
+ "type": "text",
767
+ "primaryKey": false,
768
+ "notNull": true,
769
+ "autoincrement": false
770
+ },
771
+ "qty": {
772
+ "name": "qty",
773
+ "type": "integer",
774
+ "primaryKey": false,
775
+ "notNull": true,
776
+ "autoincrement": false
777
+ },
778
+ "order_ref": {
779
+ "name": "order_ref",
780
+ "type": "text",
781
+ "primaryKey": false,
782
+ "notNull": false,
783
+ "autoincrement": false
784
+ },
785
+ "expires_at": {
786
+ "name": "expires_at",
787
+ "type": "text",
788
+ "primaryKey": false,
789
+ "notNull": true,
790
+ "autoincrement": false
791
+ },
792
+ "created_at": {
793
+ "name": "created_at",
794
+ "type": "text",
795
+ "primaryKey": false,
796
+ "notNull": true,
797
+ "autoincrement": false
798
+ }
799
+ },
800
+ "indexes": {
801
+ "inv_reservations_variant_idx": {
802
+ "name": "inv_reservations_variant_idx",
803
+ "columns": [
804
+ "variant_id"
805
+ ],
806
+ "isUnique": false
807
+ },
808
+ "inv_reservations_expires_idx": {
809
+ "name": "inv_reservations_expires_idx",
810
+ "columns": [
811
+ "expires_at"
812
+ ],
813
+ "isUnique": false
814
+ }
815
+ },
816
+ "foreignKeys": {},
817
+ "compositePrimaryKeys": {},
818
+ "uniqueConstraints": {},
819
+ "checkConstraints": {}
820
+ },
821
+ "order_access_keys": {
822
+ "name": "order_access_keys",
823
+ "columns": {
824
+ "id": {
825
+ "name": "id",
826
+ "type": "text",
827
+ "primaryKey": true,
828
+ "notNull": true,
829
+ "autoincrement": false
830
+ },
831
+ "order_id": {
832
+ "name": "order_id",
833
+ "type": "text",
834
+ "primaryKey": false,
835
+ "notNull": true,
836
+ "autoincrement": false
837
+ },
838
+ "key_hash": {
839
+ "name": "key_hash",
840
+ "type": "text",
841
+ "primaryKey": false,
842
+ "notNull": true,
843
+ "autoincrement": false
844
+ },
845
+ "purpose": {
846
+ "name": "purpose",
847
+ "type": "text",
848
+ "primaryKey": false,
849
+ "notNull": true,
850
+ "autoincrement": false
851
+ },
852
+ "created_at": {
853
+ "name": "created_at",
854
+ "type": "text",
855
+ "primaryKey": false,
856
+ "notNull": true,
857
+ "autoincrement": false
858
+ }
859
+ },
860
+ "indexes": {
861
+ "order_access_keys_key_hash_idx": {
862
+ "name": "order_access_keys_key_hash_idx",
863
+ "columns": [
864
+ "key_hash"
865
+ ],
866
+ "isUnique": true
867
+ },
868
+ "order_access_keys_order_idx": {
869
+ "name": "order_access_keys_order_idx",
870
+ "columns": [
871
+ "order_id"
872
+ ],
873
+ "isUnique": false
874
+ }
875
+ },
876
+ "foreignKeys": {},
877
+ "compositePrimaryKeys": {},
878
+ "uniqueConstraints": {},
879
+ "checkConstraints": {}
880
+ },
881
+ "order_history": {
882
+ "name": "order_history",
883
+ "columns": {
884
+ "id": {
885
+ "name": "id",
886
+ "type": "text",
887
+ "primaryKey": true,
888
+ "notNull": true,
889
+ "autoincrement": false
890
+ },
891
+ "order_id": {
892
+ "name": "order_id",
893
+ "type": "text",
894
+ "primaryKey": false,
895
+ "notNull": true,
896
+ "autoincrement": false
897
+ },
898
+ "from_status": {
899
+ "name": "from_status",
900
+ "type": "text",
901
+ "primaryKey": false,
902
+ "notNull": false,
903
+ "autoincrement": false
904
+ },
905
+ "to_status": {
906
+ "name": "to_status",
907
+ "type": "text",
908
+ "primaryKey": false,
909
+ "notNull": true,
910
+ "autoincrement": false
911
+ },
912
+ "actor": {
913
+ "name": "actor",
914
+ "type": "text",
915
+ "primaryKey": false,
916
+ "notNull": true,
917
+ "autoincrement": false
918
+ },
919
+ "note": {
920
+ "name": "note",
921
+ "type": "text",
922
+ "primaryKey": false,
923
+ "notNull": true,
924
+ "autoincrement": false,
925
+ "default": "''"
926
+ },
927
+ "timestamp": {
928
+ "name": "timestamp",
929
+ "type": "text",
930
+ "primaryKey": false,
931
+ "notNull": true,
932
+ "autoincrement": false
933
+ }
934
+ },
935
+ "indexes": {
936
+ "order_history_order_idx": {
937
+ "name": "order_history_order_idx",
938
+ "columns": [
939
+ "order_id"
940
+ ],
941
+ "isUnique": false
942
+ }
943
+ },
944
+ "foreignKeys": {},
945
+ "compositePrimaryKeys": {},
946
+ "uniqueConstraints": {},
947
+ "checkConstraints": {}
948
+ },
949
+ "order_refunds": {
950
+ "name": "order_refunds",
951
+ "columns": {
952
+ "id": {
953
+ "name": "id",
954
+ "type": "text",
955
+ "primaryKey": true,
956
+ "notNull": true,
957
+ "autoincrement": false
958
+ },
959
+ "order_id": {
960
+ "name": "order_id",
961
+ "type": "text",
962
+ "primaryKey": false,
963
+ "notNull": true,
964
+ "autoincrement": false
965
+ },
966
+ "amount_minor": {
967
+ "name": "amount_minor",
968
+ "type": "integer",
969
+ "primaryKey": false,
970
+ "notNull": true,
971
+ "autoincrement": false
972
+ },
973
+ "currency": {
974
+ "name": "currency",
975
+ "type": "text",
976
+ "primaryKey": false,
977
+ "notNull": true,
978
+ "autoincrement": false
979
+ },
980
+ "provider_refund_id": {
981
+ "name": "provider_refund_id",
982
+ "type": "text",
983
+ "primaryKey": false,
984
+ "notNull": false,
985
+ "autoincrement": false
986
+ },
987
+ "status": {
988
+ "name": "status",
989
+ "type": "text",
990
+ "primaryKey": false,
991
+ "notNull": true,
992
+ "autoincrement": false,
993
+ "default": "'pending'"
994
+ },
995
+ "reason": {
996
+ "name": "reason",
997
+ "type": "text",
998
+ "primaryKey": false,
999
+ "notNull": false,
1000
+ "autoincrement": false
1001
+ },
1002
+ "actor": {
1003
+ "name": "actor",
1004
+ "type": "text",
1005
+ "primaryKey": false,
1006
+ "notNull": true,
1007
+ "autoincrement": false
1008
+ },
1009
+ "created_at": {
1010
+ "name": "created_at",
1011
+ "type": "text",
1012
+ "primaryKey": false,
1013
+ "notNull": true,
1014
+ "autoincrement": false
1015
+ },
1016
+ "request_id": {
1017
+ "name": "request_id",
1018
+ "type": "text",
1019
+ "primaryKey": false,
1020
+ "notNull": false,
1021
+ "autoincrement": false
1022
+ }
1023
+ },
1024
+ "indexes": {
1025
+ "order_refunds_order_idx": {
1026
+ "name": "order_refunds_order_idx",
1027
+ "columns": [
1028
+ "order_id"
1029
+ ],
1030
+ "isUnique": false
1031
+ },
1032
+ "order_refunds_order_request_idx": {
1033
+ "name": "order_refunds_order_request_idx",
1034
+ "columns": [
1035
+ "order_id",
1036
+ "request_id"
1037
+ ],
1038
+ "isUnique": true
1039
+ }
1040
+ },
1041
+ "foreignKeys": {},
1042
+ "compositePrimaryKeys": {},
1043
+ "uniqueConstraints": {},
1044
+ "checkConstraints": {}
1045
+ },
1046
+ "order_sequences": {
1047
+ "name": "order_sequences",
1048
+ "columns": {
1049
+ "id": {
1050
+ "name": "id",
1051
+ "type": "integer",
1052
+ "primaryKey": true,
1053
+ "notNull": true,
1054
+ "autoincrement": false
1055
+ },
1056
+ "next_value": {
1057
+ "name": "next_value",
1058
+ "type": "integer",
1059
+ "primaryKey": false,
1060
+ "notNull": true,
1061
+ "autoincrement": false
1062
+ }
1063
+ },
1064
+ "indexes": {},
1065
+ "foreignKeys": {},
1066
+ "compositePrimaryKeys": {},
1067
+ "uniqueConstraints": {},
1068
+ "checkConstraints": {}
1069
+ },
1070
+ "orders": {
1071
+ "name": "orders",
1072
+ "columns": {
1073
+ "id": {
1074
+ "name": "id",
1075
+ "type": "text",
1076
+ "primaryKey": true,
1077
+ "notNull": true,
1078
+ "autoincrement": false
1079
+ },
1080
+ "order_number": {
1081
+ "name": "order_number",
1082
+ "type": "text",
1083
+ "primaryKey": false,
1084
+ "notNull": true,
1085
+ "autoincrement": false
1086
+ },
1087
+ "sequence": {
1088
+ "name": "sequence",
1089
+ "type": "integer",
1090
+ "primaryKey": false,
1091
+ "notNull": true,
1092
+ "autoincrement": false
1093
+ },
1094
+ "customer_id": {
1095
+ "name": "customer_id",
1096
+ "type": "text",
1097
+ "primaryKey": false,
1098
+ "notNull": false,
1099
+ "autoincrement": false
1100
+ },
1101
+ "status": {
1102
+ "name": "status",
1103
+ "type": "text",
1104
+ "primaryKey": false,
1105
+ "notNull": true,
1106
+ "autoincrement": false,
1107
+ "default": "'pending'"
1108
+ },
1109
+ "email": {
1110
+ "name": "email",
1111
+ "type": "text",
1112
+ "primaryKey": false,
1113
+ "notNull": true,
1114
+ "autoincrement": false
1115
+ },
1116
+ "billing_address": {
1117
+ "name": "billing_address",
1118
+ "type": "text",
1119
+ "primaryKey": false,
1120
+ "notNull": true,
1121
+ "autoincrement": false
1122
+ },
1123
+ "shipping_address": {
1124
+ "name": "shipping_address",
1125
+ "type": "text",
1126
+ "primaryKey": false,
1127
+ "notNull": true,
1128
+ "autoincrement": false
1129
+ },
1130
+ "line_items": {
1131
+ "name": "line_items",
1132
+ "type": "text",
1133
+ "primaryKey": false,
1134
+ "notNull": true,
1135
+ "autoincrement": false
1136
+ },
1137
+ "subtotal_minor": {
1138
+ "name": "subtotal_minor",
1139
+ "type": "integer",
1140
+ "primaryKey": false,
1141
+ "notNull": true,
1142
+ "autoincrement": false
1143
+ },
1144
+ "tax_total_minor": {
1145
+ "name": "tax_total_minor",
1146
+ "type": "integer",
1147
+ "primaryKey": false,
1148
+ "notNull": true,
1149
+ "autoincrement": false,
1150
+ "default": 0
1151
+ },
1152
+ "shipping_total_minor": {
1153
+ "name": "shipping_total_minor",
1154
+ "type": "integer",
1155
+ "primaryKey": false,
1156
+ "notNull": true,
1157
+ "autoincrement": false,
1158
+ "default": 0
1159
+ },
1160
+ "discount_total_minor": {
1161
+ "name": "discount_total_minor",
1162
+ "type": "integer",
1163
+ "primaryKey": false,
1164
+ "notNull": true,
1165
+ "autoincrement": false,
1166
+ "default": 0
1167
+ },
1168
+ "total_minor": {
1169
+ "name": "total_minor",
1170
+ "type": "integer",
1171
+ "primaryKey": false,
1172
+ "notNull": true,
1173
+ "autoincrement": false
1174
+ },
1175
+ "currency": {
1176
+ "name": "currency",
1177
+ "type": "text",
1178
+ "primaryKey": false,
1179
+ "notNull": true,
1180
+ "autoincrement": false
1181
+ },
1182
+ "notes": {
1183
+ "name": "notes",
1184
+ "type": "text",
1185
+ "primaryKey": false,
1186
+ "notNull": true,
1187
+ "autoincrement": false,
1188
+ "default": "''"
1189
+ },
1190
+ "metadata": {
1191
+ "name": "metadata",
1192
+ "type": "text",
1193
+ "primaryKey": false,
1194
+ "notNull": true,
1195
+ "autoincrement": false,
1196
+ "default": "'{}'"
1197
+ },
1198
+ "payment_intent_id": {
1199
+ "name": "payment_intent_id",
1200
+ "type": "text",
1201
+ "primaryKey": false,
1202
+ "notNull": false,
1203
+ "autoincrement": false
1204
+ },
1205
+ "cart_token": {
1206
+ "name": "cart_token",
1207
+ "type": "text",
1208
+ "primaryKey": false,
1209
+ "notNull": false,
1210
+ "autoincrement": false
1211
+ },
1212
+ "captured_minor": {
1213
+ "name": "captured_minor",
1214
+ "type": "integer",
1215
+ "primaryKey": false,
1216
+ "notNull": true,
1217
+ "autoincrement": false,
1218
+ "default": 0
1219
+ },
1220
+ "captured_at": {
1221
+ "name": "captured_at",
1222
+ "type": "text",
1223
+ "primaryKey": false,
1224
+ "notNull": false,
1225
+ "autoincrement": false
1226
+ },
1227
+ "refunded_minor": {
1228
+ "name": "refunded_minor",
1229
+ "type": "integer",
1230
+ "primaryKey": false,
1231
+ "notNull": true,
1232
+ "autoincrement": false,
1233
+ "default": 0
1234
+ },
1235
+ "capture_method": {
1236
+ "name": "capture_method",
1237
+ "type": "text",
1238
+ "primaryKey": false,
1239
+ "notNull": false,
1240
+ "autoincrement": false
1241
+ },
1242
+ "created_at": {
1243
+ "name": "created_at",
1244
+ "type": "text",
1245
+ "primaryKey": false,
1246
+ "notNull": true,
1247
+ "autoincrement": false
1248
+ },
1249
+ "updated_at": {
1250
+ "name": "updated_at",
1251
+ "type": "text",
1252
+ "primaryKey": false,
1253
+ "notNull": true,
1254
+ "autoincrement": false
1255
+ }
1256
+ },
1257
+ "indexes": {
1258
+ "orders_number_unique": {
1259
+ "name": "orders_number_unique",
1260
+ "columns": [
1261
+ "order_number"
1262
+ ],
1263
+ "isUnique": true
1264
+ },
1265
+ "orders_sequence_unique": {
1266
+ "name": "orders_sequence_unique",
1267
+ "columns": [
1268
+ "sequence"
1269
+ ],
1270
+ "isUnique": true
1271
+ },
1272
+ "orders_customer_idx": {
1273
+ "name": "orders_customer_idx",
1274
+ "columns": [
1275
+ "customer_id"
1276
+ ],
1277
+ "isUnique": false
1278
+ },
1279
+ "orders_status_idx": {
1280
+ "name": "orders_status_idx",
1281
+ "columns": [
1282
+ "status"
1283
+ ],
1284
+ "isUnique": false
1285
+ },
1286
+ "orders_payment_intent_idx": {
1287
+ "name": "orders_payment_intent_idx",
1288
+ "columns": [
1289
+ "payment_intent_id"
1290
+ ],
1291
+ "isUnique": false
1292
+ },
1293
+ "orders_pending_cart_unique": {
1294
+ "name": "orders_pending_cart_unique",
1295
+ "columns": [
1296
+ "cart_token"
1297
+ ],
1298
+ "isUnique": true,
1299
+ "where": "status = 'pending'"
1300
+ }
1301
+ },
1302
+ "foreignKeys": {},
1303
+ "compositePrimaryKeys": {},
1304
+ "uniqueConstraints": {},
1305
+ "checkConstraints": {}
1306
+ },
1307
+ "processed_events": {
1308
+ "name": "processed_events",
1309
+ "columns": {
1310
+ "handler_name": {
1311
+ "name": "handler_name",
1312
+ "type": "text",
1313
+ "primaryKey": false,
1314
+ "notNull": true,
1315
+ "autoincrement": false
1316
+ },
1317
+ "event_id": {
1318
+ "name": "event_id",
1319
+ "type": "text",
1320
+ "primaryKey": false,
1321
+ "notNull": true,
1322
+ "autoincrement": false
1323
+ },
1324
+ "processed_at": {
1325
+ "name": "processed_at",
1326
+ "type": "text",
1327
+ "primaryKey": false,
1328
+ "notNull": true,
1329
+ "autoincrement": false
1330
+ }
1331
+ },
1332
+ "indexes": {},
1333
+ "foreignKeys": {},
1334
+ "compositePrimaryKeys": {
1335
+ "processed_events_handler_name_event_id_pk": {
1336
+ "columns": [
1337
+ "handler_name",
1338
+ "event_id"
1339
+ ],
1340
+ "name": "processed_events_handler_name_event_id_pk"
1341
+ }
1342
+ },
1343
+ "uniqueConstraints": {},
1344
+ "checkConstraints": {}
1345
+ },
1346
+ "product_categories": {
1347
+ "name": "product_categories",
1348
+ "columns": {
1349
+ "product_id": {
1350
+ "name": "product_id",
1351
+ "type": "text",
1352
+ "primaryKey": false,
1353
+ "notNull": true,
1354
+ "autoincrement": false
1355
+ },
1356
+ "category_id": {
1357
+ "name": "category_id",
1358
+ "type": "text",
1359
+ "primaryKey": false,
1360
+ "notNull": true,
1361
+ "autoincrement": false
1362
+ }
1363
+ },
1364
+ "indexes": {
1365
+ "product_categories_category_idx": {
1366
+ "name": "product_categories_category_idx",
1367
+ "columns": [
1368
+ "category_id"
1369
+ ],
1370
+ "isUnique": false
1371
+ }
1372
+ },
1373
+ "foreignKeys": {},
1374
+ "compositePrimaryKeys": {
1375
+ "product_categories_product_id_category_id_pk": {
1376
+ "columns": [
1377
+ "product_id",
1378
+ "category_id"
1379
+ ],
1380
+ "name": "product_categories_product_id_category_id_pk"
1381
+ }
1382
+ },
1383
+ "uniqueConstraints": {},
1384
+ "checkConstraints": {}
1385
+ },
1386
+ "products": {
1387
+ "name": "products",
1388
+ "columns": {
1389
+ "id": {
1390
+ "name": "id",
1391
+ "type": "text",
1392
+ "primaryKey": true,
1393
+ "notNull": true,
1394
+ "autoincrement": false
1395
+ },
1396
+ "slug": {
1397
+ "name": "slug",
1398
+ "type": "text",
1399
+ "primaryKey": false,
1400
+ "notNull": true,
1401
+ "autoincrement": false
1402
+ },
1403
+ "name": {
1404
+ "name": "name",
1405
+ "type": "text",
1406
+ "primaryKey": false,
1407
+ "notNull": true,
1408
+ "autoincrement": false
1409
+ },
1410
+ "description": {
1411
+ "name": "description",
1412
+ "type": "text",
1413
+ "primaryKey": false,
1414
+ "notNull": true,
1415
+ "autoincrement": false,
1416
+ "default": "''"
1417
+ },
1418
+ "short_description": {
1419
+ "name": "short_description",
1420
+ "type": "text",
1421
+ "primaryKey": false,
1422
+ "notNull": true,
1423
+ "autoincrement": false,
1424
+ "default": "''"
1425
+ },
1426
+ "status": {
1427
+ "name": "status",
1428
+ "type": "text",
1429
+ "primaryKey": false,
1430
+ "notNull": true,
1431
+ "autoincrement": false,
1432
+ "default": "'draft'"
1433
+ },
1434
+ "type": {
1435
+ "name": "type",
1436
+ "type": "text",
1437
+ "primaryKey": false,
1438
+ "notNull": true,
1439
+ "autoincrement": false,
1440
+ "default": "'simple'"
1441
+ },
1442
+ "seo_title": {
1443
+ "name": "seo_title",
1444
+ "type": "text",
1445
+ "primaryKey": false,
1446
+ "notNull": true,
1447
+ "autoincrement": false,
1448
+ "default": "''"
1449
+ },
1450
+ "seo_description": {
1451
+ "name": "seo_description",
1452
+ "type": "text",
1453
+ "primaryKey": false,
1454
+ "notNull": true,
1455
+ "autoincrement": false,
1456
+ "default": "''"
1457
+ },
1458
+ "media": {
1459
+ "name": "media",
1460
+ "type": "text",
1461
+ "primaryKey": false,
1462
+ "notNull": true,
1463
+ "autoincrement": false,
1464
+ "default": "'[]'"
1465
+ },
1466
+ "metadata": {
1467
+ "name": "metadata",
1468
+ "type": "text",
1469
+ "primaryKey": false,
1470
+ "notNull": true,
1471
+ "autoincrement": false,
1472
+ "default": "'{}'"
1473
+ },
1474
+ "created_at": {
1475
+ "name": "created_at",
1476
+ "type": "text",
1477
+ "primaryKey": false,
1478
+ "notNull": true,
1479
+ "autoincrement": false
1480
+ },
1481
+ "updated_at": {
1482
+ "name": "updated_at",
1483
+ "type": "text",
1484
+ "primaryKey": false,
1485
+ "notNull": true,
1486
+ "autoincrement": false
1487
+ }
1488
+ },
1489
+ "indexes": {
1490
+ "products_slug_unique": {
1491
+ "name": "products_slug_unique",
1492
+ "columns": [
1493
+ "slug"
1494
+ ],
1495
+ "isUnique": true
1496
+ },
1497
+ "products_status_idx": {
1498
+ "name": "products_status_idx",
1499
+ "columns": [
1500
+ "status"
1501
+ ],
1502
+ "isUnique": false
1503
+ }
1504
+ },
1505
+ "foreignKeys": {},
1506
+ "compositePrimaryKeys": {},
1507
+ "uniqueConstraints": {},
1508
+ "checkConstraints": {}
1509
+ },
1510
+ "refresh_tokens": {
1511
+ "name": "refresh_tokens",
1512
+ "columns": {
1513
+ "id": {
1514
+ "name": "id",
1515
+ "type": "text",
1516
+ "primaryKey": true,
1517
+ "notNull": true,
1518
+ "autoincrement": false
1519
+ },
1520
+ "customer_id": {
1521
+ "name": "customer_id",
1522
+ "type": "text",
1523
+ "primaryKey": false,
1524
+ "notNull": true,
1525
+ "autoincrement": false
1526
+ },
1527
+ "token_hash": {
1528
+ "name": "token_hash",
1529
+ "type": "text",
1530
+ "primaryKey": false,
1531
+ "notNull": true,
1532
+ "autoincrement": false
1533
+ },
1534
+ "revoked_at": {
1535
+ "name": "revoked_at",
1536
+ "type": "text",
1537
+ "primaryKey": false,
1538
+ "notNull": false,
1539
+ "autoincrement": false
1540
+ },
1541
+ "replaced_by_jti": {
1542
+ "name": "replaced_by_jti",
1543
+ "type": "text",
1544
+ "primaryKey": false,
1545
+ "notNull": false,
1546
+ "autoincrement": false
1547
+ },
1548
+ "expires_at": {
1549
+ "name": "expires_at",
1550
+ "type": "text",
1551
+ "primaryKey": false,
1552
+ "notNull": true,
1553
+ "autoincrement": false
1554
+ },
1555
+ "created_at": {
1556
+ "name": "created_at",
1557
+ "type": "text",
1558
+ "primaryKey": false,
1559
+ "notNull": true,
1560
+ "autoincrement": false
1561
+ }
1562
+ },
1563
+ "indexes": {
1564
+ "refresh_tokens_customer_idx": {
1565
+ "name": "refresh_tokens_customer_idx",
1566
+ "columns": [
1567
+ "customer_id"
1568
+ ],
1569
+ "isUnique": false
1570
+ }
1571
+ },
1572
+ "foreignKeys": {},
1573
+ "compositePrimaryKeys": {},
1574
+ "uniqueConstraints": {},
1575
+ "checkConstraints": {}
1576
+ },
1577
+ "reviews": {
1578
+ "name": "reviews",
1579
+ "columns": {
1580
+ "id": {
1581
+ "name": "id",
1582
+ "type": "text",
1583
+ "primaryKey": true,
1584
+ "notNull": true,
1585
+ "autoincrement": false
1586
+ },
1587
+ "product_id": {
1588
+ "name": "product_id",
1589
+ "type": "text",
1590
+ "primaryKey": false,
1591
+ "notNull": true,
1592
+ "autoincrement": false
1593
+ },
1594
+ "customer_id": {
1595
+ "name": "customer_id",
1596
+ "type": "text",
1597
+ "primaryKey": false,
1598
+ "notNull": false,
1599
+ "autoincrement": false
1600
+ },
1601
+ "order_id": {
1602
+ "name": "order_id",
1603
+ "type": "text",
1604
+ "primaryKey": false,
1605
+ "notNull": false,
1606
+ "autoincrement": false
1607
+ },
1608
+ "rating": {
1609
+ "name": "rating",
1610
+ "type": "integer",
1611
+ "primaryKey": false,
1612
+ "notNull": true,
1613
+ "autoincrement": false
1614
+ },
1615
+ "title": {
1616
+ "name": "title",
1617
+ "type": "text",
1618
+ "primaryKey": false,
1619
+ "notNull": true,
1620
+ "autoincrement": false,
1621
+ "default": "''"
1622
+ },
1623
+ "body": {
1624
+ "name": "body",
1625
+ "type": "text",
1626
+ "primaryKey": false,
1627
+ "notNull": true,
1628
+ "autoincrement": false,
1629
+ "default": "''"
1630
+ },
1631
+ "moderation_status": {
1632
+ "name": "moderation_status",
1633
+ "type": "text",
1634
+ "primaryKey": false,
1635
+ "notNull": true,
1636
+ "autoincrement": false,
1637
+ "default": "'pending'"
1638
+ },
1639
+ "submitted_at": {
1640
+ "name": "submitted_at",
1641
+ "type": "text",
1642
+ "primaryKey": false,
1643
+ "notNull": true,
1644
+ "autoincrement": false
1645
+ },
1646
+ "moderated_at": {
1647
+ "name": "moderated_at",
1648
+ "type": "text",
1649
+ "primaryKey": false,
1650
+ "notNull": false,
1651
+ "autoincrement": false
1652
+ },
1653
+ "moderated_by": {
1654
+ "name": "moderated_by",
1655
+ "type": "text",
1656
+ "primaryKey": false,
1657
+ "notNull": false,
1658
+ "autoincrement": false
1659
+ }
1660
+ },
1661
+ "indexes": {
1662
+ "reviews_product_idx": {
1663
+ "name": "reviews_product_idx",
1664
+ "columns": [
1665
+ "product_id"
1666
+ ],
1667
+ "isUnique": false
1668
+ },
1669
+ "reviews_status_idx": {
1670
+ "name": "reviews_status_idx",
1671
+ "columns": [
1672
+ "moderation_status"
1673
+ ],
1674
+ "isUnique": false
1675
+ }
1676
+ },
1677
+ "foreignKeys": {},
1678
+ "compositePrimaryKeys": {},
1679
+ "uniqueConstraints": {},
1680
+ "checkConstraints": {}
1681
+ },
1682
+ "settings": {
1683
+ "name": "settings",
1684
+ "columns": {
1685
+ "slot": {
1686
+ "name": "slot",
1687
+ "type": "text",
1688
+ "primaryKey": false,
1689
+ "notNull": true,
1690
+ "autoincrement": false
1691
+ },
1692
+ "path": {
1693
+ "name": "path",
1694
+ "type": "text",
1695
+ "primaryKey": false,
1696
+ "notNull": true,
1697
+ "autoincrement": false
1698
+ },
1699
+ "ciphertext": {
1700
+ "name": "ciphertext",
1701
+ "type": "blob",
1702
+ "primaryKey": false,
1703
+ "notNull": false,
1704
+ "autoincrement": false
1705
+ },
1706
+ "plain": {
1707
+ "name": "plain",
1708
+ "type": "text",
1709
+ "primaryKey": false,
1710
+ "notNull": false,
1711
+ "autoincrement": false
1712
+ },
1713
+ "iv": {
1714
+ "name": "iv",
1715
+ "type": "blob",
1716
+ "primaryKey": false,
1717
+ "notNull": false,
1718
+ "autoincrement": false
1719
+ },
1720
+ "tag": {
1721
+ "name": "tag",
1722
+ "type": "blob",
1723
+ "primaryKey": false,
1724
+ "notNull": false,
1725
+ "autoincrement": false
1726
+ },
1727
+ "key_id": {
1728
+ "name": "key_id",
1729
+ "type": "text",
1730
+ "primaryKey": false,
1731
+ "notNull": false,
1732
+ "autoincrement": false
1733
+ },
1734
+ "updated_at": {
1735
+ "name": "updated_at",
1736
+ "type": "text",
1737
+ "primaryKey": false,
1738
+ "notNull": true,
1739
+ "autoincrement": false
1740
+ },
1741
+ "updated_by": {
1742
+ "name": "updated_by",
1743
+ "type": "text",
1744
+ "primaryKey": false,
1745
+ "notNull": false,
1746
+ "autoincrement": false
1747
+ }
1748
+ },
1749
+ "indexes": {},
1750
+ "foreignKeys": {},
1751
+ "compositePrimaryKeys": {
1752
+ "settings_slot_path_pk": {
1753
+ "columns": [
1754
+ "slot",
1755
+ "path"
1756
+ ],
1757
+ "name": "settings_slot_path_pk"
1758
+ }
1759
+ },
1760
+ "uniqueConstraints": {},
1761
+ "checkConstraints": {
1762
+ "settings_one_value": {
1763
+ "name": "settings_one_value",
1764
+ "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))"
1765
+ }
1766
+ }
1767
+ },
1768
+ "stock_adjustments": {
1769
+ "name": "stock_adjustments",
1770
+ "columns": {
1771
+ "id": {
1772
+ "name": "id",
1773
+ "type": "text",
1774
+ "primaryKey": true,
1775
+ "notNull": true,
1776
+ "autoincrement": false
1777
+ },
1778
+ "variant_id": {
1779
+ "name": "variant_id",
1780
+ "type": "text",
1781
+ "primaryKey": false,
1782
+ "notNull": true,
1783
+ "autoincrement": false
1784
+ },
1785
+ "adjustment": {
1786
+ "name": "adjustment",
1787
+ "type": "integer",
1788
+ "primaryKey": false,
1789
+ "notNull": true,
1790
+ "autoincrement": false
1791
+ },
1792
+ "reason": {
1793
+ "name": "reason",
1794
+ "type": "text",
1795
+ "primaryKey": false,
1796
+ "notNull": true,
1797
+ "autoincrement": false
1798
+ },
1799
+ "actor": {
1800
+ "name": "actor",
1801
+ "type": "text",
1802
+ "primaryKey": false,
1803
+ "notNull": true,
1804
+ "autoincrement": false
1805
+ },
1806
+ "previous_qty": {
1807
+ "name": "previous_qty",
1808
+ "type": "integer",
1809
+ "primaryKey": false,
1810
+ "notNull": true,
1811
+ "autoincrement": false
1812
+ },
1813
+ "new_qty": {
1814
+ "name": "new_qty",
1815
+ "type": "integer",
1816
+ "primaryKey": false,
1817
+ "notNull": true,
1818
+ "autoincrement": false
1819
+ },
1820
+ "timestamp": {
1821
+ "name": "timestamp",
1822
+ "type": "text",
1823
+ "primaryKey": false,
1824
+ "notNull": true,
1825
+ "autoincrement": false
1826
+ }
1827
+ },
1828
+ "indexes": {
1829
+ "stock_adjustments_variant_idx": {
1830
+ "name": "stock_adjustments_variant_idx",
1831
+ "columns": [
1832
+ "variant_id"
1833
+ ],
1834
+ "isUnique": false
1835
+ }
1836
+ },
1837
+ "foreignKeys": {},
1838
+ "compositePrimaryKeys": {},
1839
+ "uniqueConstraints": {},
1840
+ "checkConstraints": {}
1841
+ },
1842
+ "variants": {
1843
+ "name": "variants",
1844
+ "columns": {
1845
+ "id": {
1846
+ "name": "id",
1847
+ "type": "text",
1848
+ "primaryKey": true,
1849
+ "notNull": true,
1850
+ "autoincrement": false
1851
+ },
1852
+ "product_id": {
1853
+ "name": "product_id",
1854
+ "type": "text",
1855
+ "primaryKey": false,
1856
+ "notNull": true,
1857
+ "autoincrement": false
1858
+ },
1859
+ "sku": {
1860
+ "name": "sku",
1861
+ "type": "text",
1862
+ "primaryKey": false,
1863
+ "notNull": true,
1864
+ "autoincrement": false
1865
+ },
1866
+ "name": {
1867
+ "name": "name",
1868
+ "type": "text",
1869
+ "primaryKey": false,
1870
+ "notNull": true,
1871
+ "autoincrement": false,
1872
+ "default": "''"
1873
+ },
1874
+ "price_minor": {
1875
+ "name": "price_minor",
1876
+ "type": "integer",
1877
+ "primaryKey": false,
1878
+ "notNull": true,
1879
+ "autoincrement": false
1880
+ },
1881
+ "compare_at_price_minor": {
1882
+ "name": "compare_at_price_minor",
1883
+ "type": "integer",
1884
+ "primaryKey": false,
1885
+ "notNull": false,
1886
+ "autoincrement": false
1887
+ },
1888
+ "weight_grams": {
1889
+ "name": "weight_grams",
1890
+ "type": "integer",
1891
+ "primaryKey": false,
1892
+ "notNull": false,
1893
+ "autoincrement": false
1894
+ },
1895
+ "dimensions": {
1896
+ "name": "dimensions",
1897
+ "type": "text",
1898
+ "primaryKey": false,
1899
+ "notNull": false,
1900
+ "autoincrement": false
1901
+ },
1902
+ "stock": {
1903
+ "name": "stock",
1904
+ "type": "integer",
1905
+ "primaryKey": false,
1906
+ "notNull": true,
1907
+ "autoincrement": false,
1908
+ "default": 0
1909
+ },
1910
+ "low_stock_threshold": {
1911
+ "name": "low_stock_threshold",
1912
+ "type": "integer",
1913
+ "primaryKey": false,
1914
+ "notNull": true,
1915
+ "autoincrement": false,
1916
+ "default": 0
1917
+ },
1918
+ "options": {
1919
+ "name": "options",
1920
+ "type": "text",
1921
+ "primaryKey": false,
1922
+ "notNull": true,
1923
+ "autoincrement": false,
1924
+ "default": "'[]'"
1925
+ },
1926
+ "status": {
1927
+ "name": "status",
1928
+ "type": "text",
1929
+ "primaryKey": false,
1930
+ "notNull": true,
1931
+ "autoincrement": false,
1932
+ "default": "'active'"
1933
+ },
1934
+ "created_at": {
1935
+ "name": "created_at",
1936
+ "type": "text",
1937
+ "primaryKey": false,
1938
+ "notNull": true,
1939
+ "autoincrement": false
1940
+ },
1941
+ "updated_at": {
1942
+ "name": "updated_at",
1943
+ "type": "text",
1944
+ "primaryKey": false,
1945
+ "notNull": true,
1946
+ "autoincrement": false
1947
+ }
1948
+ },
1949
+ "indexes": {
1950
+ "variants_sku_unique": {
1951
+ "name": "variants_sku_unique",
1952
+ "columns": [
1953
+ "sku"
1954
+ ],
1955
+ "isUnique": true
1956
+ },
1957
+ "variants_product_idx": {
1958
+ "name": "variants_product_idx",
1959
+ "columns": [
1960
+ "product_id"
1961
+ ],
1962
+ "isUnique": false
1963
+ }
1964
+ },
1965
+ "foreignKeys": {},
1966
+ "compositePrimaryKeys": {},
1967
+ "uniqueConstraints": {},
1968
+ "checkConstraints": {}
1969
+ }
1970
+ },
1971
+ "views": {},
1972
+ "enums": {},
1973
+ "_meta": {
1974
+ "schemas": {},
1975
+ "tables": {},
1976
+ "columns": {}
1977
+ },
1978
+ "internal": {
1979
+ "indexes": {}
1980
+ }
1981
+ }