execute($sql); $list = StoreAdmin::lists(['where' => [['>', 'id', 0]]], false); foreach ($list as $item) { $item->id = $start++; $item->save(); } } /** * {@inheritdoc} */ public function safeDown() { echo "M240705101952AlterQimallAddonsStoreAdmin cannot be reverted.\n"; return false; } /* // Use up()/down() to run migration code without a transaction. public function up() { } public function down() { echo "M240705101952AlterQimallAddonsStoreAdmin cannot be reverted.\n"; return false; } */ }