| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace addons\Store\console\migrations;
- use yii\db\Migration;
- /**
- * Class M230116033141AddStoreSendCommissionToQimallAddonsStoreCommission
- */
- class M230116033141AddStoreSendCommissionToQimallAddonsStoreCommission extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql = "ALTER TABLE `qimall_addons_store_commission`
- ADD COLUMN `store_send_commission` decimal(12,2) NOT NULL DEFAULT 0 COMMENT '门店直接发放佣金,不包含平台设置的插件佣金' AFTER `settle_type`;";
- $this->execute($sql);
- }catch (\Exception $e){
- var_dump($e->getMessage());
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230116033141AddStoreSendCommissionToQimallAddonsStoreCommission cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230116033141AddStoreSendCommissionToQimallAddonsStoreCommission cannot be reverted.\n";
- return false;
- }
- */
- }
|