M250329020248AddTypeToWithdrawsLimitLog.php 895 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace app\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M250329020248AddTypeToWithdrawsLimitLog
  6. */
  7. class M250329020248AddTypeToWithdrawsLimitLog extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $sql = <<<SQL
  15. ALTER TABLE `qimall_withdraws_limit_log`
  16. ADD COLUMN `type` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '0:公共额度(如果开启提现余额限额则不包含余额的额度),1:提现余额额度';
  17. SQL;
  18. $this->execute($sql);
  19. }
  20. /**
  21. * {@inheritdoc}
  22. */
  23. public function safeDown()
  24. {
  25. return false;
  26. }
  27. /*
  28. // Use up()/down() to run migration code without a transaction.
  29. public function up()
  30. {
  31. }
  32. public function down()
  33. {
  34. echo "M250329020248AddTypeToWithdrawsLimitLog cannot be reverted.\n";
  35. return false;
  36. }
  37. */
  38. }