| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M230116011853AddColumnBalanceGiveSettingQimallGoods
- */
- class M230116011853AddColumnBalanceGiveSettingQimallGoodsExtra extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql="alter table qimall_goods_extra add `balance_give_setting` text COMMENT '余额赠送设置' after score_give_setting";
- $this->execute($sql);
- $sql="alter table qimall_order_marketing add `give_balance_settlement` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '赠送余额的结算方式:0:订单完成,1:支付完成' after give_score_settlement";
- $this->execute($sql);
- }catch (\Exception $e){
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230116011853AddColumnBalanceGiveSettingQimallGoods cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230116011853AddColumnBalanceGiveSettingQimallGoods cannot be reverted.\n";
- return false;
- }
- */
- }
|