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