db->createCommand($sql)->queryAll(); if ($list) { $sql = "update `qimall_link_category` set `name` = 'store_commodity_cate' where `name` = 'store-commodity-cate' and `pid` = ".$list[0]['id'].";"; $this->execute($sql); } } /** * {@inheritdoc} */ public function safeDown() { echo "M250902104649InsertQimallLinkCategory cannot be reverted.\n"; return false; } /* // Use up()/down() to run migration code without a transaction. public function up() { } public function down() { echo "M250726084649InsertQimallLinkCategory cannot be reverted.\n"; return false; } */ }