M230906092335UpdateQimallAddons.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. namespace app\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M230906092335UpdateQimallAddons
  6. */
  7. class M230906092335UpdateQimallAddons extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. try {
  15. $sql="UPDATE qimall_addons set title = '渠道分红', brief_introduction='渠道作战,让销量翻番' where name = 'Agent';";
  16. $this->execute($sql);
  17. $sql ="UPDATE qimall_addons set title = '渠道数据' where name = 'TeamData';";
  18. $this->execute($sql);
  19. $sql = "UPDATE qimall_addons set brief_introduction='渠道业绩阶梯奖励' where name = 'Achievement';";
  20. $this->execute($sql);
  21. $sql = "UPDATE qimall_addons set brief_introduction='三三复制渠道快速裂变' where name = 'Rebate';";
  22. $this->execute($sql);
  23. $sql = "UPDATE qimall_addons set brief_introduction='生成授权证书,代理快速发展渠道' where name = 'Certificate';";
  24. $this->execute($sql);
  25. $sql ="UPDATE qimall_global_var_map set title = '渠道分红' where name = 'Agent';";
  26. $this->execute($sql);
  27. $sql = "UPDATE qimall_global_var_map set title = '渠道奖励' where name = 'team';";
  28. $this->execute($sql);
  29. $sql = "UPDATE qimall_global_var_map set title = '渠道业绩额外奖励' where name = 'team_achievement_extra';";
  30. $this->execute($sql);
  31. $sql="UPDATE qimall_global_var_map set title = '渠道补贴' where name = 'team_subsidy';";
  32. $this->execute($sql);
  33. }catch (\Exception $e){
  34. }
  35. }
  36. /**
  37. * {@inheritdoc}
  38. */
  39. public function safeDown()
  40. {
  41. echo "M230906092335UpdateQimallAddons cannot be reverted.\n";
  42. return false;
  43. }
  44. /*
  45. // Use up()/down() to run migration code without a transaction.
  46. public function up()
  47. {
  48. }
  49. public function down()
  50. {
  51. echo "M230906092335UpdateQimallAddons cannot be reverted.\n";
  52. return false;
  53. }
  54. */
  55. }