|
11 | 11 | use Magento\Framework\Setup\ModuleContextInterface;
|
12 | 12 | use Magento\Framework\Setup\SchemaSetupInterface;
|
13 | 13 | use Magento\Framework\Setup\UpgradeSchemaInterface;
|
| 14 | +use Magento\Framework\DB\Ddl\Table; |
14 | 15 |
|
15 | 16 | /**
|
16 | 17 | * Upgrade the Catalog module DB scheme
|
@@ -80,6 +81,37 @@ public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $con
|
80 | 81 | 'catalog_category_product_index_replica'
|
81 | 82 | );
|
82 | 83 | }
|
| 84 | + |
| 85 | + if (version_compare($context->getVersion(), '2.2.2', '<')) { |
| 86 | + $tables = [ |
| 87 | + 'catalog_product_entity_tier_price', |
| 88 | + 'catalog_product_index_price_cfg_opt_agr_idx', |
| 89 | + 'catalog_product_index_price_cfg_opt_agr_tmp', |
| 90 | + 'catalog_product_index_price_cfg_opt_idx', |
| 91 | + 'catalog_product_index_price_cfg_opt_tmp', |
| 92 | + 'catalog_product_index_price_final_idx', |
| 93 | + 'catalog_product_index_price_final_tmp', |
| 94 | + 'catalog_product_index_price_idx', |
| 95 | + 'catalog_product_index_price_opt_agr_idx', |
| 96 | + 'catalog_product_index_price_opt_agr_tmp', |
| 97 | + 'catalog_product_index_price_opt_idx', |
| 98 | + 'catalog_product_index_price_opt_tmp', |
| 99 | + 'catalog_product_index_price_tmp', |
| 100 | + ]; |
| 101 | + foreach ($tables as $table) { |
| 102 | + $setup->getConnection()->modifyColumn( |
| 103 | + $setup->getTable($table), |
| 104 | + 'customer_group_id', |
| 105 | + [ |
| 106 | + 'type' => Table::TYPE_INTEGER, |
| 107 | + 'nullable' => false, |
| 108 | + 'unsigned' => true, |
| 109 | + 'default' => '0', |
| 110 | + 'comment' => 'Customer Group ID', |
| 111 | + ] |
| 112 | + ); |
| 113 | + } |
| 114 | + } |
83 | 115 | $setup->endSetup();
|
84 | 116 | }
|
85 | 117 |
|
|
0 commit comments