| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace addons\Store\console\migrations;
- use common\enums\RabbitMqEnum;
- use yii\db\Migration;
- /**
- * Class M250916012147AlterQimallAddonsStoreCensus
- */
- class M250916012147AlterQimallAddonsStoreCensus extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = "ALTER TABLE `qimall_addons_store_census`
- ADD COLUMN `order_refund_money` decimal(12, 2) NOT NULL DEFAULT '0' COMMENT '订单售后金额';";
- $this->execute($sql);
- \Yii::$app->services->rabbitMq->push(RabbitMqEnum::EXCHANGE_LONG_DURATION, RabbitMqEnum::LONG_DURATION_QUEUE,
- [], \addons\Store\common\models\StoreCensus::class, 'historyOrderRefund');
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M250916012147AlterQimallAddonsStoreCensus cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M250916012147AlterQimallAddonsStoreCensus cannot be reverted.\n";
- return false;
- }
- */
- }
|