M230225093250AlterQimallAddonsStoreCate.php 832 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace addons\Store\console\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M230225093250AlterQimallAddonsStoreCate
  6. */
  7. class M230225093250AlterQimallAddonsStoreCate extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $sql = "ALTER TABLE `qimall_addons_store_cate` MODIFY COLUMN `advert_pic` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '广告图片' AFTER `big_pic`;";
  15. $this->execute($sql);
  16. }
  17. /**
  18. * {@inheritdoc}
  19. */
  20. public function safeDown()
  21. {
  22. }
  23. /*
  24. // Use up()/down() to run migration code without a transaction.
  25. public function up()
  26. {
  27. }
  28. public function down()
  29. {
  30. echo "M230225093250AlterQimallAddonsStoreCate cannot be reverted.\n";
  31. return false;
  32. }
  33. */
  34. }