@@ -37,13 +37,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
3737 ['identity ' => true , 'unsigned ' => true , 'nullable ' => false , 'primary ' => true ],
3838 'Entity ID '
3939 )
40- ->addColumn (
41- 'entity_type_id ' ,
42- \Magento \Framework \DB \Ddl \Table::TYPE_SMALLINT ,
43- null ,
44- ['unsigned ' => true , 'nullable ' => false , 'default ' => '0 ' ],
45- 'Entity Type ID '
46- )
4740 ->addColumn (
4841 'attribute_set_id ' ,
4942 \Magento \Framework \DB \Ddl \Table::TYPE_SMALLINT ,
@@ -93,10 +86,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
9386 [],
9487 'Update Time '
9588 )
96- ->addIndex (
97- $ installer ->getIdxName ('catalog_product_entity ' , ['entity_type_id ' ]),
98- ['entity_type_id ' ]
99- )
10089 ->addIndex (
10190 $ installer ->getIdxName ('catalog_product_entity ' , ['attribute_set_id ' ]),
10291 ['attribute_set_id ' ]
@@ -117,13 +106,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
117106 'attribute_set_id ' ,
118107 \Magento \Framework \DB \Ddl \Table::ACTION_CASCADE
119108 )
120- ->addForeignKey (
121- $ installer ->getFkName ('catalog_product_entity ' , 'entity_type_id ' , 'eav_entity_type ' , 'entity_type_id ' ),
122- 'entity_type_id ' ,
123- $ installer ->getTable ('eav_entity_type ' ),
124- 'entity_type_id ' ,
125- \Magento \Framework \DB \Ddl \Table::ACTION_CASCADE
126- )
127109 ->setComment ('Catalog Product Table ' );
128110 $ installer ->getConnection ()->createTable ($ table );
129111
@@ -139,13 +121,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
139121 ['identity ' => true , 'nullable ' => false , 'primary ' => true ],
140122 'Value ID '
141123 )
142- ->addColumn (
143- 'entity_type_id ' ,
144- \Magento \Framework \DB \Ddl \Table::TYPE_SMALLINT ,
145- null ,
146- ['unsigned ' => true , 'nullable ' => false , 'default ' => '0 ' ],
147- 'Entity Type ID '
148- )
149124 ->addColumn (
150125 'attribute_id ' ,
151126 \Magento \Framework \DB \Ddl \Table::TYPE_SMALLINT ,
@@ -237,13 +212,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
237212 ['identity ' => true , 'nullable ' => false , 'primary ' => true ],
238213 'Value ID '
239214 )
240- ->addColumn (
241- 'entity_type_id ' ,
242- \Magento \Framework \DB \Ddl \Table::TYPE_SMALLINT ,
243- null ,
244- ['unsigned ' => true , 'nullable ' => false , 'default ' => '0 ' ],
245- 'Entity Type ID '
246- )
247215 ->addColumn (
248216 'attribute_id ' ,
249217 \Magento \Framework \DB \Ddl \Table::TYPE_SMALLINT ,
@@ -335,13 +303,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
335303 ['identity ' => true , 'nullable ' => false , 'primary ' => true ],
336304 'Value ID '
337305 )
338- ->addColumn (
339- 'entity_type_id ' ,
340- \Magento \Framework \DB \Ddl \Table::TYPE_INTEGER ,
341- null ,
342- ['unsigned ' => true , 'nullable ' => false , 'default ' => '0 ' ],
343- 'Entity Type ID '
344- )
345306 ->addColumn (
346307 'attribute_id ' ,
347308 \Magento \Framework \DB \Ddl \Table::TYPE_SMALLINT ,
@@ -423,13 +384,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
423384 ['identity ' => true , 'nullable ' => false , 'primary ' => true ],
424385 'Value ID '
425386 )
426- ->addColumn (
427- 'entity_type_id ' ,
428- \Magento \Framework \DB \Ddl \Table::TYPE_INTEGER ,
429- null ,
430- ['unsigned ' => true , 'nullable ' => false , 'default ' => '0 ' ],
431- 'Entity Type ID '
432- )
433387 ->addColumn (
434388 'attribute_id ' ,
435389 \Magento \Framework \DB \Ddl \Table::TYPE_SMALLINT ,
@@ -521,13 +475,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
521475 ['identity ' => true , 'nullable ' => false , 'primary ' => true ],
522476 'Value ID '
523477 )
524- ->addColumn (
525- 'entity_type_id ' ,
526- \Magento \Framework \DB \Ddl \Table::TYPE_INTEGER ,
527- null ,
528- ['unsigned ' => true , 'nullable ' => false , 'default ' => '0 ' ],
529- 'Entity Type ID '
530- )
531478 ->addColumn (
532479 'attribute_id ' ,
533480 \Magento \Framework \DB \Ddl \Table::TYPE_SMALLINT ,
@@ -619,13 +566,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
619566 ['identity ' => true , 'nullable ' => false , 'primary ' => true ],
620567 'Value ID '
621568 )
622- ->addColumn (
623- 'entity_type_id ' ,
624- \Magento \Framework \DB \Ddl \Table::TYPE_SMALLINT ,
625- null ,
626- ['unsigned ' => true , 'nullable ' => false , 'default ' => '0 ' ],
627- 'Entity Type ID '
628- )
629569 ->addColumn (
630570 'attribute_id ' ,
631571 \Magento \Framework \DB \Ddl \Table::TYPE_SMALLINT ,
@@ -664,10 +604,10 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
664604 ->addIndex (
665605 $ installer ->getIdxName (
666606 'catalog_product_entity_gallery ' ,
667- ['entity_type_id ' , ' entity_id ' , 'attribute_id ' , 'store_id ' ],
607+ ['entity_id ' , 'attribute_id ' , 'store_id ' ],
668608 \Magento \Framework \DB \Adapter \AdapterInterface::INDEX_TYPE_UNIQUE
669609 ),
670- ['entity_type_id ' , ' entity_id ' , 'attribute_id ' , 'store_id ' ],
610+ ['entity_id ' , 'attribute_id ' , 'store_id ' ],
671611 ['type ' => \Magento \Framework \DB \Adapter \AdapterInterface::INDEX_TYPE_UNIQUE ]
672612 )
673613 ->addIndex (
@@ -728,13 +668,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
728668 ['identity ' => true , 'unsigned ' => true , 'nullable ' => false , 'primary ' => true ],
729669 'Entity ID '
730670 )
731- ->addColumn (
732- 'entity_type_id ' ,
733- \Magento \Framework \DB \Ddl \Table::TYPE_SMALLINT ,
734- null ,
735- ['unsigned ' => true , 'nullable ' => false , 'default ' => '0 ' ],
736- 'Entity Type ID '
737- )
738671 ->addColumn (
739672 'attribute_set_id ' ,
740673 \Magento \Framework \DB \Ddl \Table::TYPE_SMALLINT ,
@@ -810,13 +743,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
810743 ['identity ' => true , 'nullable ' => false , 'primary ' => true ],
811744 'Value ID '
812745 )
813- ->addColumn (
814- 'entity_type_id ' ,
815- \Magento \Framework \DB \Ddl \Table::TYPE_SMALLINT ,
816- null ,
817- ['unsigned ' => true , 'nullable ' => false , 'default ' => '0 ' ],
818- 'Entity Type ID '
819- )
820746 ->addColumn (
821747 'attribute_id ' ,
822748 \Magento \Framework \DB \Ddl \Table::TYPE_SMALLINT ,
@@ -848,10 +774,10 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
848774 ->addIndex (
849775 $ installer ->getIdxName (
850776 'catalog_category_entity_datetime ' ,
851- ['entity_type_id ' , ' entity_id ' , 'attribute_id ' , 'store_id ' ],
777+ ['entity_id ' , 'attribute_id ' , 'store_id ' ],
852778 \Magento \Framework \DB \Adapter \AdapterInterface::INDEX_TYPE_UNIQUE
853779 ),
854- ['entity_type_id ' , ' entity_id ' , 'attribute_id ' , 'store_id ' ],
780+ ['entity_id ' , 'attribute_id ' , 'store_id ' ],
855781 ['type ' => \Magento \Framework \DB \Adapter \AdapterInterface::INDEX_TYPE_UNIQUE ]
856782 )
857783 ->addIndex (
@@ -912,13 +838,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
912838 ['identity ' => true , 'nullable ' => false , 'primary ' => true ],
913839 'Value ID '
914840 )
915- ->addColumn (
916- 'entity_type_id ' ,
917- \Magento \Framework \DB \Ddl \Table::TYPE_SMALLINT ,
918- null ,
919- ['unsigned ' => true , 'nullable ' => false , 'default ' => '0 ' ],
920- 'Entity Type ID '
921- )
922841 ->addColumn (
923842 'attribute_id ' ,
924843 \Magento \Framework \DB \Ddl \Table::TYPE_SMALLINT ,
@@ -950,10 +869,10 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
950869 ->addIndex (
951870 $ installer ->getIdxName (
952871 'catalog_category_entity_decimal ' ,
953- [' entity_type_id ' , 'entity_id ' , 'attribute_id ' , 'store_id ' ],
872+ [ 'entity_id ' , 'attribute_id ' , 'store_id ' ],
954873 \Magento \Framework \DB \Adapter \AdapterInterface::INDEX_TYPE_UNIQUE
955874 ),
956- ['entity_type_id ' , ' entity_id ' , 'attribute_id ' , 'store_id ' ],
875+ ['entity_id ' , 'attribute_id ' , 'store_id ' ],
957876 ['type ' => \Magento \Framework \DB \Adapter \AdapterInterface::INDEX_TYPE_UNIQUE ]
958877 )
959878 ->addIndex (
@@ -1014,13 +933,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
1014933 ['identity ' => true , 'nullable ' => false , 'primary ' => true ],
1015934 'Value ID '
1016935 )
1017- ->addColumn (
1018- 'entity_type_id ' ,
1019- \Magento \Framework \DB \Ddl \Table::TYPE_SMALLINT ,
1020- null ,
1021- ['unsigned ' => true , 'nullable ' => false , 'default ' => '0 ' ],
1022- 'Entity Type ID '
1023- )
1024936 ->addColumn (
1025937 'attribute_id ' ,
1026938 \Magento \Framework \DB \Ddl \Table::TYPE_SMALLINT ,
@@ -1052,10 +964,10 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
1052964 ->addIndex (
1053965 $ installer ->getIdxName (
1054966 'catalog_category_entity_int ' ,
1055- ['entity_type_id ' , ' entity_id ' , 'attribute_id ' , 'store_id ' ],
967+ ['entity_id ' , 'attribute_id ' , 'store_id ' ],
1056968 \Magento \Framework \DB \Adapter \AdapterInterface::INDEX_TYPE_UNIQUE
1057969 ),
1058- ['entity_type_id ' , ' entity_id ' , 'attribute_id ' , 'store_id ' ],
970+ ['entity_id ' , 'attribute_id ' , 'store_id ' ],
1059971 ['type ' => \Magento \Framework \DB \Adapter \AdapterInterface::INDEX_TYPE_UNIQUE ]
1060972 )
1061973 ->addIndex (
@@ -1111,13 +1023,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
11111023 ['identity ' => true , 'nullable ' => false , 'primary ' => true ],
11121024 'Value ID '
11131025 )
1114- ->addColumn (
1115- 'entity_type_id ' ,
1116- \Magento \Framework \DB \Ddl \Table::TYPE_SMALLINT ,
1117- null ,
1118- ['unsigned ' => true , 'nullable ' => false , 'default ' => '0 ' ],
1119- 'Entity Type ID '
1120- )
11211026 ->addColumn (
11221027 'attribute_id ' ,
11231028 \Magento \Framework \DB \Ddl \Table::TYPE_SMALLINT ,
@@ -1149,10 +1054,10 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
11491054 ->addIndex (
11501055 $ installer ->getIdxName (
11511056 'catalog_category_entity_text ' ,
1152- ['entity_type_id ' , ' entity_id ' , 'attribute_id ' , 'store_id ' ],
1057+ ['entity_id ' , 'attribute_id ' , 'store_id ' ],
11531058 \Magento \Framework \DB \Adapter \AdapterInterface::INDEX_TYPE_UNIQUE
11541059 ),
1155- ['entity_type_id ' , ' entity_id ' , 'attribute_id ' , 'store_id ' ],
1060+ ['entity_id ' , 'attribute_id ' , 'store_id ' ],
11561061 ['type ' => \Magento \Framework \DB \Adapter \AdapterInterface::INDEX_TYPE_UNIQUE ]
11571062 )
11581063 ->addIndex (
@@ -1208,13 +1113,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
12081113 ['identity ' => true , 'nullable ' => false , 'primary ' => true ],
12091114 'Value ID '
12101115 )
1211- ->addColumn (
1212- 'entity_type_id ' ,
1213- \Magento \Framework \DB \Ddl \Table::TYPE_SMALLINT ,
1214- null ,
1215- ['unsigned ' => true , 'nullable ' => false , 'default ' => '0 ' ],
1216- 'Entity Type ID '
1217- )
12181116 ->addColumn (
12191117 'attribute_id ' ,
12201118 \Magento \Framework \DB \Ddl \Table::TYPE_SMALLINT ,
@@ -1246,10 +1144,10 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
12461144 ->addIndex (
12471145 $ installer ->getIdxName (
12481146 'catalog_category_entity_varchar ' ,
1249- ['entity_type_id ' , ' entity_id ' , 'attribute_id ' , 'store_id ' ],
1147+ ['entity_id ' , 'attribute_id ' , 'store_id ' ],
12501148 \Magento \Framework \DB \Adapter \AdapterInterface::INDEX_TYPE_UNIQUE
12511149 ),
1252- ['entity_type_id ' , ' entity_id ' , 'attribute_id ' , 'store_id ' ],
1150+ ['entity_id ' , 'attribute_id ' , 'store_id ' ],
12531151 ['type ' => \Magento \Framework \DB \Adapter \AdapterInterface::INDEX_TYPE_UNIQUE ]
12541152 )
12551153 ->addIndex (
@@ -4659,7 +4557,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
46594557 );
46604558 $ installer ->getConnection ()
46614559 ->createTable ($ table );
4662-
46634560 $ installer ->endSetup ();
46644561
46654562 }
0 commit comments