Я пытаюсь добавить другой столбец в таблицу цитат для Magento 2.
Приложение / Код / [CompanyName] / [Модуль] /Setup/UpgradeSchema.php
Вот мой код:
use Magento\Framework\Setup\UpgradeSchemaInterface;
use Magento\Framework\Setup\SchemaSetupInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Quote\Setup\QuoteSetupFactory;
use Magento\Framework\DB\Ddl\Table;
use Magento\Quote\Setup\QuoteSetup;
class UpgradeSchema implements UpgradeSchemaInterface
{
public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $context)
{
$installer = $setup;
$installer->startSetup();
$connection = $installer->getConnection();
$connection->addColumn($installer->getTable('quote'), 'can_ship_partially', [
'type' => Table::TYPE_SMALLINT,
'nullable' => true,
'comment' => 'Custom can ship partial'
]);
$installer->endSetup();
}
}//End of class
Но когда я запускаю sudo php bin/magento setup:upgrade
, столбец can_ship_partially
никогда не появляется в таблице котировок. Может кто-нибудь сказать мне, что я сделал не так, пожалуйста. Спасибо