M230908065027UpdateData.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. namespace app\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M230908065027UpdateData
  6. */
  7. class M230908065027UpdateData extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. try {
  15. $sql ="UPDATE qimall_addons set title = '团队数据' where name = 'TeamData';";
  16. $this->execute($sql);
  17. $sql = "UPDATE qimall_addons set brief_introduction='团队业绩阶梯奖励' where name = 'Achievement';";
  18. $this->execute($sql);
  19. $sql = "UPDATE qimall_addons set brief_introduction='三三复制团队快速裂变' where name = 'Rebate';";
  20. $this->execute($sql);
  21. $sql = "UPDATE qimall_addons set brief_introduction='生成授权证书,代理快速发展团队' where name = 'Certificate';";
  22. $this->execute($sql);
  23. }catch (\Exception $e){
  24. }
  25. }
  26. /**
  27. * {@inheritdoc}
  28. */
  29. public function safeDown()
  30. {
  31. echo "M230908065027UpdateData cannot be reverted.\n";
  32. return false;
  33. }
  34. /*
  35. // Use up()/down() to run migration code without a transaction.
  36. public function up()
  37. {
  38. }
  39. public function down()
  40. {
  41. echo "M230908065027UpdateData cannot be reverted.\n";
  42. return false;
  43. }
  44. */
  45. }