M220928064924AlterQimallAddonsMarketingSettingToContentModify.php 985 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. namespace app\migrations;
  3. use yii\db\Migration;
  4. /**
  5. *
  6. * Class M220928064924AlterQimallAddonsMarketingSettingToContentModify
  7. */
  8. class M220928064924AlterQimallAddonsMarketingSettingToContentModify extends Migration
  9. {
  10. /**
  11. * {@inheritdoc}
  12. */
  13. public function safeUp()
  14. {
  15. try {
  16. $sql = "ALTER TABLE qimall_addons_marketing_setting modify column content LONGTEXT";
  17. $this->execute($sql);
  18. } catch (\Exception $e) {
  19. }
  20. }
  21. /**
  22. * {@inheritdoc}
  23. */
  24. public function safeDown()
  25. {
  26. echo "M220928064924AlterQimallAddonsMarketingSettingToContentModify 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 "M220928064924AlterQimallAddonsMarketingSettingToContentModify cannot be reverted.\n";
  37. return false;
  38. }
  39. */
  40. }