addColumn('{{%goods_extra}}', 'member_price_switch', $this->tinyInteger(4)->defaultValue(0)->comment('是否单独设置会员价')); }catch (\Exception $e){ } } /** * {@inheritdoc} */ public function safeDown() { $this->dropColumn('{{%goods_extra}}', 'member_price_switch'); } /* // Use up()/down() to run migration code without a transaction. public function up() { } public function down() { echo "M230109084131AddMemberPriceSwitchToGoodsExtra cannot be reverted.\n"; return false; } */ }