升级指南

v1.0.3 到 v1.1 升级指南

步骤

  1. 下载补丁文件

    https://github.com/gopeak/masterlab/releases/download/v1.1/up_v1.0.3-to-v1.1.zip

  2. 将补丁包的文件覆盖原来的代码

  3. 在数据库中执行补丁包的更新Sql文件

    upgrade\database\up-v1.0.3-to-1.1.sql
  4. 修改masterlab_socket服务器的配置文件 bin/config.toml

     # 修改Mysql数据库和redis服务的连接配置
      [mysql]
          database   =   "masterlab"   
          host        =   "localhost"
          port       =   "3306"        
          user       =   "root"
          password   =   ""
          charset        =   "utf8mb4_unicode_ci"
          timeout        =   "10"
          max_open_conns = 2000
          max_idle_conns = 1000
    
      [object]
          data_type  = "redis"
          redis_host     = "127.0.0.1"
          redis_port     = "6379"
          redis_password = ""

    修改masterlab_socket服务器的cron文件 bin/cron.json
    修改 exe_bin 为php的实际路径, 修改 file 为实际的文件路径

    
       {
         "desc": "Project compute",
         "schedule": [
           {
             "name": "ProjectStat 每个半小时执行一次",
             "exe_bin": "/usr/bin/php", 
             "exp": "0 */30 * * * ?",
             "file": "/data/www/masterlab/app/server/timer/project.php",
             "arg": "-f"
           },
           {
             "name": "ProjectReport 每天23点58分执行项目统计",
             "exe_bin": "/usr/bin/php", 
             "exp": "0 58 23 * * ?",
             "file": "/data/www/masterlab/app/server/timer/projectDayReport.php",
             "arg": "-f"
           },
           {
             "name": "SprintReport 每天23点59分执行迭代统计",
             "exe_bin": "/usr/bin/php", 
             "exp": "0 59 23 * * ?",
             "file": "/data/www/masterlab/app/server/timer/sprintDayReport.php",
             "arg": "-f"
           }
         ]
       }
  5. 运行 masterlab_socket 服务
    如果是centos或windows操作系统,赋予 bin/masterlab_socketbin/masterlab_socket.exe 执行权限,其他操作系统访问
    https://github.com/gopeak/masterlab_socket 自行编译
    运行命令

       ./bin/masterlab_socket
  6. 重新给 app/storage 赋予写入权限

  7. 修改 app/config/deploy/app.cfg.phpMASTERLAB_VERSION1.1 ,清除浏览器缓存并重新登录

  8. good luck ~~

v1.0.2 到 v1.0.3 升级指南

步骤

  1. 下载补丁包 https://github.com/gopeak/masterlab/releases/download/v1.0.3/patch-v1.0.2tov1.0.3.zip ,覆盖代码

  2. 在数据库中找到表user_main,删除重复(字段 email 和 username)的用户数据

  3. 在数据库中执行以下SQL语句

    SET FOREIGN_KEY_CHECKS=0;
    ALTER TABLE `issue_description_template` ADD COLUMN `created`  int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间' AFTER `content`;
    ALTER TABLE `issue_description_template` ADD COLUMN `updated`  int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间' AFTER `created`;
    CREATE TABLE `issue_effect_version` (
    `id`  int(11) UNSIGNED NOT NULL AUTO_INCREMENT ,
    `issue_id`  int(11) UNSIGNED NULL DEFAULT NULL ,
    `version_id`  int(11) UNSIGNED NULL DEFAULT NULL ,
    PRIMARY KEY (`id`)
    )
    ENGINE=InnoDB
    ROW_FORMAT=Compact;
    UPDATE `permission` SET `name` = '访问事项列表(已废弃)' WHERE `permission`.`id` = 10005;
    DROP INDEX `email` ON `user_main`;
    CREATE UNIQUE INDEX `email` ON `user_main`(`email`) USING BTREE ;
    DROP INDEX `username` ON `user_main`;
    CREATE UNIQUE INDEX `username` ON `user_main`(`username`) USING BTREE ;
    SET FOREIGN_KEY_CHECKS=1;
  4. 修改 app/config/deploy/app.cfg.php MASTERLAB_VERSION 为 1.0.3

  5. 清除浏览器缓存