Raw
1 {
2 "namespaces": ["public"],
3 "name": "public",
4 "tables": [
5 {
6 "columns": {
7 "id": {
8 "name": "id",
9 "type": "text",
10 "unsigned": false,
11 "autoincrement": false,
12 "primary": false,
13 "nullable": false,
14 "mappedType": "text"
15 },
16 "customer_id": {
17 "name": "customer_id",
18 "type": "text",
19 "unsigned": false,
20 "autoincrement": false,
21 "primary": false,
22 "nullable": true,
23 "mappedType": "text"
24 },
25 "company": {
26 "name": "company",
27 "type": "text",
28 "unsigned": false,
29 "autoincrement": false,
30 "primary": false,
31 "nullable": true,
32 "mappedType": "text"
33 },
34 "first_name": {
35 "name": "first_name",
36 "type": "text",
37 "unsigned": false,
38 "autoincrement": false,
39 "primary": false,
40 "nullable": true,
41 "mappedType": "text"
42 },
43 "last_name": {
44 "name": "last_name",
45 "type": "text",
46 "unsigned": false,
47 "autoincrement": false,
48 "primary": false,
49 "nullable": true,
50 "mappedType": "text"
51 },
52 "address_1": {
53 "name": "address_1",
54 "type": "text",
55 "unsigned": false,
56 "autoincrement": false,
57 "primary": false,
58 "nullable": true,
59 "mappedType": "text"
60 },
61 "address_2": {
62 "name": "address_2",
63 "type": "text",
64 "unsigned": false,
65 "autoincrement": false,
66 "primary": false,
67 "nullable": true,
68 "mappedType": "text"
69 },
70 "city": {
71 "name": "city",
72 "type": "text",
73 "unsigned": false,
74 "autoincrement": false,
75 "primary": false,
76 "nullable": true,
77 "mappedType": "text"
78 },
79 "country_code": {
80 "name": "country_code",
81 "type": "text",
82 "unsigned": false,
83 "autoincrement": false,
84 "primary": false,
85 "nullable": true,
86 "mappedType": "text"
87 },
88 "province": {
89 "name": "province",
90 "type": "text",
91 "unsigned": false,
92 "autoincrement": false,
93 "primary": false,
94 "nullable": true,
95 "mappedType": "text"
96 },
97 "postal_code": {
98 "name": "postal_code",
99 "type": "text",
100 "unsigned": false,
101 "autoincrement": false,
102 "primary": false,
103 "nullable": true,
104 "mappedType": "text"
105 },
106 "phone": {
107 "name": "phone",
108 "type": "text",
109 "unsigned": false,
110 "autoincrement": false,
111 "primary": false,
112 "nullable": true,
113 "mappedType": "text"
114 },
115 "metadata": {
116 "name": "metadata",
117 "type": "jsonb",
118 "unsigned": false,
119 "autoincrement": false,
120 "primary": false,
121 "nullable": true,
122 "mappedType": "json"
123 },
124 "created_at": {
125 "name": "created_at",
126 "type": "timestamptz",
127 "unsigned": false,
128 "autoincrement": false,
129 "primary": false,
130 "nullable": false,
131 "length": 6,
132 "default": "now()",
133 "mappedType": "datetime"
134 },
135 "updated_at": {
136 "name": "updated_at",
137 "type": "timestamptz",
138 "unsigned": false,
139 "autoincrement": false,
140 "primary": false,
141 "nullable": false,
142 "length": 6,
143 "default": "now()",
144 "mappedType": "datetime"
145 },
146 "deleted_at": {
147 "name": "deleted_at",
148 "type": "timestamptz",
149 "unsigned": false,
150 "autoincrement": false,
151 "primary": false,
152 "nullable": true,
153 "length": 6,
154 "mappedType": "datetime"
155 }
156 },
157 "name": "order_address",
158 "schema": "public",
159 "indexes": [
160 {
161 "keyName": "IDX_order_address_deleted_at",
162 "columnNames": [],
163 "composite": false,
164 "constraint": false,
165 "primary": false,
166 "unique": false,
167 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_address_deleted_at\" ON \"order_address\" (\"deleted_at\") WHERE deleted_at IS NULL"
168 },
169 {
170 "keyName": "IDX_order_address_customer_id",
171 "columnNames": [],
172 "composite": false,
173 "constraint": false,
174 "primary": false,
175 "unique": false,
176 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_address_customer_id\" ON \"order_address\" (\"customer_id\") WHERE deleted_at IS NULL"
177 },
178 {
179 "keyName": "order_address_pkey",
180 "columnNames": ["id"],
181 "composite": false,
182 "constraint": true,
183 "primary": true,
184 "unique": true
185 }
186 ],
187 "checks": [],
188 "foreignKeys": {},
189 "nativeEnums": {}
190 },
191 {
192 "columns": {
193 "id": {
194 "name": "id",
195 "type": "text",
196 "unsigned": false,
197 "autoincrement": false,
198 "primary": false,
199 "nullable": false,
200 "mappedType": "text"
201 },
202 "display_id": {
203 "name": "display_id",
204 "type": "serial",
205 "unsigned": true,
206 "autoincrement": true,
207 "primary": false,
208 "nullable": false,
209 "mappedType": "integer"
210 },
211 "custom_display_id": {
212 "name": "custom_display_id",
213 "type": "text",
214 "unsigned": false,
215 "autoincrement": false,
216 "primary": false,
217 "nullable": true,
218 "mappedType": "text"
219 },
220 "region_id": {
221 "name": "region_id",
222 "type": "text",
223 "unsigned": false,
224 "autoincrement": false,
225 "primary": false,
226 "nullable": true,
227 "mappedType": "text"
228 },
229 "customer_id": {
230 "name": "customer_id",
231 "type": "text",
232 "unsigned": false,
233 "autoincrement": false,
234 "primary": false,
235 "nullable": true,
236 "mappedType": "text"
237 },
238 "version": {
239 "name": "version",
240 "type": "integer",
241 "unsigned": false,
242 "autoincrement": false,
243 "primary": false,
244 "nullable": false,
245 "default": "1",
246 "mappedType": "integer"
247 },
248 "sales_channel_id": {
249 "name": "sales_channel_id",
250 "type": "text",
251 "unsigned": false,
252 "autoincrement": false,
253 "primary": false,
254 "nullable": true,
255 "mappedType": "text"
256 },
257 "status": {
258 "name": "status",
259 "type": "text",
260 "unsigned": false,
261 "autoincrement": false,
262 "primary": false,
263 "nullable": false,
264 "default": "'pending'",
265 "enumItems": [
266 "pending",
267 "completed",
268 "draft",
269 "archived",
270 "canceled",
271 "requires_action"
272 ],
273 "mappedType": "enum"
274 },
275 "is_draft_order": {
276 "name": "is_draft_order",
277 "type": "boolean",
278 "unsigned": false,
279 "autoincrement": false,
280 "primary": false,
281 "nullable": false,
282 "default": "false",
283 "mappedType": "boolean"
284 },
285 "email": {
286 "name": "email",
287 "type": "text",
288 "unsigned": false,
289 "autoincrement": false,
290 "primary": false,
291 "nullable": true,
292 "mappedType": "text"
293 },
294 "currency_code": {
295 "name": "currency_code",
296 "type": "text",
297 "unsigned": false,
298 "autoincrement": false,
299 "primary": false,
300 "nullable": false,
301 "mappedType": "text"
302 },
303 "locale": {
304 "name": "locale",
305 "type": "text",
306 "unsigned": false,
307 "autoincrement": false,
308 "primary": false,
309 "nullable": true,
310 "mappedType": "text"
311 },
312 "no_notification": {
313 "name": "no_notification",
314 "type": "boolean",
315 "unsigned": false,
316 "autoincrement": false,
317 "primary": false,
318 "nullable": true,
319 "mappedType": "boolean"
320 },
321 "metadata": {
322 "name": "metadata",
323 "type": "jsonb",
324 "unsigned": false,
325 "autoincrement": false,
326 "primary": false,
327 "nullable": true,
328 "mappedType": "json"
329 },
330 "canceled_at": {
331 "name": "canceled_at",
332 "type": "timestamptz",
333 "unsigned": false,
334 "autoincrement": false,
335 "primary": false,
336 "nullable": true,
337 "length": 6,
338 "mappedType": "datetime"
339 },
340 "shipping_address_id": {
341 "name": "shipping_address_id",
342 "type": "text",
343 "unsigned": false,
344 "autoincrement": false,
345 "primary": false,
346 "nullable": true,
347 "mappedType": "text"
348 },
349 "billing_address_id": {
350 "name": "billing_address_id",
351 "type": "text",
352 "unsigned": false,
353 "autoincrement": false,
354 "primary": false,
355 "nullable": true,
356 "mappedType": "text"
357 },
358 "created_at": {
359 "name": "created_at",
360 "type": "timestamptz",
361 "unsigned": false,
362 "autoincrement": false,
363 "primary": false,
364 "nullable": false,
365 "length": 6,
366 "default": "now()",
367 "mappedType": "datetime"
368 },
369 "updated_at": {
370 "name": "updated_at",
371 "type": "timestamptz",
372 "unsigned": false,
373 "autoincrement": false,
374 "primary": false,
375 "nullable": false,
376 "length": 6,
377 "default": "now()",
378 "mappedType": "datetime"
379 },
380 "deleted_at": {
381 "name": "deleted_at",
382 "type": "timestamptz",
383 "unsigned": false,
384 "autoincrement": false,
385 "primary": false,
386 "nullable": true,
387 "length": 6,
388 "mappedType": "datetime"
389 }
390 },
391 "name": "order",
392 "schema": "public",
393 "indexes": [
394 {
395 "keyName": "IDX_order_deleted_at",
396 "columnNames": [],
397 "composite": false,
398 "constraint": false,
399 "primary": false,
400 "unique": false,
401 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_deleted_at\" ON \"order\" (\"deleted_at\") WHERE deleted_at IS NULL"
402 },
403 {
404 "keyName": "IDX_order_display_id",
405 "columnNames": [],
406 "composite": false,
407 "constraint": false,
408 "primary": false,
409 "unique": false,
410 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_display_id\" ON \"order\" (\"display_id\") WHERE deleted_at IS NULL"
411 },
412 {
413 "keyName": "IDX_order_custom_display_id",
414 "columnNames": [],
415 "composite": false,
416 "constraint": false,
417 "primary": false,
418 "unique": false,
419 "expression": "CREATE UNIQUE INDEX IF NOT EXISTS \"IDX_order_custom_display_id\" ON \"order\" (\"custom_display_id\") WHERE deleted_at IS NULL"
420 },
421 {
422 "keyName": "IDX_order_region_id",
423 "columnNames": [],
424 "composite": false,
425 "constraint": false,
426 "primary": false,
427 "unique": false,
428 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_region_id\" ON \"order\" (\"region_id\") WHERE deleted_at IS NULL"
429 },
430 {
431 "keyName": "IDX_order_customer_id",
432 "columnNames": [],
433 "composite": false,
434 "constraint": false,
435 "primary": false,
436 "unique": false,
437 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_customer_id\" ON \"order\" (\"customer_id\") WHERE deleted_at IS NULL"
438 },
439 {
440 "keyName": "IDX_order_sales_channel_id",
441 "columnNames": [],
442 "composite": false,
443 "constraint": false,
444 "primary": false,
445 "unique": false,
446 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_sales_channel_id\" ON \"order\" (\"sales_channel_id\") WHERE deleted_at IS NULL"
447 },
448 {
449 "keyName": "IDX_order_deleted_at",
450 "columnNames": [],
451 "composite": false,
452 "constraint": false,
453 "primary": false,
454 "unique": false,
455 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_deleted_at\" ON \"order\" (\"deleted_at\") WHERE deleted_at IS NOT NULL"
456 },
457 {
458 "keyName": "IDX_order_currency_code",
459 "columnNames": [],
460 "composite": false,
461 "constraint": false,
462 "primary": false,
463 "unique": false,
464 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_currency_code\" ON \"order\" (\"currency_code\") WHERE deleted_at IS NULL"
465 },
466 {
467 "keyName": "IDX_order_shipping_address_id",
468 "columnNames": [],
469 "composite": false,
470 "constraint": false,
471 "primary": false,
472 "unique": false,
473 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_shipping_address_id\" ON \"order\" (\"shipping_address_id\") WHERE deleted_at IS NULL"
474 },
475 {
476 "keyName": "IDX_order_billing_address_id",
477 "columnNames": [],
478 "composite": false,
479 "constraint": false,
480 "primary": false,
481 "unique": false,
482 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_billing_address_id\" ON \"order\" (\"billing_address_id\") WHERE deleted_at IS NULL"
483 },
484 {
485 "keyName": "IDX_order_is_draft_order",
486 "columnNames": [],
487 "composite": false,
488 "constraint": false,
489 "primary": false,
490 "unique": false,
491 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_is_draft_order\" ON \"order\" (\"is_draft_order\") WHERE deleted_at IS NULL"
492 },
493 {
494 "keyName": "order_pkey",
495 "columnNames": ["id"],
496 "composite": false,
497 "constraint": true,
498 "primary": true,
499 "unique": true
500 }
501 ],
502 "checks": [],
503 "foreignKeys": {
504 "order_shipping_address_id_foreign": {
505 "constraintName": "order_shipping_address_id_foreign",
506 "columnNames": ["shipping_address_id"],
507 "localTableName": "public.order",
508 "referencedColumnNames": ["id"],
509 "referencedTableName": "public.order_address",
510 "deleteRule": "set null",
511 "updateRule": "cascade"
512 },
513 "order_billing_address_id_foreign": {
514 "constraintName": "order_billing_address_id_foreign",
515 "columnNames": ["billing_address_id"],
516 "localTableName": "public.order",
517 "referencedColumnNames": ["id"],
518 "referencedTableName": "public.order_address",
519 "deleteRule": "set null",
520 "updateRule": "cascade"
521 }
522 },
523 "nativeEnums": {}
524 },
525 {
526 "columns": {
527 "id": {
528 "name": "id",
529 "type": "text",
530 "unsigned": false,
531 "autoincrement": false,
532 "primary": false,
533 "nullable": false,
534 "mappedType": "text"
535 },
536 "return_id": {
537 "name": "return_id",
538 "type": "text",
539 "unsigned": false,
540 "autoincrement": false,
541 "primary": false,
542 "nullable": true,
543 "mappedType": "text"
544 },
545 "claim_id": {
546 "name": "claim_id",
547 "type": "text",
548 "unsigned": false,
549 "autoincrement": false,
550 "primary": false,
551 "nullable": true,
552 "mappedType": "text"
553 },
554 "exchange_id": {
555 "name": "exchange_id",
556 "type": "text",
557 "unsigned": false,
558 "autoincrement": false,
559 "primary": false,
560 "nullable": true,
561 "mappedType": "text"
562 },
563 "version": {
564 "name": "version",
565 "type": "integer",
566 "unsigned": false,
567 "autoincrement": false,
568 "primary": false,
569 "nullable": false,
570 "mappedType": "integer"
571 },
572 "change_type": {
573 "name": "change_type",
574 "type": "text",
575 "unsigned": false,
576 "autoincrement": false,
577 "primary": false,
578 "nullable": true,
579 "mappedType": "text"
580 },
581 "description": {
582 "name": "description",
583 "type": "text",
584 "unsigned": false,
585 "autoincrement": false,
586 "primary": false,
587 "nullable": true,
588 "mappedType": "text"
589 },
590 "status": {
591 "name": "status",
592 "type": "text",
593 "unsigned": false,
594 "autoincrement": false,
595 "primary": false,
596 "nullable": true,
597 "default": "'pending'",
598 "enumItems": [
599 "confirmed",
600 "declined",
601 "requested",
602 "pending",
603 "canceled"
604 ],
605 "mappedType": "enum"
606 },
607 "internal_note": {
608 "name": "internal_note",
609 "type": "text",
610 "unsigned": false,
611 "autoincrement": false,
612 "primary": false,
613 "nullable": true,
614 "mappedType": "text"
615 },
616 "created_by": {
617 "name": "created_by",
618 "type": "text",
619 "unsigned": false,
620 "autoincrement": false,
621 "primary": false,
622 "nullable": true,
623 "mappedType": "text"
624 },
625 "requested_by": {
626 "name": "requested_by",
627 "type": "text",
628 "unsigned": false,
629 "autoincrement": false,
630 "primary": false,
631 "nullable": true,
632 "mappedType": "text"
633 },
634 "requested_at": {
635 "name": "requested_at",
636 "type": "timestamptz",
637 "unsigned": false,
638 "autoincrement": false,
639 "primary": false,
640 "nullable": true,
641 "length": 6,
642 "mappedType": "datetime"
643 },
644 "confirmed_by": {
645 "name": "confirmed_by",
646 "type": "text",
647 "unsigned": false,
648 "autoincrement": false,
649 "primary": false,
650 "nullable": true,
651 "mappedType": "text"
652 },
653 "confirmed_at": {
654 "name": "confirmed_at",
655 "type": "timestamptz",
656 "unsigned": false,
657 "autoincrement": false,
658 "primary": false,
659 "nullable": true,
660 "length": 6,
661 "mappedType": "datetime"
662 },
663 "declined_by": {
664 "name": "declined_by",
665 "type": "text",
666 "unsigned": false,
667 "autoincrement": false,
668 "primary": false,
669 "nullable": true,
670 "mappedType": "text"
671 },
672 "declined_reason": {
673 "name": "declined_reason",
674 "type": "text",
675 "unsigned": false,
676 "autoincrement": false,
677 "primary": false,
678 "nullable": true,
679 "mappedType": "text"
680 },
681 "metadata": {
682 "name": "metadata",
683 "type": "jsonb",
684 "unsigned": false,
685 "autoincrement": false,
686 "primary": false,
687 "nullable": true,
688 "mappedType": "json"
689 },
690 "declined_at": {
691 "name": "declined_at",
692 "type": "timestamptz",
693 "unsigned": false,
694 "autoincrement": false,
695 "primary": false,
696 "nullable": true,
697 "length": 6,
698 "mappedType": "datetime"
699 },
700 "canceled_by": {
701 "name": "canceled_by",
702 "type": "text",
703 "unsigned": false,
704 "autoincrement": false,
705 "primary": false,
706 "nullable": true,
707 "mappedType": "text"
708 },
709 "canceled_at": {
710 "name": "canceled_at",
711 "type": "timestamptz",
712 "unsigned": false,
713 "autoincrement": false,
714 "primary": false,
715 "nullable": true,
716 "length": 6,
717 "mappedType": "datetime"
718 },
719 "carry_over_promotions": {
720 "name": "carry_over_promotions",
721 "type": "boolean",
722 "unsigned": false,
723 "autoincrement": false,
724 "primary": false,
725 "nullable": true,
726 "mappedType": "boolean"
727 },
728 "no_notification": {
729 "name": "no_notification",
730 "type": "boolean",
731 "unsigned": false,
732 "autoincrement": false,
733 "primary": false,
734 "nullable": true,
735 "mappedType": "boolean"
736 },
737 "order_id": {
738 "name": "order_id",
739 "type": "text",
740 "unsigned": false,
741 "autoincrement": false,
742 "primary": false,
743 "nullable": false,
744 "mappedType": "text"
745 },
746 "created_at": {
747 "name": "created_at",
748 "type": "timestamptz",
749 "unsigned": false,
750 "autoincrement": false,
751 "primary": false,
752 "nullable": false,
753 "length": 6,
754 "default": "now()",
755 "mappedType": "datetime"
756 },
757 "updated_at": {
758 "name": "updated_at",
759 "type": "timestamptz",
760 "unsigned": false,
761 "autoincrement": false,
762 "primary": false,
763 "nullable": false,
764 "length": 6,
765 "default": "now()",
766 "mappedType": "datetime"
767 },
768 "deleted_at": {
769 "name": "deleted_at",
770 "type": "timestamptz",
771 "unsigned": false,
772 "autoincrement": false,
773 "primary": false,
774 "nullable": true,
775 "length": 6,
776 "mappedType": "datetime"
777 }
778 },
779 "name": "order_change",
780 "schema": "public",
781 "indexes": [
782 {
783 "keyName": "IDX_order_change_order_id",
784 "columnNames": [],
785 "composite": false,
786 "constraint": false,
787 "primary": false,
788 "unique": false,
789 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_change_order_id\" ON \"order_change\" (\"order_id\") WHERE deleted_at IS NULL"
790 },
791 {
792 "keyName": "IDX_order_change_deleted_at",
793 "columnNames": [],
794 "composite": false,
795 "constraint": false,
796 "primary": false,
797 "unique": false,
798 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_change_deleted_at\" ON \"order_change\" (\"deleted_at\") WHERE deleted_at IS NULL"
799 },
800 {
801 "keyName": "IDX_order_change_return_id",
802 "columnNames": [],
803 "composite": false,
804 "constraint": false,
805 "primary": false,
806 "unique": false,
807 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_change_return_id\" ON \"order_change\" (\"return_id\") WHERE return_id IS NOT NULL AND deleted_at IS NULL"
808 },
809 {
810 "keyName": "IDX_order_change_claim_id",
811 "columnNames": [],
812 "composite": false,
813 "constraint": false,
814 "primary": false,
815 "unique": false,
816 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_change_claim_id\" ON \"order_change\" (\"claim_id\") WHERE claim_id IS NOT NULL AND deleted_at IS NULL"
817 },
818 {
819 "keyName": "IDX_order_change_exchange_id",
820 "columnNames": [],
821 "composite": false,
822 "constraint": false,
823 "primary": false,
824 "unique": false,
825 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_change_exchange_id\" ON \"order_change\" (\"exchange_id\") WHERE exchange_id IS NOT NULL AND deleted_at IS NULL"
826 },
827 {
828 "keyName": "IDX_order_change_status",
829 "columnNames": [],
830 "composite": false,
831 "constraint": false,
832 "primary": false,
833 "unique": false,
834 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_change_status\" ON \"order_change\" (\"status\") WHERE deleted_at IS NULL"
835 },
836 {
837 "keyName": "IDX_order_change_deleted_at",
838 "columnNames": [],
839 "composite": false,
840 "constraint": false,
841 "primary": false,
842 "unique": false,
843 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_change_deleted_at\" ON \"order_change\" (\"deleted_at\") WHERE deleted_at IS NOT NULL"
844 },
845 {
846 "keyName": "IDX_order_change_version",
847 "columnNames": [],
848 "composite": false,
849 "constraint": false,
850 "primary": false,
851 "unique": false,
852 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_change_version\" ON \"order_change\" (\"order_id\", \"version\") WHERE deleted_at IS NULL"
853 },
854 {
855 "keyName": "order_change_pkey",
856 "columnNames": ["id"],
857 "composite": false,
858 "constraint": true,
859 "primary": true,
860 "unique": true
861 }
862 ],
863 "checks": [],
864 "foreignKeys": {
865 "order_change_order_id_foreign": {
866 "constraintName": "order_change_order_id_foreign",
867 "columnNames": ["order_id"],
868 "localTableName": "public.order_change",
869 "referencedColumnNames": ["id"],
870 "referencedTableName": "public.order",
871 "updateRule": "cascade"
872 }
873 },
874 "nativeEnums": {}
875 },
876 {
877 "columns": {
878 "id": {
879 "name": "id",
880 "type": "text",
881 "unsigned": false,
882 "autoincrement": false,
883 "primary": false,
884 "nullable": false,
885 "mappedType": "text"
886 },
887 "order_id": {
888 "name": "order_id",
889 "type": "text",
890 "unsigned": false,
891 "autoincrement": false,
892 "primary": false,
893 "nullable": false,
894 "mappedType": "text"
895 },
896 "return_id": {
897 "name": "return_id",
898 "type": "text",
899 "unsigned": false,
900 "autoincrement": false,
901 "primary": false,
902 "nullable": true,
903 "mappedType": "text"
904 },
905 "claim_id": {
906 "name": "claim_id",
907 "type": "text",
908 "unsigned": false,
909 "autoincrement": false,
910 "primary": false,
911 "nullable": true,
912 "mappedType": "text"
913 },
914 "exchange_id": {
915 "name": "exchange_id",
916 "type": "text",
917 "unsigned": false,
918 "autoincrement": false,
919 "primary": false,
920 "nullable": true,
921 "mappedType": "text"
922 },
923 "ordering": {
924 "name": "ordering",
925 "type": "serial",
926 "unsigned": true,
927 "autoincrement": true,
928 "primary": false,
929 "nullable": false,
930 "mappedType": "integer"
931 },
932 "version": {
933 "name": "version",
934 "type": "integer",
935 "unsigned": false,
936 "autoincrement": false,
937 "primary": false,
938 "nullable": true,
939 "mappedType": "integer"
940 },
941 "reference": {
942 "name": "reference",
943 "type": "text",
944 "unsigned": false,
945 "autoincrement": false,
946 "primary": false,
947 "nullable": true,
948 "mappedType": "text"
949 },
950 "reference_id": {
951 "name": "reference_id",
952 "type": "text",
953 "unsigned": false,
954 "autoincrement": false,
955 "primary": false,
956 "nullable": true,
957 "mappedType": "text"
958 },
959 "action": {
960 "name": "action",
961 "type": "text",
962 "unsigned": false,
963 "autoincrement": false,
964 "primary": false,
965 "nullable": false,
966 "mappedType": "text"
967 },
968 "details": {
969 "name": "details",
970 "type": "jsonb",
971 "unsigned": false,
972 "autoincrement": false,
973 "primary": false,
974 "nullable": false,
975 "default": "'{}'",
976 "mappedType": "json"
977 },
978 "amount": {
979 "name": "amount",
980 "type": "numeric",
981 "unsigned": false,
982 "autoincrement": false,
983 "primary": false,
984 "nullable": true,
985 "mappedType": "decimal"
986 },
987 "internal_note": {
988 "name": "internal_note",
989 "type": "text",
990 "unsigned": false,
991 "autoincrement": false,
992 "primary": false,
993 "nullable": true,
994 "mappedType": "text"
995 },
996 "applied": {
997 "name": "applied",
998 "type": "boolean",
999 "unsigned": false,
1000 "autoincrement": false,
1001 "primary": false,
1002 "nullable": false,
1003 "default": "false",
1004 "mappedType": "boolean"
1005 },
1006 "order_change_id": {
1007 "name": "order_change_id",
1008 "type": "text",
1009 "unsigned": false,
1010 "autoincrement": false,
1011 "primary": false,
1012 "nullable": true,
1013 "mappedType": "text"
1014 },
1015 "raw_amount": {
1016 "name": "raw_amount",
1017 "type": "jsonb",
1018 "unsigned": false,
1019 "autoincrement": false,
1020 "primary": false,
1021 "nullable": true,
1022 "mappedType": "json"
1023 },
1024 "created_at": {
1025 "name": "created_at",
1026 "type": "timestamptz",
1027 "unsigned": false,
1028 "autoincrement": false,
1029 "primary": false,
1030 "nullable": false,
1031 "length": 6,
1032 "default": "now()",
1033 "mappedType": "datetime"
1034 },
1035 "updated_at": {
1036 "name": "updated_at",
1037 "type": "timestamptz",
1038 "unsigned": false,
1039 "autoincrement": false,
1040 "primary": false,
1041 "nullable": false,
1042 "length": 6,
1043 "default": "now()",
1044 "mappedType": "datetime"
1045 },
1046 "deleted_at": {
1047 "name": "deleted_at",
1048 "type": "timestamptz",
1049 "unsigned": false,
1050 "autoincrement": false,
1051 "primary": false,
1052 "nullable": true,
1053 "length": 6,
1054 "mappedType": "datetime"
1055 }
1056 },
1057 "name": "order_change_action",
1058 "schema": "public",
1059 "indexes": [
1060 {
1061 "keyName": "IDX_order_change_action_order_change_id",
1062 "columnNames": [],
1063 "composite": false,
1064 "constraint": false,
1065 "primary": false,
1066 "unique": false,
1067 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_change_action_order_change_id\" ON \"order_change_action\" (\"order_change_id\") WHERE deleted_at IS NULL"
1068 },
1069 {
1070 "keyName": "IDX_order_change_action_deleted_at",
1071 "columnNames": [],
1072 "composite": false,
1073 "constraint": false,
1074 "primary": false,
1075 "unique": false,
1076 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_change_action_deleted_at\" ON \"order_change_action\" (\"deleted_at\") WHERE deleted_at IS NULL"
1077 },
1078 {
1079 "keyName": "IDX_order_change_action_order_id",
1080 "columnNames": [],
1081 "composite": false,
1082 "constraint": false,
1083 "primary": false,
1084 "unique": false,
1085 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_change_action_order_id\" ON \"order_change_action\" (\"order_id\") WHERE deleted_at IS NULL"
1086 },
1087 {
1088 "keyName": "IDX_order_change_action_return_id",
1089 "columnNames": [],
1090 "composite": false,
1091 "constraint": false,
1092 "primary": false,
1093 "unique": false,
1094 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_change_action_return_id\" ON \"order_change_action\" (\"return_id\") WHERE return_id IS NOT NULL AND deleted_at IS NULL"
1095 },
1096 {
1097 "keyName": "IDX_order_change_action_claim_id",
1098 "columnNames": [],
1099 "composite": false,
1100 "constraint": false,
1101 "primary": false,
1102 "unique": false,
1103 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_change_action_claim_id\" ON \"order_change_action\" (\"claim_id\") WHERE claim_id IS NOT NULL AND deleted_at IS NULL"
1104 },
1105 {
1106 "keyName": "IDX_order_change_action_exchange_id",
1107 "columnNames": [],
1108 "composite": false,
1109 "constraint": false,
1110 "primary": false,
1111 "unique": false,
1112 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_change_action_exchange_id\" ON \"order_change_action\" (\"exchange_id\") WHERE exchange_id IS NOT NULL AND deleted_at IS NULL"
1113 },
1114 {
1115 "keyName": "IDX_order_change_action_deleted_at",
1116 "columnNames": [],
1117 "composite": false,
1118 "constraint": false,
1119 "primary": false,
1120 "unique": false,
1121 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_change_action_deleted_at\" ON \"order_change_action\" (\"deleted_at\") WHERE deleted_at IS NOT NULL"
1122 },
1123 {
1124 "keyName": "IDX_order_change_action_ordering",
1125 "columnNames": [],
1126 "composite": false,
1127 "constraint": false,
1128 "primary": false,
1129 "unique": false,
1130 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_change_action_ordering\" ON \"order_change_action\" (\"ordering\") WHERE deleted_at IS NULL"
1131 },
1132 {
1133 "keyName": "order_change_action_pkey",
1134 "columnNames": ["id"],
1135 "composite": false,
1136 "constraint": true,
1137 "primary": true,
1138 "unique": true
1139 }
1140 ],
1141 "checks": [],
1142 "foreignKeys": {
1143 "order_change_action_order_change_id_foreign": {
1144 "constraintName": "order_change_action_order_change_id_foreign",
1145 "columnNames": ["order_change_id"],
1146 "localTableName": "public.order_change_action",
1147 "referencedColumnNames": ["id"],
1148 "referencedTableName": "public.order_change",
1149 "deleteRule": "cascade",
1150 "updateRule": "cascade"
1151 }
1152 },
1153 "nativeEnums": {}
1154 },
1155 {
1156 "columns": {
1157 "id": {
1158 "name": "id",
1159 "type": "text",
1160 "unsigned": false,
1161 "autoincrement": false,
1162 "primary": false,
1163 "nullable": false,
1164 "mappedType": "text"
1165 },
1166 "version": {
1167 "name": "version",
1168 "type": "integer",
1169 "unsigned": false,
1170 "autoincrement": false,
1171 "primary": false,
1172 "nullable": false,
1173 "default": "1",
1174 "mappedType": "integer"
1175 },
1176 "reference": {
1177 "name": "reference",
1178 "type": "text",
1179 "unsigned": false,
1180 "autoincrement": false,
1181 "primary": false,
1182 "nullable": true,
1183 "mappedType": "text"
1184 },
1185 "reference_id": {
1186 "name": "reference_id",
1187 "type": "text",
1188 "unsigned": false,
1189 "autoincrement": false,
1190 "primary": false,
1191 "nullable": true,
1192 "mappedType": "text"
1193 },
1194 "amount": {
1195 "name": "amount",
1196 "type": "numeric",
1197 "unsigned": false,
1198 "autoincrement": false,
1199 "primary": false,
1200 "nullable": false,
1201 "mappedType": "decimal"
1202 },
1203 "raw_amount": {
1204 "name": "raw_amount",
1205 "type": "jsonb",
1206 "unsigned": false,
1207 "autoincrement": false,
1208 "primary": false,
1209 "nullable": false,
1210 "mappedType": "json"
1211 },
1212 "metadata": {
1213 "name": "metadata",
1214 "type": "jsonb",
1215 "unsigned": false,
1216 "autoincrement": false,
1217 "primary": false,
1218 "nullable": true,
1219 "mappedType": "json"
1220 },
1221 "order_id": {
1222 "name": "order_id",
1223 "type": "text",
1224 "unsigned": false,
1225 "autoincrement": false,
1226 "primary": false,
1227 "nullable": false,
1228 "mappedType": "text"
1229 },
1230 "created_at": {
1231 "name": "created_at",
1232 "type": "timestamptz",
1233 "unsigned": false,
1234 "autoincrement": false,
1235 "primary": false,
1236 "nullable": false,
1237 "length": 6,
1238 "default": "now()",
1239 "mappedType": "datetime"
1240 },
1241 "updated_at": {
1242 "name": "updated_at",
1243 "type": "timestamptz",
1244 "unsigned": false,
1245 "autoincrement": false,
1246 "primary": false,
1247 "nullable": false,
1248 "length": 6,
1249 "default": "now()",
1250 "mappedType": "datetime"
1251 },
1252 "deleted_at": {
1253 "name": "deleted_at",
1254 "type": "timestamptz",
1255 "unsigned": false,
1256 "autoincrement": false,
1257 "primary": false,
1258 "nullable": true,
1259 "length": 6,
1260 "mappedType": "datetime"
1261 }
1262 },
1263 "name": "order_credit_line",
1264 "schema": "public",
1265 "indexes": [
1266 {
1267 "keyName": "IDX_order_credit_line_order_id",
1268 "columnNames": [],
1269 "composite": false,
1270 "constraint": false,
1271 "primary": false,
1272 "unique": false,
1273 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_credit_line_order_id\" ON \"order_credit_line\" (\"order_id\") WHERE deleted_at IS NULL"
1274 },
1275 {
1276 "keyName": "IDX_order_credit_line_deleted_at",
1277 "columnNames": [],
1278 "composite": false,
1279 "constraint": false,
1280 "primary": false,
1281 "unique": false,
1282 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_credit_line_deleted_at\" ON \"order_credit_line\" (\"deleted_at\") WHERE deleted_at IS NULL"
1283 },
1284 {
1285 "keyName": "IDX_order_credit_line_order_id_version",
1286 "columnNames": [],
1287 "composite": false,
1288 "constraint": false,
1289 "primary": false,
1290 "unique": false,
1291 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_credit_line_order_id_version\" ON \"order_credit_line\" (\"order_id\", \"version\") WHERE deleted_at IS NULL"
1292 },
1293 {
1294 "keyName": "IDX_order_credit_line_deleted_at",
1295 "columnNames": [],
1296 "composite": false,
1297 "constraint": false,
1298 "primary": false,
1299 "unique": false,
1300 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_credit_line_deleted_at\" ON \"order_credit_line\" (\"deleted_at\") WHERE deleted_at IS NOT NULL"
1301 },
1302 {
1303 "keyName": "order_credit_line_pkey",
1304 "columnNames": ["id"],
1305 "composite": false,
1306 "constraint": true,
1307 "primary": true,
1308 "unique": true
1309 }
1310 ],
1311 "checks": [],
1312 "foreignKeys": {
1313 "order_credit_line_order_id_foreign": {
1314 "constraintName": "order_credit_line_order_id_foreign",
1315 "columnNames": ["order_id"],
1316 "localTableName": "public.order_credit_line",
1317 "referencedColumnNames": ["id"],
1318 "referencedTableName": "public.order",
1319 "deleteRule": "cascade",
1320 "updateRule": "cascade"
1321 }
1322 },
1323 "nativeEnums": {}
1324 },
1325 {
1326 "columns": {
1327 "id": {
1328 "name": "id",
1329 "type": "text",
1330 "unsigned": false,
1331 "autoincrement": false,
1332 "primary": false,
1333 "nullable": false,
1334 "mappedType": "text"
1335 },
1336 "title": {
1337 "name": "title",
1338 "type": "text",
1339 "unsigned": false,
1340 "autoincrement": false,
1341 "primary": false,
1342 "nullable": false,
1343 "mappedType": "text"
1344 },
1345 "subtitle": {
1346 "name": "subtitle",
1347 "type": "text",
1348 "unsigned": false,
1349 "autoincrement": false,
1350 "primary": false,
1351 "nullable": true,
1352 "mappedType": "text"
1353 },
1354 "thumbnail": {
1355 "name": "thumbnail",
1356 "type": "text",
1357 "unsigned": false,
1358 "autoincrement": false,
1359 "primary": false,
1360 "nullable": true,
1361 "mappedType": "text"
1362 },
1363 "variant_id": {
1364 "name": "variant_id",
1365 "type": "text",
1366 "unsigned": false,
1367 "autoincrement": false,
1368 "primary": false,
1369 "nullable": true,
1370 "mappedType": "text"
1371 },
1372 "product_id": {
1373 "name": "product_id",
1374 "type": "text",
1375 "unsigned": false,
1376 "autoincrement": false,
1377 "primary": false,
1378 "nullable": true,
1379 "mappedType": "text"
1380 },
1381 "product_title": {
1382 "name": "product_title",
1383 "type": "text",
1384 "unsigned": false,
1385 "autoincrement": false,
1386 "primary": false,
1387 "nullable": true,
1388 "mappedType": "text"
1389 },
1390 "product_description": {
1391 "name": "product_description",
1392 "type": "text",
1393 "unsigned": false,
1394 "autoincrement": false,
1395 "primary": false,
1396 "nullable": true,
1397 "mappedType": "text"
1398 },
1399 "product_subtitle": {
1400 "name": "product_subtitle",
1401 "type": "text",
1402 "unsigned": false,
1403 "autoincrement": false,
1404 "primary": false,
1405 "nullable": true,
1406 "mappedType": "text"
1407 },
1408 "product_type": {
1409 "name": "product_type",
1410 "type": "text",
1411 "unsigned": false,
1412 "autoincrement": false,
1413 "primary": false,
1414 "nullable": true,
1415 "mappedType": "text"
1416 },
1417 "product_type_id": {
1418 "name": "product_type_id",
1419 "type": "text",
1420 "unsigned": false,
1421 "autoincrement": false,
1422 "primary": false,
1423 "nullable": true,
1424 "mappedType": "text"
1425 },
1426 "product_collection": {
1427 "name": "product_collection",
1428 "type": "text",
1429 "unsigned": false,
1430 "autoincrement": false,
1431 "primary": false,
1432 "nullable": true,
1433 "mappedType": "text"
1434 },
1435 "product_handle": {
1436 "name": "product_handle",
1437 "type": "text",
1438 "unsigned": false,
1439 "autoincrement": false,
1440 "primary": false,
1441 "nullable": true,
1442 "mappedType": "text"
1443 },
1444 "variant_sku": {
1445 "name": "variant_sku",
1446 "type": "text",
1447 "unsigned": false,
1448 "autoincrement": false,
1449 "primary": false,
1450 "nullable": true,
1451 "mappedType": "text"
1452 },
1453 "variant_barcode": {
1454 "name": "variant_barcode",
1455 "type": "text",
1456 "unsigned": false,
1457 "autoincrement": false,
1458 "primary": false,
1459 "nullable": true,
1460 "mappedType": "text"
1461 },
1462 "variant_title": {
1463 "name": "variant_title",
1464 "type": "text",
1465 "unsigned": false,
1466 "autoincrement": false,
1467 "primary": false,
1468 "nullable": true,
1469 "mappedType": "text"
1470 },
1471 "variant_option_values": {
1472 "name": "variant_option_values",
1473 "type": "jsonb",
1474 "unsigned": false,
1475 "autoincrement": false,
1476 "primary": false,
1477 "nullable": true,
1478 "mappedType": "json"
1479 },
1480 "requires_shipping": {
1481 "name": "requires_shipping",
1482 "type": "boolean",
1483 "unsigned": false,
1484 "autoincrement": false,
1485 "primary": false,
1486 "nullable": false,
1487 "default": "true",
1488 "mappedType": "boolean"
1489 },
1490 "is_giftcard": {
1491 "name": "is_giftcard",
1492 "type": "boolean",
1493 "unsigned": false,
1494 "autoincrement": false,
1495 "primary": false,
1496 "nullable": false,
1497 "default": "false",
1498 "mappedType": "boolean"
1499 },
1500 "is_discountable": {
1501 "name": "is_discountable",
1502 "type": "boolean",
1503 "unsigned": false,
1504 "autoincrement": false,
1505 "primary": false,
1506 "nullable": false,
1507 "default": "true",
1508 "mappedType": "boolean"
1509 },
1510 "is_tax_inclusive": {
1511 "name": "is_tax_inclusive",
1512 "type": "boolean",
1513 "unsigned": false,
1514 "autoincrement": false,
1515 "primary": false,
1516 "nullable": false,
1517 "default": "false",
1518 "mappedType": "boolean"
1519 },
1520 "compare_at_unit_price": {
1521 "name": "compare_at_unit_price",
1522 "type": "numeric",
1523 "unsigned": false,
1524 "autoincrement": false,
1525 "primary": false,
1526 "nullable": true,
1527 "mappedType": "decimal"
1528 },
1529 "unit_price": {
1530 "name": "unit_price",
1531 "type": "numeric",
1532 "unsigned": false,
1533 "autoincrement": false,
1534 "primary": false,
1535 "nullable": true,
1536 "mappedType": "decimal"
1537 },
1538 "is_custom_price": {
1539 "name": "is_custom_price",
1540 "type": "boolean",
1541 "unsigned": false,
1542 "autoincrement": false,
1543 "primary": false,
1544 "nullable": false,
1545 "default": "false",
1546 "mappedType": "boolean"
1547 },
1548 "metadata": {
1549 "name": "metadata",
1550 "type": "jsonb",
1551 "unsigned": false,
1552 "autoincrement": false,
1553 "primary": false,
1554 "nullable": true,
1555 "mappedType": "json"
1556 },
1557 "raw_compare_at_unit_price": {
1558 "name": "raw_compare_at_unit_price",
1559 "type": "jsonb",
1560 "unsigned": false,
1561 "autoincrement": false,
1562 "primary": false,
1563 "nullable": true,
1564 "mappedType": "json"
1565 },
1566 "raw_unit_price": {
1567 "name": "raw_unit_price",
1568 "type": "jsonb",
1569 "unsigned": false,
1570 "autoincrement": false,
1571 "primary": false,
1572 "nullable": true,
1573 "mappedType": "json"
1574 },
1575 "created_at": {
1576 "name": "created_at",
1577 "type": "timestamptz",
1578 "unsigned": false,
1579 "autoincrement": false,
1580 "primary": false,
1581 "nullable": false,
1582 "length": 6,
1583 "default": "now()",
1584 "mappedType": "datetime"
1585 },
1586 "updated_at": {
1587 "name": "updated_at",
1588 "type": "timestamptz",
1589 "unsigned": false,
1590 "autoincrement": false,
1591 "primary": false,
1592 "nullable": false,
1593 "length": 6,
1594 "default": "now()",
1595 "mappedType": "datetime"
1596 },
1597 "deleted_at": {
1598 "name": "deleted_at",
1599 "type": "timestamptz",
1600 "unsigned": false,
1601 "autoincrement": false,
1602 "primary": false,
1603 "nullable": true,
1604 "length": 6,
1605 "mappedType": "datetime"
1606 }
1607 },
1608 "name": "order_line_item",
1609 "schema": "public",
1610 "indexes": [
1611 {
1612 "keyName": "IDX_order_line_item_deleted_at",
1613 "columnNames": [],
1614 "composite": false,
1615 "constraint": false,
1616 "primary": false,
1617 "unique": false,
1618 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_line_item_deleted_at\" ON \"order_line_item\" (\"deleted_at\") WHERE deleted_at IS NULL"
1619 },
1620 {
1621 "keyName": "IDX_order_line_item_deleted_at",
1622 "columnNames": [],
1623 "composite": false,
1624 "constraint": false,
1625 "primary": false,
1626 "unique": false,
1627 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_line_item_deleted_at\" ON \"order_line_item\" (\"deleted_at\") WHERE deleted_at IS NOT NULL"
1628 },
1629 {
1630 "keyName": "IDX_order_line_item_product_id",
1631 "columnNames": [],
1632 "composite": false,
1633 "constraint": false,
1634 "primary": false,
1635 "unique": false,
1636 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_line_item_product_id\" ON \"order_line_item\" (\"product_id\") WHERE deleted_at IS NULL"
1637 },
1638 {
1639 "keyName": "IDX_line_item_product_type_id",
1640 "columnNames": [],
1641 "composite": false,
1642 "constraint": false,
1643 "primary": false,
1644 "unique": false,
1645 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_line_item_product_type_id\" ON \"order_line_item\" (\"product_type_id\") WHERE deleted_at IS NULL AND product_type_id IS NOT NULL"
1646 },
1647 {
1648 "keyName": "IDX_order_line_item_variant_id",
1649 "columnNames": [],
1650 "composite": false,
1651 "constraint": false,
1652 "primary": false,
1653 "unique": false,
1654 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_line_item_variant_id\" ON \"order_line_item\" (\"variant_id\") WHERE deleted_at IS NULL"
1655 },
1656 {
1657 "keyName": "order_line_item_pkey",
1658 "columnNames": ["id"],
1659 "composite": false,
1660 "constraint": true,
1661 "primary": true,
1662 "unique": true
1663 }
1664 ],
1665 "checks": [],
1666 "foreignKeys": {},
1667 "nativeEnums": {}
1668 },
1669 {
1670 "columns": {
1671 "id": {
1672 "name": "id",
1673 "type": "text",
1674 "unsigned": false,
1675 "autoincrement": false,
1676 "primary": false,
1677 "nullable": false,
1678 "mappedType": "text"
1679 },
1680 "version": {
1681 "name": "version",
1682 "type": "integer",
1683 "unsigned": false,
1684 "autoincrement": false,
1685 "primary": false,
1686 "nullable": false,
1687 "default": "1",
1688 "mappedType": "integer"
1689 },
1690 "unit_price": {
1691 "name": "unit_price",
1692 "type": "numeric",
1693 "unsigned": false,
1694 "autoincrement": false,
1695 "primary": false,
1696 "nullable": true,
1697 "mappedType": "decimal"
1698 },
1699 "compare_at_unit_price": {
1700 "name": "compare_at_unit_price",
1701 "type": "numeric",
1702 "unsigned": false,
1703 "autoincrement": false,
1704 "primary": false,
1705 "nullable": true,
1706 "mappedType": "decimal"
1707 },
1708 "quantity": {
1709 "name": "quantity",
1710 "type": "numeric",
1711 "unsigned": false,
1712 "autoincrement": false,
1713 "primary": false,
1714 "nullable": false,
1715 "mappedType": "decimal"
1716 },
1717 "fulfilled_quantity": {
1718 "name": "fulfilled_quantity",
1719 "type": "numeric",
1720 "unsigned": false,
1721 "autoincrement": false,
1722 "primary": false,
1723 "nullable": false,
1724 "default": "0",
1725 "mappedType": "decimal"
1726 },
1727 "delivered_quantity": {
1728 "name": "delivered_quantity",
1729 "type": "numeric",
1730 "unsigned": false,
1731 "autoincrement": false,
1732 "primary": false,
1733 "nullable": false,
1734 "default": "0",
1735 "mappedType": "decimal"
1736 },
1737 "shipped_quantity": {
1738 "name": "shipped_quantity",
1739 "type": "numeric",
1740 "unsigned": false,
1741 "autoincrement": false,
1742 "primary": false,
1743 "nullable": false,
1744 "default": "0",
1745 "mappedType": "decimal"
1746 },
1747 "return_requested_quantity": {
1748 "name": "return_requested_quantity",
1749 "type": "numeric",
1750 "unsigned": false,
1751 "autoincrement": false,
1752 "primary": false,
1753 "nullable": false,
1754 "default": "0",
1755 "mappedType": "decimal"
1756 },
1757 "return_received_quantity": {
1758 "name": "return_received_quantity",
1759 "type": "numeric",
1760 "unsigned": false,
1761 "autoincrement": false,
1762 "primary": false,
1763 "nullable": false,
1764 "default": "0",
1765 "mappedType": "decimal"
1766 },
1767 "return_dismissed_quantity": {
1768 "name": "return_dismissed_quantity",
1769 "type": "numeric",
1770 "unsigned": false,
1771 "autoincrement": false,
1772 "primary": false,
1773 "nullable": false,
1774 "default": "0",
1775 "mappedType": "decimal"
1776 },
1777 "written_off_quantity": {
1778 "name": "written_off_quantity",
1779 "type": "numeric",
1780 "unsigned": false,
1781 "autoincrement": false,
1782 "primary": false,
1783 "nullable": false,
1784 "default": "0",
1785 "mappedType": "decimal"
1786 },
1787 "metadata": {
1788 "name": "metadata",
1789 "type": "jsonb",
1790 "unsigned": false,
1791 "autoincrement": false,
1792 "primary": false,
1793 "nullable": true,
1794 "mappedType": "json"
1795 },
1796 "order_id": {
1797 "name": "order_id",
1798 "type": "text",
1799 "unsigned": false,
1800 "autoincrement": false,
1801 "primary": false,
1802 "nullable": false,
1803 "mappedType": "text"
1804 },
1805 "item_id": {
1806 "name": "item_id",
1807 "type": "text",
1808 "unsigned": false,
1809 "autoincrement": false,
1810 "primary": false,
1811 "nullable": false,
1812 "mappedType": "text"
1813 },
1814 "raw_unit_price": {
1815 "name": "raw_unit_price",
1816 "type": "jsonb",
1817 "unsigned": false,
1818 "autoincrement": false,
1819 "primary": false,
1820 "nullable": true,
1821 "mappedType": "json"
1822 },
1823 "raw_compare_at_unit_price": {
1824 "name": "raw_compare_at_unit_price",
1825 "type": "jsonb",
1826 "unsigned": false,
1827 "autoincrement": false,
1828 "primary": false,
1829 "nullable": true,
1830 "mappedType": "json"
1831 },
1832 "raw_quantity": {
1833 "name": "raw_quantity",
1834 "type": "jsonb",
1835 "unsigned": false,
1836 "autoincrement": false,
1837 "primary": false,
1838 "nullable": false,
1839 "mappedType": "json"
1840 },
1841 "raw_fulfilled_quantity": {
1842 "name": "raw_fulfilled_quantity",
1843 "type": "jsonb",
1844 "unsigned": false,
1845 "autoincrement": false,
1846 "primary": false,
1847 "nullable": false,
1848 "default": "'{\"value\":\"0\",\"precision\":20}'",
1849 "mappedType": "json"
1850 },
1851 "raw_delivered_quantity": {
1852 "name": "raw_delivered_quantity",
1853 "type": "jsonb",
1854 "unsigned": false,
1855 "autoincrement": false,
1856 "primary": false,
1857 "nullable": false,
1858 "default": "'{\"value\":\"0\",\"precision\":20}'",
1859 "mappedType": "json"
1860 },
1861 "raw_shipped_quantity": {
1862 "name": "raw_shipped_quantity",
1863 "type": "jsonb",
1864 "unsigned": false,
1865 "autoincrement": false,
1866 "primary": false,
1867 "nullable": false,
1868 "default": "'{\"value\":\"0\",\"precision\":20}'",
1869 "mappedType": "json"
1870 },
1871 "raw_return_requested_quantity": {
1872 "name": "raw_return_requested_quantity",
1873 "type": "jsonb",
1874 "unsigned": false,
1875 "autoincrement": false,
1876 "primary": false,
1877 "nullable": false,
1878 "default": "'{\"value\":\"0\",\"precision\":20}'",
1879 "mappedType": "json"
1880 },
1881 "raw_return_received_quantity": {
1882 "name": "raw_return_received_quantity",
1883 "type": "jsonb",
1884 "unsigned": false,
1885 "autoincrement": false,
1886 "primary": false,
1887 "nullable": false,
1888 "default": "'{\"value\":\"0\",\"precision\":20}'",
1889 "mappedType": "json"
1890 },
1891 "raw_return_dismissed_quantity": {
1892 "name": "raw_return_dismissed_quantity",
1893 "type": "jsonb",
1894 "unsigned": false,
1895 "autoincrement": false,
1896 "primary": false,
1897 "nullable": false,
1898 "default": "'{\"value\":\"0\",\"precision\":20}'",
1899 "mappedType": "json"
1900 },
1901 "raw_written_off_quantity": {
1902 "name": "raw_written_off_quantity",
1903 "type": "jsonb",
1904 "unsigned": false,
1905 "autoincrement": false,
1906 "primary": false,
1907 "nullable": false,
1908 "default": "'{\"value\":\"0\",\"precision\":20}'",
1909 "mappedType": "json"
1910 },
1911 "created_at": {
1912 "name": "created_at",
1913 "type": "timestamptz",
1914 "unsigned": false,
1915 "autoincrement": false,
1916 "primary": false,
1917 "nullable": false,
1918 "length": 6,
1919 "default": "now()",
1920 "mappedType": "datetime"
1921 },
1922 "updated_at": {
1923 "name": "updated_at",
1924 "type": "timestamptz",
1925 "unsigned": false,
1926 "autoincrement": false,
1927 "primary": false,
1928 "nullable": false,
1929 "length": 6,
1930 "default": "now()",
1931 "mappedType": "datetime"
1932 },
1933 "deleted_at": {
1934 "name": "deleted_at",
1935 "type": "timestamptz",
1936 "unsigned": false,
1937 "autoincrement": false,
1938 "primary": false,
1939 "nullable": true,
1940 "length": 6,
1941 "mappedType": "datetime"
1942 }
1943 },
1944 "name": "order_item",
1945 "schema": "public",
1946 "indexes": [
1947 {
1948 "keyName": "IDX_order_item_order_id",
1949 "columnNames": [],
1950 "composite": false,
1951 "constraint": false,
1952 "primary": false,
1953 "unique": false,
1954 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_item_order_id\" ON \"order_item\" (\"order_id\") WHERE deleted_at IS NULL"
1955 },
1956 {
1957 "keyName": "IDX_order_item_deleted_at",
1958 "columnNames": [],
1959 "composite": false,
1960 "constraint": false,
1961 "primary": false,
1962 "unique": false,
1963 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_item_deleted_at\" ON \"order_item\" (\"deleted_at\") WHERE deleted_at IS NULL"
1964 },
1965 {
1966 "keyName": "IDX_order_item_order_id_version",
1967 "columnNames": [],
1968 "composite": false,
1969 "constraint": false,
1970 "primary": false,
1971 "unique": false,
1972 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_item_order_id_version\" ON \"order_item\" (\"order_id\", \"version\") WHERE deleted_at IS NULL"
1973 },
1974 {
1975 "keyName": "IDX_order_item_item_id",
1976 "columnNames": [],
1977 "composite": false,
1978 "constraint": false,
1979 "primary": false,
1980 "unique": false,
1981 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_item_item_id\" ON \"order_item\" (\"item_id\") WHERE deleted_at IS NULL"
1982 },
1983 {
1984 "keyName": "IDX_order_item_deleted_at",
1985 "columnNames": [],
1986 "composite": false,
1987 "constraint": false,
1988 "primary": false,
1989 "unique": false,
1990 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_item_deleted_at\" ON \"order_item\" (\"deleted_at\") WHERE deleted_at IS NOT NULL"
1991 },
1992 {
1993 "keyName": "order_item_pkey",
1994 "columnNames": ["id"],
1995 "composite": false,
1996 "constraint": true,
1997 "primary": true,
1998 "unique": true
1999 }
2000 ],
2001 "checks": [],
2002 "foreignKeys": {
2003 "order_item_order_id_foreign": {
2004 "constraintName": "order_item_order_id_foreign",
2005 "columnNames": ["order_id"],
2006 "localTableName": "public.order_item",
2007 "referencedColumnNames": ["id"],
2008 "referencedTableName": "public.order",
2009 "deleteRule": "cascade",
2010 "updateRule": "cascade"
2011 },
2012 "order_item_item_id_foreign": {
2013 "constraintName": "order_item_item_id_foreign",
2014 "columnNames": ["item_id"],
2015 "localTableName": "public.order_item",
2016 "referencedColumnNames": ["id"],
2017 "referencedTableName": "public.order_line_item",
2018 "updateRule": "cascade"
2019 }
2020 },
2021 "nativeEnums": {}
2022 },
2023 {
2024 "columns": {
2025 "id": {
2026 "name": "id",
2027 "type": "text",
2028 "unsigned": false,
2029 "autoincrement": false,
2030 "primary": false,
2031 "nullable": false,
2032 "mappedType": "text"
2033 },
2034 "version": {
2035 "name": "version",
2036 "type": "integer",
2037 "unsigned": false,
2038 "autoincrement": false,
2039 "primary": false,
2040 "nullable": false,
2041 "default": "1",
2042 "mappedType": "integer"
2043 },
2044 "description": {
2045 "name": "description",
2046 "type": "text",
2047 "unsigned": false,
2048 "autoincrement": false,
2049 "primary": false,
2050 "nullable": true,
2051 "mappedType": "text"
2052 },
2053 "promotion_id": {
2054 "name": "promotion_id",
2055 "type": "text",
2056 "unsigned": false,
2057 "autoincrement": false,
2058 "primary": false,
2059 "nullable": true,
2060 "mappedType": "text"
2061 },
2062 "code": {
2063 "name": "code",
2064 "type": "text",
2065 "unsigned": false,
2066 "autoincrement": false,
2067 "primary": false,
2068 "nullable": true,
2069 "mappedType": "text"
2070 },
2071 "amount": {
2072 "name": "amount",
2073 "type": "numeric",
2074 "unsigned": false,
2075 "autoincrement": false,
2076 "primary": false,
2077 "nullable": false,
2078 "mappedType": "decimal"
2079 },
2080 "provider_id": {
2081 "name": "provider_id",
2082 "type": "text",
2083 "unsigned": false,
2084 "autoincrement": false,
2085 "primary": false,
2086 "nullable": true,
2087 "mappedType": "text"
2088 },
2089 "is_tax_inclusive": {
2090 "name": "is_tax_inclusive",
2091 "type": "boolean",
2092 "unsigned": false,
2093 "autoincrement": false,
2094 "primary": false,
2095 "nullable": false,
2096 "default": "false",
2097 "mappedType": "boolean"
2098 },
2099 "item_id": {
2100 "name": "item_id",
2101 "type": "text",
2102 "unsigned": false,
2103 "autoincrement": false,
2104 "primary": false,
2105 "nullable": false,
2106 "mappedType": "text"
2107 },
2108 "raw_amount": {
2109 "name": "raw_amount",
2110 "type": "jsonb",
2111 "unsigned": false,
2112 "autoincrement": false,
2113 "primary": false,
2114 "nullable": false,
2115 "mappedType": "json"
2116 },
2117 "created_at": {
2118 "name": "created_at",
2119 "type": "timestamptz",
2120 "unsigned": false,
2121 "autoincrement": false,
2122 "primary": false,
2123 "nullable": false,
2124 "length": 6,
2125 "default": "now()",
2126 "mappedType": "datetime"
2127 },
2128 "updated_at": {
2129 "name": "updated_at",
2130 "type": "timestamptz",
2131 "unsigned": false,
2132 "autoincrement": false,
2133 "primary": false,
2134 "nullable": false,
2135 "length": 6,
2136 "default": "now()",
2137 "mappedType": "datetime"
2138 },
2139 "deleted_at": {
2140 "name": "deleted_at",
2141 "type": "timestamptz",
2142 "unsigned": false,
2143 "autoincrement": false,
2144 "primary": false,
2145 "nullable": true,
2146 "length": 6,
2147 "mappedType": "datetime"
2148 }
2149 },
2150 "name": "order_line_item_adjustment",
2151 "schema": "public",
2152 "indexes": [
2153 {
2154 "keyName": "IDX_order_line_item_adjustment_item_id",
2155 "columnNames": [],
2156 "composite": false,
2157 "constraint": false,
2158 "primary": false,
2159 "unique": false,
2160 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_line_item_adjustment_item_id\" ON \"order_line_item_adjustment\" (\"item_id\") WHERE deleted_at IS NULL"
2161 },
2162 {
2163 "keyName": "IDX_order_line_item_adjustment_deleted_at",
2164 "columnNames": [],
2165 "composite": false,
2166 "constraint": false,
2167 "primary": false,
2168 "unique": false,
2169 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_line_item_adjustment_deleted_at\" ON \"order_line_item_adjustment\" (\"deleted_at\") WHERE deleted_at IS NULL"
2170 },
2171 {
2172 "keyName": "IDX_order_order_line_item_adjustment_item_id",
2173 "columnNames": [],
2174 "composite": false,
2175 "constraint": false,
2176 "primary": false,
2177 "unique": false,
2178 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_order_line_item_adjustment_item_id\" ON \"order_line_item_adjustment\" (\"item_id\") WHERE deleted_at IS NULL"
2179 },
2180 {
2181 "keyName": "order_line_item_adjustment_pkey",
2182 "columnNames": ["id"],
2183 "composite": false,
2184 "constraint": true,
2185 "primary": true,
2186 "unique": true
2187 }
2188 ],
2189 "checks": [],
2190 "foreignKeys": {
2191 "order_line_item_adjustment_item_id_foreign": {
2192 "constraintName": "order_line_item_adjustment_item_id_foreign",
2193 "columnNames": ["item_id"],
2194 "localTableName": "public.order_line_item_adjustment",
2195 "referencedColumnNames": ["id"],
2196 "referencedTableName": "public.order_line_item",
2197 "deleteRule": "cascade",
2198 "updateRule": "cascade"
2199 }
2200 },
2201 "nativeEnums": {}
2202 },
2203 {
2204 "columns": {
2205 "id": {
2206 "name": "id",
2207 "type": "text",
2208 "unsigned": false,
2209 "autoincrement": false,
2210 "primary": false,
2211 "nullable": false,
2212 "mappedType": "text"
2213 },
2214 "description": {
2215 "name": "description",
2216 "type": "text",
2217 "unsigned": false,
2218 "autoincrement": false,
2219 "primary": false,
2220 "nullable": true,
2221 "mappedType": "text"
2222 },
2223 "tax_rate_id": {
2224 "name": "tax_rate_id",
2225 "type": "text",
2226 "unsigned": false,
2227 "autoincrement": false,
2228 "primary": false,
2229 "nullable": true,
2230 "mappedType": "text"
2231 },
2232 "code": {
2233 "name": "code",
2234 "type": "text",
2235 "unsigned": false,
2236 "autoincrement": false,
2237 "primary": false,
2238 "nullable": false,
2239 "mappedType": "text"
2240 },
2241 "rate": {
2242 "name": "rate",
2243 "type": "numeric",
2244 "unsigned": false,
2245 "autoincrement": false,
2246 "primary": false,
2247 "nullable": false,
2248 "mappedType": "decimal"
2249 },
2250 "provider_id": {
2251 "name": "provider_id",
2252 "type": "text",
2253 "unsigned": false,
2254 "autoincrement": false,
2255 "primary": false,
2256 "nullable": true,
2257 "mappedType": "text"
2258 },
2259 "item_id": {
2260 "name": "item_id",
2261 "type": "text",
2262 "unsigned": false,
2263 "autoincrement": false,
2264 "primary": false,
2265 "nullable": false,
2266 "mappedType": "text"
2267 },
2268 "raw_rate": {
2269 "name": "raw_rate",
2270 "type": "jsonb",
2271 "unsigned": false,
2272 "autoincrement": false,
2273 "primary": false,
2274 "nullable": false,
2275 "mappedType": "json"
2276 },
2277 "created_at": {
2278 "name": "created_at",
2279 "type": "timestamptz",
2280 "unsigned": false,
2281 "autoincrement": false,
2282 "primary": false,
2283 "nullable": false,
2284 "length": 6,
2285 "default": "now()",
2286 "mappedType": "datetime"
2287 },
2288 "updated_at": {
2289 "name": "updated_at",
2290 "type": "timestamptz",
2291 "unsigned": false,
2292 "autoincrement": false,
2293 "primary": false,
2294 "nullable": false,
2295 "length": 6,
2296 "default": "now()",
2297 "mappedType": "datetime"
2298 },
2299 "deleted_at": {
2300 "name": "deleted_at",
2301 "type": "timestamptz",
2302 "unsigned": false,
2303 "autoincrement": false,
2304 "primary": false,
2305 "nullable": true,
2306 "length": 6,
2307 "mappedType": "datetime"
2308 }
2309 },
2310 "name": "order_line_item_tax_line",
2311 "schema": "public",
2312 "indexes": [
2313 {
2314 "keyName": "IDX_order_line_item_tax_line_item_id",
2315 "columnNames": [],
2316 "composite": false,
2317 "constraint": false,
2318 "primary": false,
2319 "unique": false,
2320 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_line_item_tax_line_item_id\" ON \"order_line_item_tax_line\" (\"item_id\") WHERE deleted_at IS NULL"
2321 },
2322 {
2323 "keyName": "IDX_order_line_item_tax_line_deleted_at",
2324 "columnNames": [],
2325 "composite": false,
2326 "constraint": false,
2327 "primary": false,
2328 "unique": false,
2329 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_line_item_tax_line_deleted_at\" ON \"order_line_item_tax_line\" (\"deleted_at\") WHERE deleted_at IS NULL"
2330 },
2331 {
2332 "keyName": "order_line_item_tax_line_pkey",
2333 "columnNames": ["id"],
2334 "composite": false,
2335 "constraint": true,
2336 "primary": true,
2337 "unique": true
2338 }
2339 ],
2340 "checks": [],
2341 "foreignKeys": {
2342 "order_line_item_tax_line_item_id_foreign": {
2343 "constraintName": "order_line_item_tax_line_item_id_foreign",
2344 "columnNames": ["item_id"],
2345 "localTableName": "public.order_line_item_tax_line",
2346 "referencedColumnNames": ["id"],
2347 "referencedTableName": "public.order_line_item",
2348 "deleteRule": "cascade",
2349 "updateRule": "cascade"
2350 }
2351 },
2352 "nativeEnums": {}
2353 },
2354 {
2355 "columns": {
2356 "id": {
2357 "name": "id",
2358 "type": "text",
2359 "unsigned": false,
2360 "autoincrement": false,
2361 "primary": false,
2362 "nullable": false,
2363 "mappedType": "text"
2364 },
2365 "name": {
2366 "name": "name",
2367 "type": "text",
2368 "unsigned": false,
2369 "autoincrement": false,
2370 "primary": false,
2371 "nullable": false,
2372 "mappedType": "text"
2373 },
2374 "description": {
2375 "name": "description",
2376 "type": "jsonb",
2377 "unsigned": false,
2378 "autoincrement": false,
2379 "primary": false,
2380 "nullable": true,
2381 "mappedType": "json"
2382 },
2383 "amount": {
2384 "name": "amount",
2385 "type": "numeric",
2386 "unsigned": false,
2387 "autoincrement": false,
2388 "primary": false,
2389 "nullable": false,
2390 "mappedType": "decimal"
2391 },
2392 "is_tax_inclusive": {
2393 "name": "is_tax_inclusive",
2394 "type": "boolean",
2395 "unsigned": false,
2396 "autoincrement": false,
2397 "primary": false,
2398 "nullable": false,
2399 "default": "false",
2400 "mappedType": "boolean"
2401 },
2402 "is_custom_amount": {
2403 "name": "is_custom_amount",
2404 "type": "boolean",
2405 "unsigned": false,
2406 "autoincrement": false,
2407 "primary": false,
2408 "nullable": false,
2409 "default": "false",
2410 "mappedType": "boolean"
2411 },
2412 "shipping_option_id": {
2413 "name": "shipping_option_id",
2414 "type": "text",
2415 "unsigned": false,
2416 "autoincrement": false,
2417 "primary": false,
2418 "nullable": true,
2419 "mappedType": "text"
2420 },
2421 "data": {
2422 "name": "data",
2423 "type": "jsonb",
2424 "unsigned": false,
2425 "autoincrement": false,
2426 "primary": false,
2427 "nullable": true,
2428 "mappedType": "json"
2429 },
2430 "metadata": {
2431 "name": "metadata",
2432 "type": "jsonb",
2433 "unsigned": false,
2434 "autoincrement": false,
2435 "primary": false,
2436 "nullable": true,
2437 "mappedType": "json"
2438 },
2439 "raw_amount": {
2440 "name": "raw_amount",
2441 "type": "jsonb",
2442 "unsigned": false,
2443 "autoincrement": false,
2444 "primary": false,
2445 "nullable": false,
2446 "mappedType": "json"
2447 },
2448 "created_at": {
2449 "name": "created_at",
2450 "type": "timestamptz",
2451 "unsigned": false,
2452 "autoincrement": false,
2453 "primary": false,
2454 "nullable": false,
2455 "length": 6,
2456 "default": "now()",
2457 "mappedType": "datetime"
2458 },
2459 "updated_at": {
2460 "name": "updated_at",
2461 "type": "timestamptz",
2462 "unsigned": false,
2463 "autoincrement": false,
2464 "primary": false,
2465 "nullable": false,
2466 "length": 6,
2467 "default": "now()",
2468 "mappedType": "datetime"
2469 },
2470 "deleted_at": {
2471 "name": "deleted_at",
2472 "type": "timestamptz",
2473 "unsigned": false,
2474 "autoincrement": false,
2475 "primary": false,
2476 "nullable": true,
2477 "length": 6,
2478 "mappedType": "datetime"
2479 }
2480 },
2481 "name": "order_shipping_method",
2482 "schema": "public",
2483 "indexes": [
2484 {
2485 "keyName": "IDX_order_shipping_method_deleted_at",
2486 "columnNames": [],
2487 "composite": false,
2488 "constraint": false,
2489 "primary": false,
2490 "unique": false,
2491 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_shipping_method_deleted_at\" ON \"order_shipping_method\" (\"deleted_at\") WHERE deleted_at IS NULL"
2492 },
2493 {
2494 "keyName": "IDX_order_shipping_method_shipping_option_id",
2495 "columnNames": [],
2496 "composite": false,
2497 "constraint": false,
2498 "primary": false,
2499 "unique": false,
2500 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_shipping_method_shipping_option_id\" ON \"order_shipping_method\" (\"shipping_option_id\") WHERE deleted_at IS NULL"
2501 },
2502 {
2503 "keyName": "order_shipping_method_pkey",
2504 "columnNames": ["id"],
2505 "composite": false,
2506 "constraint": true,
2507 "primary": true,
2508 "unique": true
2509 }
2510 ],
2511 "checks": [],
2512 "foreignKeys": {},
2513 "nativeEnums": {}
2514 },
2515 {
2516 "columns": {
2517 "id": {
2518 "name": "id",
2519 "type": "text",
2520 "unsigned": false,
2521 "autoincrement": false,
2522 "primary": false,
2523 "nullable": false,
2524 "mappedType": "text"
2525 },
2526 "version": {
2527 "name": "version",
2528 "type": "integer",
2529 "unsigned": false,
2530 "autoincrement": false,
2531 "primary": false,
2532 "nullable": false,
2533 "default": "1",
2534 "mappedType": "integer"
2535 },
2536 "description": {
2537 "name": "description",
2538 "type": "text",
2539 "unsigned": false,
2540 "autoincrement": false,
2541 "primary": false,
2542 "nullable": true,
2543 "mappedType": "text"
2544 },
2545 "promotion_id": {
2546 "name": "promotion_id",
2547 "type": "text",
2548 "unsigned": false,
2549 "autoincrement": false,
2550 "primary": false,
2551 "nullable": true,
2552 "mappedType": "text"
2553 },
2554 "code": {
2555 "name": "code",
2556 "type": "text",
2557 "unsigned": false,
2558 "autoincrement": false,
2559 "primary": false,
2560 "nullable": true,
2561 "mappedType": "text"
2562 },
2563 "amount": {
2564 "name": "amount",
2565 "type": "numeric",
2566 "unsigned": false,
2567 "autoincrement": false,
2568 "primary": false,
2569 "nullable": false,
2570 "mappedType": "decimal"
2571 },
2572 "provider_id": {
2573 "name": "provider_id",
2574 "type": "text",
2575 "unsigned": false,
2576 "autoincrement": false,
2577 "primary": false,
2578 "nullable": true,
2579 "mappedType": "text"
2580 },
2581 "shipping_method_id": {
2582 "name": "shipping_method_id",
2583 "type": "text",
2584 "unsigned": false,
2585 "autoincrement": false,
2586 "primary": false,
2587 "nullable": false,
2588 "mappedType": "text"
2589 },
2590 "raw_amount": {
2591 "name": "raw_amount",
2592 "type": "jsonb",
2593 "unsigned": false,
2594 "autoincrement": false,
2595 "primary": false,
2596 "nullable": false,
2597 "mappedType": "json"
2598 },
2599 "created_at": {
2600 "name": "created_at",
2601 "type": "timestamptz",
2602 "unsigned": false,
2603 "autoincrement": false,
2604 "primary": false,
2605 "nullable": false,
2606 "length": 6,
2607 "default": "now()",
2608 "mappedType": "datetime"
2609 },
2610 "updated_at": {
2611 "name": "updated_at",
2612 "type": "timestamptz",
2613 "unsigned": false,
2614 "autoincrement": false,
2615 "primary": false,
2616 "nullable": false,
2617 "length": 6,
2618 "default": "now()",
2619 "mappedType": "datetime"
2620 },
2621 "deleted_at": {
2622 "name": "deleted_at",
2623 "type": "timestamptz",
2624 "unsigned": false,
2625 "autoincrement": false,
2626 "primary": false,
2627 "nullable": true,
2628 "length": 6,
2629 "mappedType": "datetime"
2630 }
2631 },
2632 "name": "order_shipping_method_adjustment",
2633 "schema": "public",
2634 "indexes": [
2635 {
2636 "keyName": "IDX_order_shipping_method_adjustment_shipping_method_id",
2637 "columnNames": [],
2638 "composite": false,
2639 "constraint": false,
2640 "primary": false,
2641 "unique": false,
2642 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_shipping_method_adjustment_shipping_method_id\" ON \"order_shipping_method_adjustment\" (\"shipping_method_id\") WHERE deleted_at IS NULL"
2643 },
2644 {
2645 "keyName": "IDX_order_shipping_method_adjustment_deleted_at",
2646 "columnNames": [],
2647 "composite": false,
2648 "constraint": false,
2649 "primary": false,
2650 "unique": false,
2651 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_shipping_method_adjustment_deleted_at\" ON \"order_shipping_method_adjustment\" (\"deleted_at\") WHERE deleted_at IS NULL"
2652 },
2653 {
2654 "keyName": "IDX_order_shipping_method_adjustment_version_shipping_method",
2655 "columnNames": [],
2656 "composite": false,
2657 "constraint": false,
2658 "primary": false,
2659 "unique": false,
2660 "expression": "CREATE UNIQUE INDEX IF NOT EXISTS \"IDX_order_shipping_method_adjustment_version_shipping_method\" ON \"order_shipping_method_adjustment\" (\"version\", \"shipping_method_id\") WHERE deleted_at IS NULL"
2661 },
2662 {
2663 "keyName": "order_shipping_method_adjustment_pkey",
2664 "columnNames": ["id"],
2665 "composite": false,
2666 "constraint": true,
2667 "primary": true,
2668 "unique": true
2669 }
2670 ],
2671 "checks": [],
2672 "foreignKeys": {
2673 "order_shipping_method_adjustment_shipping_method_id_foreign": {
2674 "constraintName": "order_shipping_method_adjustment_shipping_method_id_foreign",
2675 "columnNames": ["shipping_method_id"],
2676 "localTableName": "public.order_shipping_method_adjustment",
2677 "referencedColumnNames": ["id"],
2678 "referencedTableName": "public.order_shipping_method",
2679 "deleteRule": "cascade",
2680 "updateRule": "cascade"
2681 }
2682 },
2683 "nativeEnums": {}
2684 },
2685 {
2686 "columns": {
2687 "id": {
2688 "name": "id",
2689 "type": "text",
2690 "unsigned": false,
2691 "autoincrement": false,
2692 "primary": false,
2693 "nullable": false,
2694 "mappedType": "text"
2695 },
2696 "description": {
2697 "name": "description",
2698 "type": "text",
2699 "unsigned": false,
2700 "autoincrement": false,
2701 "primary": false,
2702 "nullable": true,
2703 "mappedType": "text"
2704 },
2705 "tax_rate_id": {
2706 "name": "tax_rate_id",
2707 "type": "text",
2708 "unsigned": false,
2709 "autoincrement": false,
2710 "primary": false,
2711 "nullable": true,
2712 "mappedType": "text"
2713 },
2714 "code": {
2715 "name": "code",
2716 "type": "text",
2717 "unsigned": false,
2718 "autoincrement": false,
2719 "primary": false,
2720 "nullable": false,
2721 "mappedType": "text"
2722 },
2723 "rate": {
2724 "name": "rate",
2725 "type": "numeric",
2726 "unsigned": false,
2727 "autoincrement": false,
2728 "primary": false,
2729 "nullable": false,
2730 "mappedType": "decimal"
2731 },
2732 "provider_id": {
2733 "name": "provider_id",
2734 "type": "text",
2735 "unsigned": false,
2736 "autoincrement": false,
2737 "primary": false,
2738 "nullable": true,
2739 "mappedType": "text"
2740 },
2741 "shipping_method_id": {
2742 "name": "shipping_method_id",
2743 "type": "text",
2744 "unsigned": false,
2745 "autoincrement": false,
2746 "primary": false,
2747 "nullable": false,
2748 "mappedType": "text"
2749 },
2750 "raw_rate": {
2751 "name": "raw_rate",
2752 "type": "jsonb",
2753 "unsigned": false,
2754 "autoincrement": false,
2755 "primary": false,
2756 "nullable": false,
2757 "mappedType": "json"
2758 },
2759 "created_at": {
2760 "name": "created_at",
2761 "type": "timestamptz",
2762 "unsigned": false,
2763 "autoincrement": false,
2764 "primary": false,
2765 "nullable": false,
2766 "length": 6,
2767 "default": "now()",
2768 "mappedType": "datetime"
2769 },
2770 "updated_at": {
2771 "name": "updated_at",
2772 "type": "timestamptz",
2773 "unsigned": false,
2774 "autoincrement": false,
2775 "primary": false,
2776 "nullable": false,
2777 "length": 6,
2778 "default": "now()",
2779 "mappedType": "datetime"
2780 },
2781 "deleted_at": {
2782 "name": "deleted_at",
2783 "type": "timestamptz",
2784 "unsigned": false,
2785 "autoincrement": false,
2786 "primary": false,
2787 "nullable": true,
2788 "length": 6,
2789 "mappedType": "datetime"
2790 }
2791 },
2792 "name": "order_shipping_method_tax_line",
2793 "schema": "public",
2794 "indexes": [
2795 {
2796 "keyName": "IDX_order_shipping_method_tax_line_shipping_method_id",
2797 "columnNames": [],
2798 "composite": false,
2799 "constraint": false,
2800 "primary": false,
2801 "unique": false,
2802 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_shipping_method_tax_line_shipping_method_id\" ON \"order_shipping_method_tax_line\" (\"shipping_method_id\") WHERE deleted_at IS NULL"
2803 },
2804 {
2805 "keyName": "IDX_order_shipping_method_tax_line_deleted_at",
2806 "columnNames": [],
2807 "composite": false,
2808 "constraint": false,
2809 "primary": false,
2810 "unique": false,
2811 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_shipping_method_tax_line_deleted_at\" ON \"order_shipping_method_tax_line\" (\"deleted_at\") WHERE deleted_at IS NULL"
2812 },
2813 {
2814 "keyName": "order_shipping_method_tax_line_pkey",
2815 "columnNames": ["id"],
2816 "composite": false,
2817 "constraint": true,
2818 "primary": true,
2819 "unique": true
2820 }
2821 ],
2822 "checks": [],
2823 "foreignKeys": {
2824 "order_shipping_method_tax_line_shipping_method_id_foreign": {
2825 "constraintName": "order_shipping_method_tax_line_shipping_method_id_foreign",
2826 "columnNames": ["shipping_method_id"],
2827 "localTableName": "public.order_shipping_method_tax_line",
2828 "referencedColumnNames": ["id"],
2829 "referencedTableName": "public.order_shipping_method",
2830 "deleteRule": "cascade",
2831 "updateRule": "cascade"
2832 }
2833 },
2834 "nativeEnums": {}
2835 },
2836 {
2837 "columns": {
2838 "id": {
2839 "name": "id",
2840 "type": "text",
2841 "unsigned": false,
2842 "autoincrement": false,
2843 "primary": false,
2844 "nullable": false,
2845 "mappedType": "text"
2846 },
2847 "version": {
2848 "name": "version",
2849 "type": "integer",
2850 "unsigned": false,
2851 "autoincrement": false,
2852 "primary": false,
2853 "nullable": false,
2854 "default": "1",
2855 "mappedType": "integer"
2856 },
2857 "totals": {
2858 "name": "totals",
2859 "type": "jsonb",
2860 "unsigned": false,
2861 "autoincrement": false,
2862 "primary": false,
2863 "nullable": false,
2864 "mappedType": "json"
2865 },
2866 "order_id": {
2867 "name": "order_id",
2868 "type": "text",
2869 "unsigned": false,
2870 "autoincrement": false,
2871 "primary": false,
2872 "nullable": false,
2873 "mappedType": "text"
2874 },
2875 "created_at": {
2876 "name": "created_at",
2877 "type": "timestamptz",
2878 "unsigned": false,
2879 "autoincrement": false,
2880 "primary": false,
2881 "nullable": false,
2882 "length": 6,
2883 "default": "now()",
2884 "mappedType": "datetime"
2885 },
2886 "updated_at": {
2887 "name": "updated_at",
2888 "type": "timestamptz",
2889 "unsigned": false,
2890 "autoincrement": false,
2891 "primary": false,
2892 "nullable": false,
2893 "length": 6,
2894 "default": "now()",
2895 "mappedType": "datetime"
2896 },
2897 "deleted_at": {
2898 "name": "deleted_at",
2899 "type": "timestamptz",
2900 "unsigned": false,
2901 "autoincrement": false,
2902 "primary": false,
2903 "nullable": true,
2904 "length": 6,
2905 "mappedType": "datetime"
2906 }
2907 },
2908 "name": "order_summary",
2909 "schema": "public",
2910 "indexes": [
2911 {
2912 "keyName": "IDX_order_summary_order_id",
2913 "columnNames": [],
2914 "composite": false,
2915 "constraint": false,
2916 "primary": false,
2917 "unique": false,
2918 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_summary_order_id\" ON \"order_summary\" (\"order_id\") WHERE deleted_at IS NULL"
2919 },
2920 {
2921 "keyName": "IDX_order_summary_deleted_at",
2922 "columnNames": [],
2923 "composite": false,
2924 "constraint": false,
2925 "primary": false,
2926 "unique": false,
2927 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_summary_deleted_at\" ON \"order_summary\" (\"deleted_at\") WHERE deleted_at IS NULL"
2928 },
2929 {
2930 "keyName": "IDX_order_summary_order_id_version",
2931 "columnNames": [],
2932 "composite": false,
2933 "constraint": false,
2934 "primary": false,
2935 "unique": false,
2936 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_summary_order_id_version\" ON \"order_summary\" (\"order_id\", \"version\") WHERE deleted_at IS NULL"
2937 },
2938 {
2939 "keyName": "IDX_order_summary_deleted_at",
2940 "columnNames": [],
2941 "composite": false,
2942 "constraint": false,
2943 "primary": false,
2944 "unique": false,
2945 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_summary_deleted_at\" ON \"order_summary\" (\"deleted_at\") WHERE deleted_at IS NOT NULL"
2946 },
2947 {
2948 "keyName": "order_summary_pkey",
2949 "columnNames": ["id"],
2950 "composite": false,
2951 "constraint": true,
2952 "primary": true,
2953 "unique": true
2954 }
2955 ],
2956 "checks": [],
2957 "foreignKeys": {
2958 "order_summary_order_id_foreign": {
2959 "constraintName": "order_summary_order_id_foreign",
2960 "columnNames": ["order_id"],
2961 "localTableName": "public.order_summary",
2962 "referencedColumnNames": ["id"],
2963 "referencedTableName": "public.order",
2964 "deleteRule": "cascade",
2965 "updateRule": "cascade"
2966 }
2967 },
2968 "nativeEnums": {}
2969 },
2970 {
2971 "columns": {
2972 "id": {
2973 "name": "id",
2974 "type": "text",
2975 "unsigned": false,
2976 "autoincrement": false,
2977 "primary": false,
2978 "nullable": false,
2979 "mappedType": "text"
2980 },
2981 "order_version": {
2982 "name": "order_version",
2983 "type": "integer",
2984 "unsigned": false,
2985 "autoincrement": false,
2986 "primary": false,
2987 "nullable": false,
2988 "mappedType": "integer"
2989 },
2990 "display_id": {
2991 "name": "display_id",
2992 "type": "serial",
2993 "unsigned": true,
2994 "autoincrement": true,
2995 "primary": false,
2996 "nullable": false,
2997 "mappedType": "integer"
2998 },
2999 "status": {
3000 "name": "status",
3001 "type": "text",
3002 "unsigned": false,
3003 "autoincrement": false,
3004 "primary": false,
3005 "nullable": false,
3006 "default": "'open'",
3007 "enumItems": [
3008 "open",
3009 "requested",
3010 "received",
3011 "partially_received",
3012 "canceled"
3013 ],
3014 "mappedType": "enum"
3015 },
3016 "location_id": {
3017 "name": "location_id",
3018 "type": "text",
3019 "unsigned": false,
3020 "autoincrement": false,
3021 "primary": false,
3022 "nullable": true,
3023 "mappedType": "text"
3024 },
3025 "no_notification": {
3026 "name": "no_notification",
3027 "type": "boolean",
3028 "unsigned": false,
3029 "autoincrement": false,
3030 "primary": false,
3031 "nullable": true,
3032 "mappedType": "boolean"
3033 },
3034 "refund_amount": {
3035 "name": "refund_amount",
3036 "type": "numeric",
3037 "unsigned": false,
3038 "autoincrement": false,
3039 "primary": false,
3040 "nullable": true,
3041 "mappedType": "decimal"
3042 },
3043 "created_by": {
3044 "name": "created_by",
3045 "type": "text",
3046 "unsigned": false,
3047 "autoincrement": false,
3048 "primary": false,
3049 "nullable": true,
3050 "mappedType": "text"
3051 },
3052 "metadata": {
3053 "name": "metadata",
3054 "type": "jsonb",
3055 "unsigned": false,
3056 "autoincrement": false,
3057 "primary": false,
3058 "nullable": true,
3059 "mappedType": "json"
3060 },
3061 "requested_at": {
3062 "name": "requested_at",
3063 "type": "timestamptz",
3064 "unsigned": false,
3065 "autoincrement": false,
3066 "primary": false,
3067 "nullable": true,
3068 "length": 6,
3069 "mappedType": "datetime"
3070 },
3071 "received_at": {
3072 "name": "received_at",
3073 "type": "timestamptz",
3074 "unsigned": false,
3075 "autoincrement": false,
3076 "primary": false,
3077 "nullable": true,
3078 "length": 6,
3079 "mappedType": "datetime"
3080 },
3081 "canceled_at": {
3082 "name": "canceled_at",
3083 "type": "timestamptz",
3084 "unsigned": false,
3085 "autoincrement": false,
3086 "primary": false,
3087 "nullable": true,
3088 "length": 6,
3089 "mappedType": "datetime"
3090 },
3091 "order_id": {
3092 "name": "order_id",
3093 "type": "text",
3094 "unsigned": false,
3095 "autoincrement": false,
3096 "primary": false,
3097 "nullable": false,
3098 "mappedType": "text"
3099 },
3100 "exchange_id": {
3101 "name": "exchange_id",
3102 "type": "text",
3103 "unsigned": false,
3104 "autoincrement": false,
3105 "primary": false,
3106 "nullable": true,
3107 "mappedType": "text"
3108 },
3109 "claim_id": {
3110 "name": "claim_id",
3111 "type": "text",
3112 "unsigned": false,
3113 "autoincrement": false,
3114 "primary": false,
3115 "nullable": true,
3116 "mappedType": "text"
3117 },
3118 "raw_refund_amount": {
3119 "name": "raw_refund_amount",
3120 "type": "jsonb",
3121 "unsigned": false,
3122 "autoincrement": false,
3123 "primary": false,
3124 "nullable": true,
3125 "mappedType": "json"
3126 },
3127 "created_at": {
3128 "name": "created_at",
3129 "type": "timestamptz",
3130 "unsigned": false,
3131 "autoincrement": false,
3132 "primary": false,
3133 "nullable": false,
3134 "length": 6,
3135 "default": "now()",
3136 "mappedType": "datetime"
3137 },
3138 "updated_at": {
3139 "name": "updated_at",
3140 "type": "timestamptz",
3141 "unsigned": false,
3142 "autoincrement": false,
3143 "primary": false,
3144 "nullable": false,
3145 "length": 6,
3146 "default": "now()",
3147 "mappedType": "datetime"
3148 },
3149 "deleted_at": {
3150 "name": "deleted_at",
3151 "type": "timestamptz",
3152 "unsigned": false,
3153 "autoincrement": false,
3154 "primary": false,
3155 "nullable": true,
3156 "length": 6,
3157 "mappedType": "datetime"
3158 }
3159 },
3160 "name": "return",
3161 "schema": "public",
3162 "indexes": [
3163 {
3164 "keyName": "IDX_return_order_id",
3165 "columnNames": [],
3166 "composite": false,
3167 "constraint": false,
3168 "primary": false,
3169 "unique": false,
3170 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_return_order_id\" ON \"return\" (\"order_id\") WHERE deleted_at IS NULL"
3171 },
3172 {
3173 "keyName": "IDX_return_deleted_at",
3174 "columnNames": [],
3175 "composite": false,
3176 "constraint": false,
3177 "primary": false,
3178 "unique": false,
3179 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_return_deleted_at\" ON \"return\" (\"deleted_at\") WHERE deleted_at IS NULL"
3180 },
3181 {
3182 "keyName": "IDX_return_display_id",
3183 "columnNames": [],
3184 "composite": false,
3185 "constraint": false,
3186 "primary": false,
3187 "unique": false,
3188 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_return_display_id\" ON \"return\" (\"display_id\") WHERE deleted_at IS NULL"
3189 },
3190 {
3191 "keyName": "IDX_return_deleted_at",
3192 "columnNames": [],
3193 "composite": false,
3194 "constraint": false,
3195 "primary": false,
3196 "unique": false,
3197 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_return_deleted_at\" ON \"return\" (\"deleted_at\") WHERE deleted_at IS NOT NULL"
3198 },
3199 {
3200 "keyName": "IDX_return_exchange_id",
3201 "columnNames": [],
3202 "composite": false,
3203 "constraint": false,
3204 "primary": false,
3205 "unique": false,
3206 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_return_exchange_id\" ON \"return\" (\"exchange_id\") WHERE exchange_id IS NOT NULL AND deleted_at IS NULL"
3207 },
3208 {
3209 "keyName": "IDX_return_claim_id",
3210 "columnNames": [],
3211 "composite": false,
3212 "constraint": false,
3213 "primary": false,
3214 "unique": false,
3215 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_return_claim_id\" ON \"return\" (\"claim_id\") WHERE claim_id IS NOT NULL AND deleted_at IS NULL"
3216 },
3217 {
3218 "keyName": "return_pkey",
3219 "columnNames": ["id"],
3220 "composite": false,
3221 "constraint": true,
3222 "primary": true,
3223 "unique": true
3224 }
3225 ],
3226 "checks": [],
3227 "foreignKeys": {
3228 "return_order_id_foreign": {
3229 "constraintName": "return_order_id_foreign",
3230 "columnNames": ["order_id"],
3231 "localTableName": "public.return",
3232 "referencedColumnNames": ["id"],
3233 "referencedTableName": "public.order",
3234 "updateRule": "cascade"
3235 },
3236 "return_exchange_id_foreign": {
3237 "constraintName": "return_exchange_id_foreign",
3238 "columnNames": ["exchange_id"],
3239 "localTableName": "public.return",
3240 "referencedColumnNames": ["id"],
3241 "referencedTableName": "public.order_exchange",
3242 "deleteRule": "set null",
3243 "updateRule": "cascade"
3244 },
3245 "return_claim_id_foreign": {
3246 "constraintName": "return_claim_id_foreign",
3247 "columnNames": ["claim_id"],
3248 "localTableName": "public.return",
3249 "referencedColumnNames": ["id"],
3250 "referencedTableName": "public.order_claim",
3251 "deleteRule": "set null",
3252 "updateRule": "cascade"
3253 }
3254 },
3255 "nativeEnums": {}
3256 },
3257 {
3258 "columns": {
3259 "id": {
3260 "name": "id",
3261 "type": "text",
3262 "unsigned": false,
3263 "autoincrement": false,
3264 "primary": false,
3265 "nullable": false,
3266 "mappedType": "text"
3267 },
3268 "order_version": {
3269 "name": "order_version",
3270 "type": "integer",
3271 "unsigned": false,
3272 "autoincrement": false,
3273 "primary": false,
3274 "nullable": false,
3275 "mappedType": "integer"
3276 },
3277 "display_id": {
3278 "name": "display_id",
3279 "type": "serial",
3280 "unsigned": true,
3281 "autoincrement": true,
3282 "primary": false,
3283 "nullable": false,
3284 "mappedType": "integer"
3285 },
3286 "no_notification": {
3287 "name": "no_notification",
3288 "type": "boolean",
3289 "unsigned": false,
3290 "autoincrement": false,
3291 "primary": false,
3292 "nullable": true,
3293 "mappedType": "boolean"
3294 },
3295 "difference_due": {
3296 "name": "difference_due",
3297 "type": "numeric",
3298 "unsigned": false,
3299 "autoincrement": false,
3300 "primary": false,
3301 "nullable": true,
3302 "mappedType": "decimal"
3303 },
3304 "allow_backorder": {
3305 "name": "allow_backorder",
3306 "type": "boolean",
3307 "unsigned": false,
3308 "autoincrement": false,
3309 "primary": false,
3310 "nullable": false,
3311 "default": "false",
3312 "mappedType": "boolean"
3313 },
3314 "created_by": {
3315 "name": "created_by",
3316 "type": "text",
3317 "unsigned": false,
3318 "autoincrement": false,
3319 "primary": false,
3320 "nullable": true,
3321 "mappedType": "text"
3322 },
3323 "metadata": {
3324 "name": "metadata",
3325 "type": "jsonb",
3326 "unsigned": false,
3327 "autoincrement": false,
3328 "primary": false,
3329 "nullable": true,
3330 "mappedType": "json"
3331 },
3332 "canceled_at": {
3333 "name": "canceled_at",
3334 "type": "timestamptz",
3335 "unsigned": false,
3336 "autoincrement": false,
3337 "primary": false,
3338 "nullable": true,
3339 "length": 6,
3340 "mappedType": "datetime"
3341 },
3342 "order_id": {
3343 "name": "order_id",
3344 "type": "text",
3345 "unsigned": false,
3346 "autoincrement": false,
3347 "primary": false,
3348 "nullable": false,
3349 "mappedType": "text"
3350 },
3351 "return_id": {
3352 "name": "return_id",
3353 "type": "text",
3354 "unsigned": false,
3355 "autoincrement": false,
3356 "primary": false,
3357 "nullable": true,
3358 "mappedType": "text"
3359 },
3360 "raw_difference_due": {
3361 "name": "raw_difference_due",
3362 "type": "jsonb",
3363 "unsigned": false,
3364 "autoincrement": false,
3365 "primary": false,
3366 "nullable": true,
3367 "mappedType": "json"
3368 },
3369 "created_at": {
3370 "name": "created_at",
3371 "type": "timestamptz",
3372 "unsigned": false,
3373 "autoincrement": false,
3374 "primary": false,
3375 "nullable": false,
3376 "length": 6,
3377 "default": "now()",
3378 "mappedType": "datetime"
3379 },
3380 "updated_at": {
3381 "name": "updated_at",
3382 "type": "timestamptz",
3383 "unsigned": false,
3384 "autoincrement": false,
3385 "primary": false,
3386 "nullable": false,
3387 "length": 6,
3388 "default": "now()",
3389 "mappedType": "datetime"
3390 },
3391 "deleted_at": {
3392 "name": "deleted_at",
3393 "type": "timestamptz",
3394 "unsigned": false,
3395 "autoincrement": false,
3396 "primary": false,
3397 "nullable": true,
3398 "length": 6,
3399 "mappedType": "datetime"
3400 }
3401 },
3402 "name": "order_exchange",
3403 "schema": "public",
3404 "indexes": [
3405 {
3406 "keyName": "IDX_order_exchange_deleted_at",
3407 "columnNames": [],
3408 "composite": false,
3409 "constraint": false,
3410 "primary": false,
3411 "unique": false,
3412 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_exchange_deleted_at\" ON \"order_exchange\" (\"deleted_at\") WHERE deleted_at IS NULL"
3413 },
3414 {
3415 "keyName": "IDX_order_exchange_display_id",
3416 "columnNames": [],
3417 "composite": false,
3418 "constraint": false,
3419 "primary": false,
3420 "unique": false,
3421 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_exchange_display_id\" ON \"order_exchange\" (\"display_id\") WHERE deleted_at IS NULL"
3422 },
3423 {
3424 "keyName": "IDX_order_exchange_deleted_at",
3425 "columnNames": [],
3426 "composite": false,
3427 "constraint": false,
3428 "primary": false,
3429 "unique": false,
3430 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_exchange_deleted_at\" ON \"order_exchange\" (\"deleted_at\") WHERE deleted_at IS NOT NULL"
3431 },
3432 {
3433 "keyName": "IDX_order_exchange_order_id",
3434 "columnNames": [],
3435 "composite": false,
3436 "constraint": false,
3437 "primary": false,
3438 "unique": false,
3439 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_exchange_order_id\" ON \"order_exchange\" (\"order_id\") WHERE deleted_at IS NULL"
3440 },
3441 {
3442 "keyName": "IDX_order_exchange_return_id",
3443 "columnNames": [],
3444 "composite": false,
3445 "constraint": false,
3446 "primary": false,
3447 "unique": false,
3448 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_exchange_return_id\" ON \"order_exchange\" (\"return_id\") WHERE return_id IS NOT NULL AND deleted_at IS NULL"
3449 },
3450 {
3451 "keyName": "order_exchange_pkey",
3452 "columnNames": ["id"],
3453 "composite": false,
3454 "constraint": true,
3455 "primary": true,
3456 "unique": true
3457 }
3458 ],
3459 "checks": [],
3460 "foreignKeys": {
3461 "order_exchange_order_id_foreign": {
3462 "constraintName": "order_exchange_order_id_foreign",
3463 "columnNames": ["order_id"],
3464 "localTableName": "public.order_exchange",
3465 "referencedColumnNames": ["id"],
3466 "referencedTableName": "public.order",
3467 "updateRule": "cascade"
3468 },
3469 "order_exchange_return_id_foreign": {
3470 "constraintName": "order_exchange_return_id_foreign",
3471 "columnNames": ["return_id"],
3472 "localTableName": "public.order_exchange",
3473 "referencedColumnNames": ["id"],
3474 "referencedTableName": "public.return",
3475 "deleteRule": "set null",
3476 "updateRule": "cascade"
3477 }
3478 },
3479 "nativeEnums": {}
3480 },
3481 {
3482 "columns": {
3483 "id": {
3484 "name": "id",
3485 "type": "text",
3486 "unsigned": false,
3487 "autoincrement": false,
3488 "primary": false,
3489 "nullable": false,
3490 "mappedType": "text"
3491 },
3492 "quantity": {
3493 "name": "quantity",
3494 "type": "numeric",
3495 "unsigned": false,
3496 "autoincrement": false,
3497 "primary": false,
3498 "nullable": false,
3499 "mappedType": "decimal"
3500 },
3501 "note": {
3502 "name": "note",
3503 "type": "text",
3504 "unsigned": false,
3505 "autoincrement": false,
3506 "primary": false,
3507 "nullable": true,
3508 "mappedType": "text"
3509 },
3510 "metadata": {
3511 "name": "metadata",
3512 "type": "jsonb",
3513 "unsigned": false,
3514 "autoincrement": false,
3515 "primary": false,
3516 "nullable": true,
3517 "mappedType": "json"
3518 },
3519 "exchange_id": {
3520 "name": "exchange_id",
3521 "type": "text",
3522 "unsigned": false,
3523 "autoincrement": false,
3524 "primary": false,
3525 "nullable": false,
3526 "mappedType": "text"
3527 },
3528 "item_id": {
3529 "name": "item_id",
3530 "type": "text",
3531 "unsigned": false,
3532 "autoincrement": false,
3533 "primary": false,
3534 "nullable": false,
3535 "mappedType": "text"
3536 },
3537 "raw_quantity": {
3538 "name": "raw_quantity",
3539 "type": "jsonb",
3540 "unsigned": false,
3541 "autoincrement": false,
3542 "primary": false,
3543 "nullable": false,
3544 "mappedType": "json"
3545 },
3546 "created_at": {
3547 "name": "created_at",
3548 "type": "timestamptz",
3549 "unsigned": false,
3550 "autoincrement": false,
3551 "primary": false,
3552 "nullable": false,
3553 "length": 6,
3554 "default": "now()",
3555 "mappedType": "datetime"
3556 },
3557 "updated_at": {
3558 "name": "updated_at",
3559 "type": "timestamptz",
3560 "unsigned": false,
3561 "autoincrement": false,
3562 "primary": false,
3563 "nullable": false,
3564 "length": 6,
3565 "default": "now()",
3566 "mappedType": "datetime"
3567 },
3568 "deleted_at": {
3569 "name": "deleted_at",
3570 "type": "timestamptz",
3571 "unsigned": false,
3572 "autoincrement": false,
3573 "primary": false,
3574 "nullable": true,
3575 "length": 6,
3576 "mappedType": "datetime"
3577 }
3578 },
3579 "name": "order_exchange_item",
3580 "schema": "public",
3581 "indexes": [
3582 {
3583 "keyName": "IDX_order_exchange_item_exchange_id",
3584 "columnNames": [],
3585 "composite": false,
3586 "constraint": false,
3587 "primary": false,
3588 "unique": false,
3589 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_exchange_item_exchange_id\" ON \"order_exchange_item\" (\"exchange_id\") WHERE deleted_at IS NULL"
3590 },
3591 {
3592 "keyName": "IDX_order_exchange_item_item_id",
3593 "columnNames": [],
3594 "composite": false,
3595 "constraint": false,
3596 "primary": false,
3597 "unique": false,
3598 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_exchange_item_item_id\" ON \"order_exchange_item\" (\"item_id\") WHERE deleted_at IS NULL"
3599 },
3600 {
3601 "keyName": "IDX_order_exchange_item_deleted_at",
3602 "columnNames": [],
3603 "composite": false,
3604 "constraint": false,
3605 "primary": false,
3606 "unique": false,
3607 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_exchange_item_deleted_at\" ON \"order_exchange_item\" (\"deleted_at\") WHERE deleted_at IS NULL"
3608 },
3609 {
3610 "keyName": "IDX_order_exchange_item_deleted_at",
3611 "columnNames": [],
3612 "composite": false,
3613 "constraint": false,
3614 "primary": false,
3615 "unique": false,
3616 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_exchange_item_deleted_at\" ON \"order_exchange_item\" (\"deleted_at\") WHERE deleted_at IS NOT NULL"
3617 },
3618 {
3619 "keyName": "order_exchange_item_pkey",
3620 "columnNames": ["id"],
3621 "composite": false,
3622 "constraint": true,
3623 "primary": true,
3624 "unique": true
3625 }
3626 ],
3627 "checks": [],
3628 "foreignKeys": {
3629 "order_exchange_item_exchange_id_foreign": {
3630 "constraintName": "order_exchange_item_exchange_id_foreign",
3631 "columnNames": ["exchange_id"],
3632 "localTableName": "public.order_exchange_item",
3633 "referencedColumnNames": ["id"],
3634 "referencedTableName": "public.order_exchange",
3635 "deleteRule": "cascade",
3636 "updateRule": "cascade"
3637 },
3638 "order_exchange_item_item_id_foreign": {
3639 "constraintName": "order_exchange_item_item_id_foreign",
3640 "columnNames": ["item_id"],
3641 "localTableName": "public.order_exchange_item",
3642 "referencedColumnNames": ["id"],
3643 "referencedTableName": "public.order_line_item",
3644 "updateRule": "cascade"
3645 }
3646 },
3647 "nativeEnums": {}
3648 },
3649 {
3650 "columns": {
3651 "id": {
3652 "name": "id",
3653 "type": "text",
3654 "unsigned": false,
3655 "autoincrement": false,
3656 "primary": false,
3657 "nullable": false,
3658 "mappedType": "text"
3659 },
3660 "order_version": {
3661 "name": "order_version",
3662 "type": "integer",
3663 "unsigned": false,
3664 "autoincrement": false,
3665 "primary": false,
3666 "nullable": false,
3667 "mappedType": "integer"
3668 },
3669 "display_id": {
3670 "name": "display_id",
3671 "type": "serial",
3672 "unsigned": true,
3673 "autoincrement": true,
3674 "primary": false,
3675 "nullable": false,
3676 "mappedType": "integer"
3677 },
3678 "type": {
3679 "name": "type",
3680 "type": "text",
3681 "unsigned": false,
3682 "autoincrement": false,
3683 "primary": false,
3684 "nullable": false,
3685 "enumItems": ["refund", "replace"],
3686 "mappedType": "enum"
3687 },
3688 "no_notification": {
3689 "name": "no_notification",
3690 "type": "boolean",
3691 "unsigned": false,
3692 "autoincrement": false,
3693 "primary": false,
3694 "nullable": true,
3695 "mappedType": "boolean"
3696 },
3697 "refund_amount": {
3698 "name": "refund_amount",
3699 "type": "numeric",
3700 "unsigned": false,
3701 "autoincrement": false,
3702 "primary": false,
3703 "nullable": true,
3704 "mappedType": "decimal"
3705 },
3706 "created_by": {
3707 "name": "created_by",
3708 "type": "text",
3709 "unsigned": false,
3710 "autoincrement": false,
3711 "primary": false,
3712 "nullable": true,
3713 "mappedType": "text"
3714 },
3715 "canceled_at": {
3716 "name": "canceled_at",
3717 "type": "timestamptz",
3718 "unsigned": false,
3719 "autoincrement": false,
3720 "primary": false,
3721 "nullable": true,
3722 "length": 6,
3723 "mappedType": "datetime"
3724 },
3725 "metadata": {
3726 "name": "metadata",
3727 "type": "jsonb",
3728 "unsigned": false,
3729 "autoincrement": false,
3730 "primary": false,
3731 "nullable": true,
3732 "mappedType": "json"
3733 },
3734 "order_id": {
3735 "name": "order_id",
3736 "type": "text",
3737 "unsigned": false,
3738 "autoincrement": false,
3739 "primary": false,
3740 "nullable": false,
3741 "mappedType": "text"
3742 },
3743 "return_id": {
3744 "name": "return_id",
3745 "type": "text",
3746 "unsigned": false,
3747 "autoincrement": false,
3748 "primary": false,
3749 "nullable": true,
3750 "mappedType": "text"
3751 },
3752 "raw_refund_amount": {
3753 "name": "raw_refund_amount",
3754 "type": "jsonb",
3755 "unsigned": false,
3756 "autoincrement": false,
3757 "primary": false,
3758 "nullable": true,
3759 "mappedType": "json"
3760 },
3761 "created_at": {
3762 "name": "created_at",
3763 "type": "timestamptz",
3764 "unsigned": false,
3765 "autoincrement": false,
3766 "primary": false,
3767 "nullable": false,
3768 "length": 6,
3769 "default": "now()",
3770 "mappedType": "datetime"
3771 },
3772 "updated_at": {
3773 "name": "updated_at",
3774 "type": "timestamptz",
3775 "unsigned": false,
3776 "autoincrement": false,
3777 "primary": false,
3778 "nullable": false,
3779 "length": 6,
3780 "default": "now()",
3781 "mappedType": "datetime"
3782 },
3783 "deleted_at": {
3784 "name": "deleted_at",
3785 "type": "timestamptz",
3786 "unsigned": false,
3787 "autoincrement": false,
3788 "primary": false,
3789 "nullable": true,
3790 "length": 6,
3791 "mappedType": "datetime"
3792 }
3793 },
3794 "name": "order_claim",
3795 "schema": "public",
3796 "indexes": [
3797 {
3798 "keyName": "IDX_order_claim_deleted_at",
3799 "columnNames": [],
3800 "composite": false,
3801 "constraint": false,
3802 "primary": false,
3803 "unique": false,
3804 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_claim_deleted_at\" ON \"order_claim\" (\"deleted_at\") WHERE deleted_at IS NULL"
3805 },
3806 {
3807 "keyName": "IDX_order_claim_display_id",
3808 "columnNames": [],
3809 "composite": false,
3810 "constraint": false,
3811 "primary": false,
3812 "unique": false,
3813 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_claim_display_id\" ON \"order_claim\" (\"display_id\") WHERE deleted_at IS NULL"
3814 },
3815 {
3816 "keyName": "IDX_order_claim_deleted_at",
3817 "columnNames": [],
3818 "composite": false,
3819 "constraint": false,
3820 "primary": false,
3821 "unique": false,
3822 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_claim_deleted_at\" ON \"order_claim\" (\"deleted_at\") WHERE deleted_at IS NOT NULL"
3823 },
3824 {
3825 "keyName": "IDX_order_claim_order_id",
3826 "columnNames": [],
3827 "composite": false,
3828 "constraint": false,
3829 "primary": false,
3830 "unique": false,
3831 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_claim_order_id\" ON \"order_claim\" (\"order_id\") WHERE deleted_at IS NULL"
3832 },
3833 {
3834 "keyName": "IDX_order_claim_return_id",
3835 "columnNames": [],
3836 "composite": false,
3837 "constraint": false,
3838 "primary": false,
3839 "unique": false,
3840 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_claim_return_id\" ON \"order_claim\" (\"return_id\") WHERE return_id IS NOT NULL AND deleted_at IS NULL"
3841 },
3842 {
3843 "keyName": "order_claim_pkey",
3844 "columnNames": ["id"],
3845 "composite": false,
3846 "constraint": true,
3847 "primary": true,
3848 "unique": true
3849 }
3850 ],
3851 "checks": [],
3852 "foreignKeys": {
3853 "order_claim_order_id_foreign": {
3854 "constraintName": "order_claim_order_id_foreign",
3855 "columnNames": ["order_id"],
3856 "localTableName": "public.order_claim",
3857 "referencedColumnNames": ["id"],
3858 "referencedTableName": "public.order",
3859 "updateRule": "cascade"
3860 },
3861 "order_claim_return_id_foreign": {
3862 "constraintName": "order_claim_return_id_foreign",
3863 "columnNames": ["return_id"],
3864 "localTableName": "public.order_claim",
3865 "referencedColumnNames": ["id"],
3866 "referencedTableName": "public.return",
3867 "deleteRule": "set null",
3868 "updateRule": "cascade"
3869 }
3870 },
3871 "nativeEnums": {}
3872 },
3873 {
3874 "columns": {
3875 "id": {
3876 "name": "id",
3877 "type": "text",
3878 "unsigned": false,
3879 "autoincrement": false,
3880 "primary": false,
3881 "nullable": false,
3882 "mappedType": "text"
3883 },
3884 "version": {
3885 "name": "version",
3886 "type": "integer",
3887 "unsigned": false,
3888 "autoincrement": false,
3889 "primary": false,
3890 "nullable": false,
3891 "default": "1",
3892 "mappedType": "integer"
3893 },
3894 "amount": {
3895 "name": "amount",
3896 "type": "numeric",
3897 "unsigned": false,
3898 "autoincrement": false,
3899 "primary": false,
3900 "nullable": false,
3901 "mappedType": "decimal"
3902 },
3903 "currency_code": {
3904 "name": "currency_code",
3905 "type": "text",
3906 "unsigned": false,
3907 "autoincrement": false,
3908 "primary": false,
3909 "nullable": false,
3910 "mappedType": "text"
3911 },
3912 "reference": {
3913 "name": "reference",
3914 "type": "text",
3915 "unsigned": false,
3916 "autoincrement": false,
3917 "primary": false,
3918 "nullable": true,
3919 "mappedType": "text"
3920 },
3921 "reference_id": {
3922 "name": "reference_id",
3923 "type": "text",
3924 "unsigned": false,
3925 "autoincrement": false,
3926 "primary": false,
3927 "nullable": true,
3928 "mappedType": "text"
3929 },
3930 "order_id": {
3931 "name": "order_id",
3932 "type": "text",
3933 "unsigned": false,
3934 "autoincrement": false,
3935 "primary": false,
3936 "nullable": false,
3937 "mappedType": "text"
3938 },
3939 "return_id": {
3940 "name": "return_id",
3941 "type": "text",
3942 "unsigned": false,
3943 "autoincrement": false,
3944 "primary": false,
3945 "nullable": true,
3946 "mappedType": "text"
3947 },
3948 "exchange_id": {
3949 "name": "exchange_id",
3950 "type": "text",
3951 "unsigned": false,
3952 "autoincrement": false,
3953 "primary": false,
3954 "nullable": true,
3955 "mappedType": "text"
3956 },
3957 "claim_id": {
3958 "name": "claim_id",
3959 "type": "text",
3960 "unsigned": false,
3961 "autoincrement": false,
3962 "primary": false,
3963 "nullable": true,
3964 "mappedType": "text"
3965 },
3966 "raw_amount": {
3967 "name": "raw_amount",
3968 "type": "jsonb",
3969 "unsigned": false,
3970 "autoincrement": false,
3971 "primary": false,
3972 "nullable": false,
3973 "mappedType": "json"
3974 },
3975 "created_at": {
3976 "name": "created_at",
3977 "type": "timestamptz",
3978 "unsigned": false,
3979 "autoincrement": false,
3980 "primary": false,
3981 "nullable": false,
3982 "length": 6,
3983 "default": "now()",
3984 "mappedType": "datetime"
3985 },
3986 "updated_at": {
3987 "name": "updated_at",
3988 "type": "timestamptz",
3989 "unsigned": false,
3990 "autoincrement": false,
3991 "primary": false,
3992 "nullable": false,
3993 "length": 6,
3994 "default": "now()",
3995 "mappedType": "datetime"
3996 },
3997 "deleted_at": {
3998 "name": "deleted_at",
3999 "type": "timestamptz",
4000 "unsigned": false,
4001 "autoincrement": false,
4002 "primary": false,
4003 "nullable": true,
4004 "length": 6,
4005 "mappedType": "datetime"
4006 }
4007 },
4008 "name": "order_transaction",
4009 "schema": "public",
4010 "indexes": [
4011 {
4012 "keyName": "IDX_order_transaction_order_id",
4013 "columnNames": [],
4014 "composite": false,
4015 "constraint": false,
4016 "primary": false,
4017 "unique": false,
4018 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_transaction_order_id\" ON \"order_transaction\" (\"order_id\") WHERE deleted_at IS NULL"
4019 },
4020 {
4021 "keyName": "IDX_order_transaction_return_id",
4022 "columnNames": [],
4023 "composite": false,
4024 "constraint": false,
4025 "primary": false,
4026 "unique": false,
4027 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_transaction_return_id\" ON \"order_transaction\" (\"return_id\") WHERE deleted_at IS NULL"
4028 },
4029 {
4030 "keyName": "IDX_order_transaction_exchange_id",
4031 "columnNames": [],
4032 "composite": false,
4033 "constraint": false,
4034 "primary": false,
4035 "unique": false,
4036 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_transaction_exchange_id\" ON \"order_transaction\" (\"exchange_id\") WHERE deleted_at IS NULL"
4037 },
4038 {
4039 "keyName": "IDX_order_transaction_claim_id",
4040 "columnNames": [],
4041 "composite": false,
4042 "constraint": false,
4043 "primary": false,
4044 "unique": false,
4045 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_transaction_claim_id\" ON \"order_transaction\" (\"claim_id\") WHERE deleted_at IS NULL"
4046 },
4047 {
4048 "keyName": "IDX_order_transaction_deleted_at",
4049 "columnNames": [],
4050 "composite": false,
4051 "constraint": false,
4052 "primary": false,
4053 "unique": false,
4054 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_transaction_deleted_at\" ON \"order_transaction\" (\"deleted_at\") WHERE deleted_at IS NULL"
4055 },
4056 {
4057 "keyName": "IDX_order_transaction_reference_id",
4058 "columnNames": [],
4059 "composite": false,
4060 "constraint": false,
4061 "primary": false,
4062 "unique": false,
4063 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_transaction_reference_id\" ON \"order_transaction\" (\"reference_id\") WHERE deleted_at IS NULL"
4064 },
4065 {
4066 "keyName": "IDX_order_transaction_return_id",
4067 "columnNames": [],
4068 "composite": false,
4069 "constraint": false,
4070 "primary": false,
4071 "unique": false,
4072 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_transaction_return_id\" ON \"order_transaction\" (\"return_id\") WHERE return_id IS NOT NULL AND deleted_at IS NULL"
4073 },
4074 {
4075 "keyName": "IDX_order_transaction_exchange_id",
4076 "columnNames": [],
4077 "composite": false,
4078 "constraint": false,
4079 "primary": false,
4080 "unique": false,
4081 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_transaction_exchange_id\" ON \"order_transaction\" (\"exchange_id\") WHERE exchange_id IS NOT NULL AND deleted_at IS NULL"
4082 },
4083 {
4084 "keyName": "IDX_order_transaction_claim_id",
4085 "columnNames": [],
4086 "composite": false,
4087 "constraint": false,
4088 "primary": false,
4089 "unique": false,
4090 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_transaction_claim_id\" ON \"order_transaction\" (\"claim_id\") WHERE claim_id IS NOT NULL AND deleted_at IS NULL"
4091 },
4092 {
4093 "keyName": "IDX_order_transaction_currency_code",
4094 "columnNames": [],
4095 "composite": false,
4096 "constraint": false,
4097 "primary": false,
4098 "unique": false,
4099 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_transaction_currency_code\" ON \"order_transaction\" (\"currency_code\") WHERE deleted_at IS NULL"
4100 },
4101 {
4102 "keyName": "IDX_order_transaction_deleted_at",
4103 "columnNames": [],
4104 "composite": false,
4105 "constraint": false,
4106 "primary": false,
4107 "unique": false,
4108 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_transaction_deleted_at\" ON \"order_transaction\" (\"deleted_at\") WHERE deleted_at IS NOT NULL"
4109 },
4110 {
4111 "keyName": "IDX_order_transaction_order_id_version",
4112 "columnNames": [],
4113 "composite": false,
4114 "constraint": false,
4115 "primary": false,
4116 "unique": false,
4117 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_transaction_order_id_version\" ON \"order_transaction\" (\"order_id\", \"version\") WHERE deleted_at IS NULL"
4118 },
4119 {
4120 "keyName": "order_transaction_pkey",
4121 "columnNames": ["id"],
4122 "composite": false,
4123 "constraint": true,
4124 "primary": true,
4125 "unique": true
4126 }
4127 ],
4128 "checks": [],
4129 "foreignKeys": {
4130 "order_transaction_order_id_foreign": {
4131 "constraintName": "order_transaction_order_id_foreign",
4132 "columnNames": ["order_id"],
4133 "localTableName": "public.order_transaction",
4134 "referencedColumnNames": ["id"],
4135 "referencedTableName": "public.order",
4136 "deleteRule": "cascade",
4137 "updateRule": "cascade"
4138 },
4139 "order_transaction_return_id_foreign": {
4140 "constraintName": "order_transaction_return_id_foreign",
4141 "columnNames": ["return_id"],
4142 "localTableName": "public.order_transaction",
4143 "referencedColumnNames": ["id"],
4144 "referencedTableName": "public.return",
4145 "deleteRule": "cascade",
4146 "updateRule": "cascade"
4147 },
4148 "order_transaction_exchange_id_foreign": {
4149 "constraintName": "order_transaction_exchange_id_foreign",
4150 "columnNames": ["exchange_id"],
4151 "localTableName": "public.order_transaction",
4152 "referencedColumnNames": ["id"],
4153 "referencedTableName": "public.order_exchange",
4154 "deleteRule": "cascade",
4155 "updateRule": "cascade"
4156 },
4157 "order_transaction_claim_id_foreign": {
4158 "constraintName": "order_transaction_claim_id_foreign",
4159 "columnNames": ["claim_id"],
4160 "localTableName": "public.order_transaction",
4161 "referencedColumnNames": ["id"],
4162 "referencedTableName": "public.order_claim",
4163 "deleteRule": "cascade",
4164 "updateRule": "cascade"
4165 }
4166 },
4167 "nativeEnums": {}
4168 },
4169 {
4170 "columns": {
4171 "id": {
4172 "name": "id",
4173 "type": "text",
4174 "unsigned": false,
4175 "autoincrement": false,
4176 "primary": false,
4177 "nullable": false,
4178 "mappedType": "text"
4179 },
4180 "version": {
4181 "name": "version",
4182 "type": "integer",
4183 "unsigned": false,
4184 "autoincrement": false,
4185 "primary": false,
4186 "nullable": false,
4187 "default": "1",
4188 "mappedType": "integer"
4189 },
4190 "order_id": {
4191 "name": "order_id",
4192 "type": "text",
4193 "unsigned": false,
4194 "autoincrement": false,
4195 "primary": false,
4196 "nullable": false,
4197 "mappedType": "text"
4198 },
4199 "return_id": {
4200 "name": "return_id",
4201 "type": "text",
4202 "unsigned": false,
4203 "autoincrement": false,
4204 "primary": false,
4205 "nullable": true,
4206 "mappedType": "text"
4207 },
4208 "exchange_id": {
4209 "name": "exchange_id",
4210 "type": "text",
4211 "unsigned": false,
4212 "autoincrement": false,
4213 "primary": false,
4214 "nullable": true,
4215 "mappedType": "text"
4216 },
4217 "claim_id": {
4218 "name": "claim_id",
4219 "type": "text",
4220 "unsigned": false,
4221 "autoincrement": false,
4222 "primary": false,
4223 "nullable": true,
4224 "mappedType": "text"
4225 },
4226 "shipping_method_id": {
4227 "name": "shipping_method_id",
4228 "type": "text",
4229 "unsigned": false,
4230 "autoincrement": false,
4231 "primary": false,
4232 "nullable": false,
4233 "mappedType": "text"
4234 },
4235 "created_at": {
4236 "name": "created_at",
4237 "type": "timestamptz",
4238 "unsigned": false,
4239 "autoincrement": false,
4240 "primary": false,
4241 "nullable": false,
4242 "length": 6,
4243 "default": "now()",
4244 "mappedType": "datetime"
4245 },
4246 "updated_at": {
4247 "name": "updated_at",
4248 "type": "timestamptz",
4249 "unsigned": false,
4250 "autoincrement": false,
4251 "primary": false,
4252 "nullable": false,
4253 "length": 6,
4254 "default": "now()",
4255 "mappedType": "datetime"
4256 },
4257 "deleted_at": {
4258 "name": "deleted_at",
4259 "type": "timestamptz",
4260 "unsigned": false,
4261 "autoincrement": false,
4262 "primary": false,
4263 "nullable": true,
4264 "length": 6,
4265 "mappedType": "datetime"
4266 }
4267 },
4268 "name": "order_shipping",
4269 "schema": "public",
4270 "indexes": [
4271 {
4272 "keyName": "IDX_order_shipping_order_id",
4273 "columnNames": [],
4274 "composite": false,
4275 "constraint": false,
4276 "primary": false,
4277 "unique": false,
4278 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_shipping_order_id\" ON \"order_shipping\" (\"order_id\") WHERE deleted_at IS NULL"
4279 },
4280 {
4281 "keyName": "IDX_order_shipping_return_id",
4282 "columnNames": [],
4283 "composite": false,
4284 "constraint": false,
4285 "primary": false,
4286 "unique": false,
4287 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_shipping_return_id\" ON \"order_shipping\" (\"return_id\") WHERE deleted_at IS NULL"
4288 },
4289 {
4290 "keyName": "IDX_order_shipping_exchange_id",
4291 "columnNames": [],
4292 "composite": false,
4293 "constraint": false,
4294 "primary": false,
4295 "unique": false,
4296 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_shipping_exchange_id\" ON \"order_shipping\" (\"exchange_id\") WHERE deleted_at IS NULL"
4297 },
4298 {
4299 "keyName": "IDX_order_shipping_claim_id",
4300 "columnNames": [],
4301 "composite": false,
4302 "constraint": false,
4303 "primary": false,
4304 "unique": false,
4305 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_shipping_claim_id\" ON \"order_shipping\" (\"claim_id\") WHERE deleted_at IS NULL"
4306 },
4307 {
4308 "keyName": "IDX_order_shipping_deleted_at",
4309 "columnNames": [],
4310 "composite": false,
4311 "constraint": false,
4312 "primary": false,
4313 "unique": false,
4314 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_shipping_deleted_at\" ON \"order_shipping\" (\"deleted_at\") WHERE deleted_at IS NULL"
4315 },
4316 {
4317 "keyName": "IDX_order_shipping_return_id",
4318 "columnNames": [],
4319 "composite": false,
4320 "constraint": false,
4321 "primary": false,
4322 "unique": false,
4323 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_shipping_return_id\" ON \"order_shipping\" (\"return_id\") WHERE return_id IS NOT NULL AND deleted_at IS NULL"
4324 },
4325 {
4326 "keyName": "IDX_order_shipping_exchange_id",
4327 "columnNames": [],
4328 "composite": false,
4329 "constraint": false,
4330 "primary": false,
4331 "unique": false,
4332 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_shipping_exchange_id\" ON \"order_shipping\" (\"exchange_id\") WHERE exchange_id IS NOT NULL AND deleted_at IS NULL"
4333 },
4334 {
4335 "keyName": "IDX_order_shipping_claim_id",
4336 "columnNames": [],
4337 "composite": false,
4338 "constraint": false,
4339 "primary": false,
4340 "unique": false,
4341 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_shipping_claim_id\" ON \"order_shipping\" (\"claim_id\") WHERE claim_id IS NOT NULL AND deleted_at IS NULL"
4342 },
4343 {
4344 "keyName": "IDX_order_shipping_order_id_version",
4345 "columnNames": [],
4346 "composite": false,
4347 "constraint": false,
4348 "primary": false,
4349 "unique": false,
4350 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_shipping_order_id_version\" ON \"order_shipping\" (\"order_id\", \"version\") WHERE deleted_at IS NULL"
4351 },
4352 {
4353 "keyName": "IDX_order_shipping_shipping_method_id",
4354 "columnNames": [],
4355 "composite": false,
4356 "constraint": false,
4357 "primary": false,
4358 "unique": false,
4359 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_shipping_shipping_method_id\" ON \"order_shipping\" (\"shipping_method_id\") WHERE deleted_at IS NULL"
4360 },
4361 {
4362 "keyName": "IDX_order_shipping_deleted_at",
4363 "columnNames": [],
4364 "composite": false,
4365 "constraint": false,
4366 "primary": false,
4367 "unique": false,
4368 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_shipping_deleted_at\" ON \"order_shipping\" (\"deleted_at\") WHERE deleted_at IS NOT NULL"
4369 },
4370 {
4371 "keyName": "order_shipping_pkey",
4372 "columnNames": ["id"],
4373 "composite": false,
4374 "constraint": true,
4375 "primary": true,
4376 "unique": true
4377 }
4378 ],
4379 "checks": [],
4380 "foreignKeys": {
4381 "order_shipping_order_id_foreign": {
4382 "constraintName": "order_shipping_order_id_foreign",
4383 "columnNames": ["order_id"],
4384 "localTableName": "public.order_shipping",
4385 "referencedColumnNames": ["id"],
4386 "referencedTableName": "public.order",
4387 "deleteRule": "cascade",
4388 "updateRule": "cascade"
4389 },
4390 "order_shipping_return_id_foreign": {
4391 "constraintName": "order_shipping_return_id_foreign",
4392 "columnNames": ["return_id"],
4393 "localTableName": "public.order_shipping",
4394 "referencedColumnNames": ["id"],
4395 "referencedTableName": "public.return",
4396 "deleteRule": "cascade",
4397 "updateRule": "cascade"
4398 },
4399 "order_shipping_exchange_id_foreign": {
4400 "constraintName": "order_shipping_exchange_id_foreign",
4401 "columnNames": ["exchange_id"],
4402 "localTableName": "public.order_shipping",
4403 "referencedColumnNames": ["id"],
4404 "referencedTableName": "public.order_exchange",
4405 "deleteRule": "set null",
4406 "updateRule": "cascade"
4407 },
4408 "order_shipping_claim_id_foreign": {
4409 "constraintName": "order_shipping_claim_id_foreign",
4410 "columnNames": ["claim_id"],
4411 "localTableName": "public.order_shipping",
4412 "referencedColumnNames": ["id"],
4413 "referencedTableName": "public.order_claim",
4414 "deleteRule": "set null",
4415 "updateRule": "cascade"
4416 },
4417 "order_shipping_shipping_method_id_foreign": {
4418 "constraintName": "order_shipping_shipping_method_id_foreign",
4419 "columnNames": ["shipping_method_id"],
4420 "localTableName": "public.order_shipping",
4421 "referencedColumnNames": ["id"],
4422 "referencedTableName": "public.order_shipping_method",
4423 "updateRule": "cascade"
4424 }
4425 },
4426 "nativeEnums": {}
4427 },
4428 {
4429 "columns": {
4430 "id": {
4431 "name": "id",
4432 "type": "text",
4433 "unsigned": false,
4434 "autoincrement": false,
4435 "primary": false,
4436 "nullable": false,
4437 "mappedType": "text"
4438 },
4439 "reason": {
4440 "name": "reason",
4441 "type": "text",
4442 "unsigned": false,
4443 "autoincrement": false,
4444 "primary": false,
4445 "nullable": true,
4446 "enumItems": [
4447 "missing_item",
4448 "wrong_item",
4449 "production_failure",
4450 "other"
4451 ],
4452 "mappedType": "enum"
4453 },
4454 "quantity": {
4455 "name": "quantity",
4456 "type": "numeric",
4457 "unsigned": false,
4458 "autoincrement": false,
4459 "primary": false,
4460 "nullable": false,
4461 "mappedType": "decimal"
4462 },
4463 "is_additional_item": {
4464 "name": "is_additional_item",
4465 "type": "boolean",
4466 "unsigned": false,
4467 "autoincrement": false,
4468 "primary": false,
4469 "nullable": false,
4470 "default": "false",
4471 "mappedType": "boolean"
4472 },
4473 "note": {
4474 "name": "note",
4475 "type": "text",
4476 "unsigned": false,
4477 "autoincrement": false,
4478 "primary": false,
4479 "nullable": true,
4480 "mappedType": "text"
4481 },
4482 "metadata": {
4483 "name": "metadata",
4484 "type": "jsonb",
4485 "unsigned": false,
4486 "autoincrement": false,
4487 "primary": false,
4488 "nullable": true,
4489 "mappedType": "json"
4490 },
4491 "claim_id": {
4492 "name": "claim_id",
4493 "type": "text",
4494 "unsigned": false,
4495 "autoincrement": false,
4496 "primary": false,
4497 "nullable": false,
4498 "mappedType": "text"
4499 },
4500 "item_id": {
4501 "name": "item_id",
4502 "type": "text",
4503 "unsigned": false,
4504 "autoincrement": false,
4505 "primary": false,
4506 "nullable": false,
4507 "mappedType": "text"
4508 },
4509 "raw_quantity": {
4510 "name": "raw_quantity",
4511 "type": "jsonb",
4512 "unsigned": false,
4513 "autoincrement": false,
4514 "primary": false,
4515 "nullable": false,
4516 "mappedType": "json"
4517 },
4518 "created_at": {
4519 "name": "created_at",
4520 "type": "timestamptz",
4521 "unsigned": false,
4522 "autoincrement": false,
4523 "primary": false,
4524 "nullable": false,
4525 "length": 6,
4526 "default": "now()",
4527 "mappedType": "datetime"
4528 },
4529 "updated_at": {
4530 "name": "updated_at",
4531 "type": "timestamptz",
4532 "unsigned": false,
4533 "autoincrement": false,
4534 "primary": false,
4535 "nullable": false,
4536 "length": 6,
4537 "default": "now()",
4538 "mappedType": "datetime"
4539 },
4540 "deleted_at": {
4541 "name": "deleted_at",
4542 "type": "timestamptz",
4543 "unsigned": false,
4544 "autoincrement": false,
4545 "primary": false,
4546 "nullable": true,
4547 "length": 6,
4548 "mappedType": "datetime"
4549 }
4550 },
4551 "name": "order_claim_item",
4552 "schema": "public",
4553 "indexes": [
4554 {
4555 "keyName": "IDX_order_claim_item_claim_id",
4556 "columnNames": [],
4557 "composite": false,
4558 "constraint": false,
4559 "primary": false,
4560 "unique": false,
4561 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_claim_item_claim_id\" ON \"order_claim_item\" (\"claim_id\") WHERE deleted_at IS NULL"
4562 },
4563 {
4564 "keyName": "IDX_order_claim_item_item_id",
4565 "columnNames": [],
4566 "composite": false,
4567 "constraint": false,
4568 "primary": false,
4569 "unique": false,
4570 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_claim_item_item_id\" ON \"order_claim_item\" (\"item_id\") WHERE deleted_at IS NULL"
4571 },
4572 {
4573 "keyName": "IDX_order_claim_item_deleted_at",
4574 "columnNames": [],
4575 "composite": false,
4576 "constraint": false,
4577 "primary": false,
4578 "unique": false,
4579 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_claim_item_deleted_at\" ON \"order_claim_item\" (\"deleted_at\") WHERE deleted_at IS NULL"
4580 },
4581 {
4582 "keyName": "IDX_order_claim_item_deleted_at",
4583 "columnNames": [],
4584 "composite": false,
4585 "constraint": false,
4586 "primary": false,
4587 "unique": false,
4588 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_claim_item_deleted_at\" ON \"order_claim_item\" (\"deleted_at\") WHERE deleted_at IS NOT NULL"
4589 },
4590 {
4591 "keyName": "order_claim_item_pkey",
4592 "columnNames": ["id"],
4593 "composite": false,
4594 "constraint": true,
4595 "primary": true,
4596 "unique": true
4597 }
4598 ],
4599 "checks": [],
4600 "foreignKeys": {
4601 "order_claim_item_claim_id_foreign": {
4602 "constraintName": "order_claim_item_claim_id_foreign",
4603 "columnNames": ["claim_id"],
4604 "localTableName": "public.order_claim_item",
4605 "referencedColumnNames": ["id"],
4606 "referencedTableName": "public.order_claim",
4607 "deleteRule": "cascade",
4608 "updateRule": "cascade"
4609 },
4610 "order_claim_item_item_id_foreign": {
4611 "constraintName": "order_claim_item_item_id_foreign",
4612 "columnNames": ["item_id"],
4613 "localTableName": "public.order_claim_item",
4614 "referencedColumnNames": ["id"],
4615 "referencedTableName": "public.order_line_item",
4616 "updateRule": "cascade"
4617 }
4618 },
4619 "nativeEnums": {}
4620 },
4621 {
4622 "columns": {
4623 "id": {
4624 "name": "id",
4625 "type": "text",
4626 "unsigned": false,
4627 "autoincrement": false,
4628 "primary": false,
4629 "nullable": false,
4630 "mappedType": "text"
4631 },
4632 "claim_item_id": {
4633 "name": "claim_item_id",
4634 "type": "text",
4635 "unsigned": false,
4636 "autoincrement": false,
4637 "primary": false,
4638 "nullable": false,
4639 "mappedType": "text"
4640 },
4641 "url": {
4642 "name": "url",
4643 "type": "text",
4644 "unsigned": false,
4645 "autoincrement": false,
4646 "primary": false,
4647 "nullable": false,
4648 "mappedType": "text"
4649 },
4650 "metadata": {
4651 "name": "metadata",
4652 "type": "jsonb",
4653 "unsigned": false,
4654 "autoincrement": false,
4655 "primary": false,
4656 "nullable": true,
4657 "mappedType": "json"
4658 },
4659 "created_at": {
4660 "name": "created_at",
4661 "type": "timestamptz",
4662 "unsigned": false,
4663 "autoincrement": false,
4664 "primary": false,
4665 "nullable": false,
4666 "length": 6,
4667 "default": "now()",
4668 "mappedType": "datetime"
4669 },
4670 "updated_at": {
4671 "name": "updated_at",
4672 "type": "timestamptz",
4673 "unsigned": false,
4674 "autoincrement": false,
4675 "primary": false,
4676 "nullable": false,
4677 "length": 6,
4678 "default": "now()",
4679 "mappedType": "datetime"
4680 },
4681 "deleted_at": {
4682 "name": "deleted_at",
4683 "type": "timestamptz",
4684 "unsigned": false,
4685 "autoincrement": false,
4686 "primary": false,
4687 "nullable": true,
4688 "length": 6,
4689 "mappedType": "datetime"
4690 }
4691 },
4692 "name": "order_claim_item_image",
4693 "schema": "public",
4694 "indexes": [
4695 {
4696 "keyName": "IDX_order_claim_item_image_claim_item_id",
4697 "columnNames": [],
4698 "composite": false,
4699 "constraint": false,
4700 "primary": false,
4701 "unique": false,
4702 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_claim_item_image_claim_item_id\" ON \"order_claim_item_image\" (\"claim_item_id\") WHERE deleted_at IS NULL"
4703 },
4704 {
4705 "keyName": "IDX_order_claim_item_image_deleted_at",
4706 "columnNames": [],
4707 "composite": false,
4708 "constraint": false,
4709 "primary": false,
4710 "unique": false,
4711 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_claim_item_image_deleted_at\" ON \"order_claim_item_image\" (\"deleted_at\") WHERE deleted_at IS NULL"
4712 },
4713 {
4714 "keyName": "IDX_order_claim_item_image_deleted_at",
4715 "columnNames": [],
4716 "composite": false,
4717 "constraint": false,
4718 "primary": false,
4719 "unique": false,
4720 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_claim_item_image_deleted_at\" ON \"order_claim_item_image\" (\"deleted_at\") WHERE deleted_at IS NOT NULL"
4721 },
4722 {
4723 "keyName": "order_claim_item_image_pkey",
4724 "columnNames": ["id"],
4725 "composite": false,
4726 "constraint": true,
4727 "primary": true,
4728 "unique": true
4729 }
4730 ],
4731 "checks": [],
4732 "foreignKeys": {
4733 "order_claim_item_image_claim_item_id_foreign": {
4734 "constraintName": "order_claim_item_image_claim_item_id_foreign",
4735 "columnNames": ["claim_item_id"],
4736 "localTableName": "public.order_claim_item_image",
4737 "referencedColumnNames": ["id"],
4738 "referencedTableName": "public.order_claim_item",
4739 "deleteRule": "cascade",
4740 "updateRule": "cascade"
4741 }
4742 },
4743 "nativeEnums": {}
4744 },
4745 {
4746 "columns": {
4747 "id": {
4748 "name": "id",
4749 "type": "text",
4750 "unsigned": false,
4751 "autoincrement": false,
4752 "primary": false,
4753 "nullable": false,
4754 "mappedType": "text"
4755 },
4756 "value": {
4757 "name": "value",
4758 "type": "text",
4759 "unsigned": false,
4760 "autoincrement": false,
4761 "primary": false,
4762 "nullable": false,
4763 "mappedType": "text"
4764 },
4765 "label": {
4766 "name": "label",
4767 "type": "text",
4768 "unsigned": false,
4769 "autoincrement": false,
4770 "primary": false,
4771 "nullable": false,
4772 "mappedType": "text"
4773 },
4774 "description": {
4775 "name": "description",
4776 "type": "text",
4777 "unsigned": false,
4778 "autoincrement": false,
4779 "primary": false,
4780 "nullable": true,
4781 "mappedType": "text"
4782 },
4783 "metadata": {
4784 "name": "metadata",
4785 "type": "jsonb",
4786 "unsigned": false,
4787 "autoincrement": false,
4788 "primary": false,
4789 "nullable": true,
4790 "mappedType": "json"
4791 },
4792 "parent_return_reason_id": {
4793 "name": "parent_return_reason_id",
4794 "type": "text",
4795 "unsigned": false,
4796 "autoincrement": false,
4797 "primary": false,
4798 "nullable": true,
4799 "mappedType": "text"
4800 },
4801 "created_at": {
4802 "name": "created_at",
4803 "type": "timestamptz",
4804 "unsigned": false,
4805 "autoincrement": false,
4806 "primary": false,
4807 "nullable": false,
4808 "length": 6,
4809 "default": "now()",
4810 "mappedType": "datetime"
4811 },
4812 "updated_at": {
4813 "name": "updated_at",
4814 "type": "timestamptz",
4815 "unsigned": false,
4816 "autoincrement": false,
4817 "primary": false,
4818 "nullable": false,
4819 "length": 6,
4820 "default": "now()",
4821 "mappedType": "datetime"
4822 },
4823 "deleted_at": {
4824 "name": "deleted_at",
4825 "type": "timestamptz",
4826 "unsigned": false,
4827 "autoincrement": false,
4828 "primary": false,
4829 "nullable": true,
4830 "length": 6,
4831 "mappedType": "datetime"
4832 }
4833 },
4834 "name": "return_reason",
4835 "schema": "public",
4836 "indexes": [
4837 {
4838 "keyName": "IDX_return_reason_parent_return_reason_id",
4839 "columnNames": [],
4840 "composite": false,
4841 "constraint": false,
4842 "primary": false,
4843 "unique": false,
4844 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_return_reason_parent_return_reason_id\" ON \"return_reason\" (\"parent_return_reason_id\") WHERE deleted_at IS NULL"
4845 },
4846 {
4847 "keyName": "IDX_return_reason_deleted_at",
4848 "columnNames": [],
4849 "composite": false,
4850 "constraint": false,
4851 "primary": false,
4852 "unique": false,
4853 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_return_reason_deleted_at\" ON \"return_reason\" (\"deleted_at\") WHERE deleted_at IS NULL"
4854 },
4855 {
4856 "keyName": "IDX_return_reason_deleted_at",
4857 "columnNames": [],
4858 "composite": false,
4859 "constraint": false,
4860 "primary": false,
4861 "unique": false,
4862 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_return_reason_deleted_at\" ON \"return_reason\" (\"deleted_at\") WHERE deleted_at IS NOT NULL"
4863 },
4864 {
4865 "keyName": "IDX_return_reason_value",
4866 "columnNames": [],
4867 "composite": false,
4868 "constraint": false,
4869 "primary": false,
4870 "unique": false,
4871 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_return_reason_value\" ON \"return_reason\" (\"value\") WHERE deleted_at IS NULL"
4872 },
4873 {
4874 "keyName": "return_reason_pkey",
4875 "columnNames": ["id"],
4876 "composite": false,
4877 "constraint": true,
4878 "primary": true,
4879 "unique": true
4880 }
4881 ],
4882 "checks": [],
4883 "foreignKeys": {
4884 "return_reason_parent_return_reason_id_foreign": {
4885 "constraintName": "return_reason_parent_return_reason_id_foreign",
4886 "columnNames": ["parent_return_reason_id"],
4887 "localTableName": "public.return_reason",
4888 "referencedColumnNames": ["id"],
4889 "referencedTableName": "public.return_reason",
4890 "deleteRule": "set null",
4891 "updateRule": "cascade"
4892 }
4893 },
4894 "nativeEnums": {}
4895 },
4896 {
4897 "columns": {
4898 "id": {
4899 "name": "id",
4900 "type": "text",
4901 "unsigned": false,
4902 "autoincrement": false,
4903 "primary": false,
4904 "nullable": false,
4905 "mappedType": "text"
4906 },
4907 "quantity": {
4908 "name": "quantity",
4909 "type": "numeric",
4910 "unsigned": false,
4911 "autoincrement": false,
4912 "primary": false,
4913 "nullable": false,
4914 "mappedType": "decimal"
4915 },
4916 "received_quantity": {
4917 "name": "received_quantity",
4918 "type": "numeric",
4919 "unsigned": false,
4920 "autoincrement": false,
4921 "primary": false,
4922 "nullable": false,
4923 "default": "0",
4924 "mappedType": "decimal"
4925 },
4926 "damaged_quantity": {
4927 "name": "damaged_quantity",
4928 "type": "numeric",
4929 "unsigned": false,
4930 "autoincrement": false,
4931 "primary": false,
4932 "nullable": false,
4933 "default": "0",
4934 "mappedType": "decimal"
4935 },
4936 "note": {
4937 "name": "note",
4938 "type": "text",
4939 "unsigned": false,
4940 "autoincrement": false,
4941 "primary": false,
4942 "nullable": true,
4943 "mappedType": "text"
4944 },
4945 "metadata": {
4946 "name": "metadata",
4947 "type": "jsonb",
4948 "unsigned": false,
4949 "autoincrement": false,
4950 "primary": false,
4951 "nullable": true,
4952 "mappedType": "json"
4953 },
4954 "reason_id": {
4955 "name": "reason_id",
4956 "type": "text",
4957 "unsigned": false,
4958 "autoincrement": false,
4959 "primary": false,
4960 "nullable": true,
4961 "mappedType": "text"
4962 },
4963 "return_id": {
4964 "name": "return_id",
4965 "type": "text",
4966 "unsigned": false,
4967 "autoincrement": false,
4968 "primary": false,
4969 "nullable": false,
4970 "mappedType": "text"
4971 },
4972 "item_id": {
4973 "name": "item_id",
4974 "type": "text",
4975 "unsigned": false,
4976 "autoincrement": false,
4977 "primary": false,
4978 "nullable": false,
4979 "mappedType": "text"
4980 },
4981 "raw_quantity": {
4982 "name": "raw_quantity",
4983 "type": "jsonb",
4984 "unsigned": false,
4985 "autoincrement": false,
4986 "primary": false,
4987 "nullable": false,
4988 "mappedType": "json"
4989 },
4990 "raw_received_quantity": {
4991 "name": "raw_received_quantity",
4992 "type": "jsonb",
4993 "unsigned": false,
4994 "autoincrement": false,
4995 "primary": false,
4996 "nullable": false,
4997 "default": "'{\"value\":\"0\",\"precision\":20}'",
4998 "mappedType": "json"
4999 },
5000 "raw_damaged_quantity": {
Showing first 5,000 of 5,133 lines. View raw