M241127075452AlterQimallUserWithdrawLog.php 904 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace app\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M241127075452AlterQimallUserWithdrawLog
  6. */
  7. class M241127075452AlterQimallUserWithdrawLog extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. return true;
  15. $sql = "alter table qimall_user_withdraw_log add `source` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '来源';";
  16. $this->execute($sql);
  17. }
  18. /**
  19. * {@inheritdoc}
  20. */
  21. public function safeDown()
  22. {
  23. echo "M241127075452AlterQimallUserWithdrawLog cannot be reverted.\n";
  24. return false;
  25. }
  26. /*
  27. // Use up()/down() to run migration code without a transaction.
  28. public function up()
  29. {
  30. }
  31. public function down()
  32. {
  33. echo "M241127075452AlterQimallUserWithdrawLog cannot be reverted.\n";
  34. return false;
  35. }
  36. */
  37. }