M240411071352StoreWithdrawFeeAddField.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. namespace addons\Store\console\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M240411071352StoreWithdrawFeeAddField
  6. */
  7. class M240411071352StoreWithdrawFeeAddField extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $this->execute("ALTER TABLE `qimall_addons_store_settings`
  15. ADD COLUMN `is_enable_withdraw_setting` TINYINT(1) NOT NULL DEFAULT '0' COMMENT '商家提现设置',
  16. ADD COLUMN `balance_cash_service_fee_limit` TINYINT(1) NOT NULL DEFAULT '0' COMMENT '阶梯手续费' AFTER `is_enable_withdraw_setting`,
  17. ADD COLUMN `balance_cash_service_fee` DECIMAL(5,2) NOT NULL DEFAULT 0 COMMENT '提现手续费' AFTER `balance_cash_service_fee_limit`,
  18. ADD COLUMN `balance_cash_service_fee_diff` DECIMAL(5,2) NOT NULL DEFAULT 0 COMMENT '阶梯提现手续费' AFTER `balance_cash_service_fee`,
  19. ADD COLUMN `balance_cash_service_fee_month` DECIMAL(10,2) NOT NULL DEFAULT 0 COMMENT '每月免额额度' AFTER `balance_cash_service_fee_diff`;");
  20. }
  21. /**
  22. * {@inheritdoc}
  23. */
  24. public function safeDown()
  25. {
  26. echo "M240411071352StoreWithdrawFeeAddField cannot be reverted.\n";
  27. return false;
  28. }
  29. /*
  30. // Use up()/down() to run migration code without a transaction.
  31. public function up()
  32. {
  33. }
  34. public function down()
  35. {
  36. echo "M240411071352StoreWithdrawFeeAddField cannot be reverted.\n";
  37. return false;
  38. }
  39. */
  40. }