这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 | ||
en:razor:upgrade-instruction-v0-7.1-to-v0-7.2 [2015/09/15 11:25] cobub v0.7.2 |
en:razor:upgrade-instruction-v0-7.1-to-v0-7.2 [2015/10/09 16:17] cobub |
||
---|---|---|---|
行 8: | 行 8: | ||
1、Download the code of version 0.7.2 from https://github.com/cobub/razor , and you can get the razor-master.zip, unzip it to get razor-master folder, which contains the sdk and web folders. | 1、Download the code of version 0.7.2 from https://github.com/cobub/razor , and you can get the razor-master.zip, unzip it to get razor-master folder, which contains the sdk and web folders. | ||
- | 2、Copy the **web** folder to the directory of your web site where you are ready to upgrade Cobub Razor (Note: web can not be the same name with Cobub Razor’s name of V0.7.1 or V0.7.2 ). To facilitate debugging, you can rename ”web” to “razor_v7.2“, and set the $ config ['base_url'] value to the ‘http://192.168.1.103/razor_v7.2 ‘ in **config.php** which is under the **application** folder. | + | 2、Copy the **web** folder to the directory of your web site where you are ready to upgrade Cobub Razor (Note: web can not be the same name with Cobub Razor’s name of V0.7.1 or V0.7.2 ). To facilitate debugging, you can rename ”web” to “razor_v7.2“, and set the $ config ['base_url'] value to the ‘http://yoururl/razor_v7.2 ‘ in **config.php** which is under the **application** folder. |
3、Copy the **autoload.php** and **database.php** of V0.7.1 under the directory of **application\config\** to the diretory of **application\config\** of V0.7.2, override these two files of V0.7.2, and replace $route['default_controller'] = “install/installation” to $route['default_controller'] = “report/home” of V0.7.2 in **routes.php**. | 3、Copy the **autoload.php** and **database.php** of V0.7.1 under the directory of **application\config\** to the diretory of **application\config\** of V0.7.2, override these two files of V0.7.2, and replace $route['default_controller'] = “install/installation” to $route['default_controller'] = “report/home” of V0.7.2 in **routes.php**. | ||
行 17: | 行 17: | ||
==== 1、Modify database ==== | ==== 1、Modify database ==== | ||
- | 1)**channel_product** | + | 1)**ci_sessions** |
^property name ^property value ^changes^ | ^property name ^property value ^changes^ | ||
|ip_address |varchar(45) |varchar(16)-> varchar(45)| | |ip_address |varchar(45) |varchar(16)-> varchar(45)| | ||
**sql** | **sql** | ||
<code> | <code> | ||
- | ALTER TABLE `razor.umsinstall_channel_product` | + | ALTER TABLE `razor.umsinstall_ci_sessions` |
CHANGE `ip_address` `ip_address` varchar(45); </code> | CHANGE `ip_address` `ip_address` varchar(45); </code> | ||
行 34: | 行 34: | ||
**sql** | **sql** | ||
<code> | <code> | ||
- | ALALTER TABLE `razor.umsinstall_clientdata` | + | ALTER TABLE `razor.umsinstall_clientdata` |
ADD COLUMN `salt` varchar(64) DEFAULT NULL,INDEX(`insertdate`);</code> | ADD COLUMN `salt` varchar(64) DEFAULT NULL,INDEX(`insertdate`);</code> | ||
3) **clientusinglog** | 3) **clientusinglog** | ||
+ | |||
property `insertdate`adds index. | property `insertdate`adds index. | ||
**sql** | **sql** | ||
<code> | <code> | ||
- | ALALTER TABLE `razor.umsinstall_clientusinglog` | + | ALTER TABLE `razor.umsinstall_clientusinglog` |
ADD INDEX(`insertdate`);</code> | ADD INDEX(`insertdate`);</code> | ||
4)**errorlog** | 4)**errorlog** | ||
+ | |||
property `insertdate`adds index. | property `insertdate`adds index. | ||
**sql** | **sql** | ||
<code> | <code> | ||
- | ALALTER TABLE `razor.umsinstall_errorlog` | + | ALTER TABLE `razor.umsinstall_errorlog` |
ADD INDEX(`insertdate`);</code> | ADD INDEX(`insertdate`);</code> | ||
5)**eventdata** | 5)**eventdata** | ||
+ | |||
property `insertdate`adds index. | property `insertdate`adds index. | ||
**sql语句:** | **sql语句:** | ||
<code> | <code> | ||
- | ALALTER TABLE `razor.umsinstall_eventdata` | + | ALTER TABLE `razor.umsinstall_eventdata` |
ADD INDEX(`insertdate`);</code> | ADD INDEX(`insertdate`);</code> | ||
行 238: | 行 241: | ||
`userid ` varchar(128) NOT NULL, | `userid ` varchar(128) NOT NULL, | ||
PRIMARY KEY (`did`), | PRIMARY KEY (`did`), | ||
- | UNIQUE KEY `deviceid`(`deviceid`,`userid`) | + | UNIQUE KEY `deviceid`(`deviceid`,`userid`), |
KEY `userid` (`userid`) | KEY `userid` (`userid`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1; | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1; | ||
行 265: | 行 268: | ||
^property name ^property name ^changes^ | ^property name ^property name ^changes^ | ||
- | |datevalue | |NOT NULL->NOT NULL AUTO_INCREMENT| | + | |datevalue | |Timestamp->Date| |
**sql** | **sql** | ||
<code> | <code> | ||
ALTER TABLE `razordw.umsinstall_dim_date` | ALTER TABLE `razordw.umsinstall_dim_date` | ||
- | CHANGE `datevalue` `datevalue` NOT NULL AUTO_INCREMENT; | + | CHANGE `datevalue` `datevalue` DATE NOT NULL; |
</code> | </code> | ||
行 279: | 行 282: | ||
<code> | <code> | ||
ALTER TABLE `razordw.umsinstall_dim_devicesupplier` | ALTER TABLE `razordw.umsinstall_dim_devicesupplier` | ||
- | CHANGE CHANGE `devicesupplier_name` `devicesupplier_name` varchar(128);; | + | CHANGE `devicesupplier_name` `devicesupplier_name` varchar(128); |
</code> | </code> | ||
行 288: | 行 291: | ||
**sql** | **sql** | ||
<code> | <code> | ||
- | ALALTER TABLE `razordw.umsinstall_fact_event` | + | ALTER TABLE `razordw.umsinstall_fact_event` |
ADD INDEX(`date_sk`,`product_sk`);</code> | ADD INDEX(`date_sk`,`product_sk`);</code> | ||
- | 4)**'dim_date'** | + | 4)**dim_date** |
Delete datevalue data before January 1, 2015 in the table. | Delete datevalue data before January 1, 2015 in the table. | ||
行 340: | 行 344: | ||
Backup the directory of the previous web site(e.g **web**,which is the root directory of version 0.7.1),store it in a suitable place and named web-backup0.7.1, then delete **web**. | Backup the directory of the previous web site(e.g **web**,which is the root directory of version 0.7.1),store it in a suitable place and named web-backup0.7.1, then delete **web**. | ||
- | Change”razor_v7.2” to “web”(the name of V0.7.1),and set $config['base_url']= ‘http://192.168.1.103/web’ in **config.php**. | + | Change”razor_v7.2” to “web”(the name of V0.7.1),and set $config['base_url']= ‘http://yoururl/web’ in **config.php**. |