| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- namespace addons\Store\console\migrations;
- use yii\db\Migration;
- /**
- * Class M231024105134StoreDeleteAfterDeleteReduceProfit
- */
- class M231024105134StoreDeleteAfterDeleteReduceProfit extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $this->execute("UPDATE qimall_addons_store_merchant_reduce_profit SET `status` = -1 WHERE source_id IN (SELECT id FROM qimall_addons_store WHERE `status` = -1) AND `source` = 'Store' AND `status` = 1");
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M231024105134StoreDeleteAfterDeleteReduceProfit cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M231024105134StoreDeleteAfterDeleteReduceProfit cannot be reverted.\n";
- return false;
- }
- */
- }
|