db->schema->getTableSchema("qimall_addons_store_coupon_member_relate", true); if (!$res->getColumn('mall_id')) { $sql = "ALTER TABLE `qimall_addons_store_coupon_member_relate` ADD COLUMN `mall_id` int(11) NOT NULL DEFAULT '0' COMMENT '商城ID';"; $this->execute($sql); } } /** * {@inheritdoc} */ public function safeDown() { } /* // Use up()/down() to run migration code without a transaction. public function up() { } public function down() { echo "M230222023350AlterMallIdToAddonsStoreCouponMemberRelate cannot be reverted.\n"; return false; } */ }