3
Magento2 InstallSchema เพิ่มคอลัมน์ใหม่ลงในตารางที่มีอยู่
ฉันพยายามเพิ่มคอลัมน์ใหม่ลงในตารางที่มีอยู่ใน magento2 <?php namespace Vendor\Module\Setup; use Magento\Framework\Setup\InstallSchemaInterface; use Magento\Framework\Setup\ModuleContextInterface; use Magento\Framework\Setup\SchemaSetupInterface; /** * @codeCoverageIgnore */ class InstallSchema implements InstallSchemaInterface { /** * {@inheritdoc} * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function install(SchemaSetupInterface $setup, ModuleContextInterface $context) { $installer = $setup; $installer->startSetup(); $eavTable = $installer->getTable('eav_attribute'); $columns = [ 'my_column' => [ 'type' => \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, 'length' …