| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- namespace addons\Store\console\migrations;
- use addons\Store\common\services\StoreFinanceService;
- use common\enums\RabbitMqEnum;
- use yii\db\Migration;
- /**
- * Class M250703072236AlterQimallAddonsStoreCensus
- */
- class M250703072236AlterQimallAddonsStoreCensus extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = "ALTER TABLE `qimall_addons_store_census`
- ADD COLUMN `cashier_order_nums` int(11) NOT NULL DEFAULT 0 COMMENT '收银台订单数';";
- $this->execute($sql);
- \Yii::$app->services->rabbitMq->push(RabbitMqEnum::EXCHANGE_LONG_DURATION, RabbitMqEnum::LONG_DURATION_QUEUE, [], StoreFinanceService::class, 'staticsCashierOrderNum');
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M250703072236AlterQimallAddonsStoreCensus cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M250703072236AlterQimallAddonsStoreCensus cannot be reverted.\n";
- return false;
- }
- */
- }
|