| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M250513101331UpdateDiyPageUrlData
- */
- class M250513101331UpdateDiyPageUrlData extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = <<<SQL
- update qimall_diy_page set content=REPLACE(content, 'plugins8/Clinic', 'customDesigns/Clinic');
- update qimall_diy_page set content=REPLACE(content, 'plugins8/Farm', 'customAddons/Farm');
- update qimall_diy_page set content=REPLACE(content, 'plugins8/LaoDaFu', 'customDesigns/LaoDaFu');
- update qimall_diy_page set content=REPLACE(content, 'plugins8/MakerCar', 'customAddons/MakerCar');
- update qimall_diy_page set content=REPLACE(content, 'plugins8/ScoreGame', 'customAddons/ScoreGame');
- update qimall_diy_page set content=REPLACE(content, 'plugins8/TestReportFile', 'customAddons/TestReportFile');
- update qimall_addons_marketing_setting set content=REPLACE(content, 'plugins8/Clinic', 'customDesigns/Clinic');
- update qimall_addons_marketing_setting set content=REPLACE(content, 'plugins8/Farm', 'customAddons/Farm');
- update qimall_addons_marketing_setting set content=REPLACE(content, 'plugins8/LaoDaFu', 'customDesigns/LaoDaFu');
- update qimall_addons_marketing_setting set content=REPLACE(content, 'plugins8/MakerCar', 'customAddons/MakerCar');
- update qimall_addons_marketing_setting set content=REPLACE(content, 'plugins8/ScoreGame', 'customAddons/ScoreGame');
- update qimall_addons_marketing_setting set content=REPLACE(content, 'plugins8/TestReportFile', 'customAddons/TestReportFile');
- SQL;
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M250513101331UpdateDiyPageUrlData cannot be reverted.\n";
- return false;
- }
- */
- }
|