V20181212Command.php 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace App\Console\Commands\Upgrade;
  3. use Illuminate\Console\Command;
  4. class V20181212Command extends Command
  5. {
  6. protected $signature = "upgrade:v20181212";
  7. protected $description = "版本升级脚本|2018-12-12号更新版本升级\n
  8. 更新内容:\n
  9. 1. 修改契约数据库架构设计,适应报名+邀请两种参加活动的方式\n
  10. 2. 更具新架构修改报名、邀请分别与契约的关联逻辑\n
  11. 3. 增加「匹配契约晚安」功能\n
  12. 4. 增加「邀请参加契约晚安」功能\n
  13. 脚本内容: \n
  14. 1. 修正旧数据的邀请-契约关联\n";
  15. public function handle()
  16. {
  17. $this->upgradeDeed();
  18. }
  19. private function upgradeDeed()
  20. {
  21. dump("「修正旧数据的邀请-契约关联」开始");
  22. \DB::update("update kdgx_fpdx_deed set way = 1, `way_id` = `ack` where `type`=0 and `way_id` is null ");
  23. \DB::update("update kdgx_fpdx_deed set way = 0, `way_id` = `ack` where `type` != 0 and `way_id` is null ");
  24. dump("「修正旧数据的邀请-契约关联」开始");
  25. }
  26. }