用户工具

站点工具


这是本文档旧的修订版!


Upgrade Instruction (v0.4 to v0.5)

When you are ready to upgrade Cobub Razor from version 0.4 to version 0.5, following steps is required:

Step one: download the code of V0.5

  1. Download the code of version 0.5 from https://github.com/cobub/razor/releases , and you can get the razor-0.5.zip, unzip it to get razor-0.5 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.4 ). To facilitate debugging, you can rename “web” to “razor_v5“, and set the $ config ['base_url'] value to the ‘http://192.168.1.103/razor_v5 ‘ in config.php which is under the application folder .
  3. Copy the autoload.php、database.php and routes.php of V0.4 under the directory of application\config\ to the diretory of application\config\ of V0.5, override these three files of V0.5.

Step two: modify the script files of database and data warehouse

Here, assume that your database is razor and data warehouse is razordw, and umsinstall_ is the table prefix of them.

1、Modify database

1.1 Add tables

1)user2product
property name property value index
id int(11) NOT NULL AUTO_INCREMENTprimary key
user_id int(11) NOT NULL
product_id int(11) NOT NULL

sql:

create table razor.umsinstall_user2product(id int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,user_id int(11) NOT NULL,product_id int(11) NOT NULL);

1.2 Modify tables

1) clientdata
property name property value changes
serviceversion varchar(50) NOT NULL→ DEFAULT NULL
name varchar(50) NOT NULL→ DEFAULT NULL
version varchar(50) NOT NULL→ DEFAULT NULL
platform varchar(50) NOT NULL→ DEFAULT NULL
osversion varchar(50) NOT NULL→ DEFAULT NULL
osaddtional varchar(50) NOT NULL→ DEFAULT NULL
language varchar(50) NOT NULL→ DEFAULT NULL
resolution varchar(50) NOT NULL→ DEFAULT NULL
ismobiledevice varchar(50) NOT NULL→ DEFAULT NULL
devicename varchar(50) NOT NULL→ DEFAULT NULL
deviceid varchar(200) NOT NULL→ DEFAULT NULL
defaultbrowser varchar(50) NOT NULL→ DEFAULT NULL
javasupport varchar(50) NOT NULL→ DEFAULT NULL
flashversion varchar(50) NOT NULL→ DEFAULT NULL
modulename varchar(50) NOT NULL→ DEFAULT NULL
imei varchar(50) NOT NULL→ DEFAULT NULL
imsi varchar(50) NOT NULL→ DEFAULT NULL
havegps varchar(50) NOT NULL→ DEFAULT NULL
havebt varchar(50) NOT NULL→ DEFAULT NULL
havewifi varchar(50) NOT NULL→ DEFAULT NULL
havegravity varchar(50) NOT NULL→ DEFAULT NULL
wifimac varchar(50) NOT NULL→ DEFAULT NULL
latitude varchar(50) NOT NULL→ DEFAULT NULL
longtitude varchar(50) NOT NULL→ DEFAULT NULL
service_supplier varchar(64) NOT NULL→ DEFAULT NULL
country varchar(50) NOT NULL→ DEFAULT NULL
region varchar(50) NOT NULL→ DEFAULT NULL
city varchar(50) NOT NULL→ DEFAULT NULL
street varchar(500) NOT NULL→ DEFAULT NULL
streetno varchar(50) NOT NULL→ DEFAULT NULL
postcode varchar(50) NOT NULL→ DEFAULT NULL

add: property name: useridentifier,
property value:varchar(256) DEFAULT NULL。

sql :

Modify the property of `serviceversion`(other columns are similar):

ALTER TABLE `razor.umsinstall_clientdata` CHANGE `serviceversion` `serviceversion` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL;
2)users

add:

property name: sessionkey ,

property value: varchar(50) DEFAULT NULL。

sql :

ALTER TABLE `razor.umsinstall_users` ADD COLUMN `sessionkey ` varchar(50) DEFAULT NULL;

3)Change the data of user_permissions

step one:clear the data of table user_permissions in database

sql :

TRUNCATE TABLE 'razor.umsinstall_user_permissions'; step two: import data of v0.5

Here we provide a SQL script, which is the pre-insert data of user_permissions of V0.5 , click on the user_permissionsv0.5 file behind Step six (Annex 1) ,download it to the local.

Unzip it and change the name of database(razor) to your own database name(v0.4), and the table prefix(umsinstall_ ) to your own database table prefix(v0.4) in SQL script.

en/razor/upgrade-instruction-v0-4-to-v0-5.1426648899.txt.gz · 最后更改: 2017/07/14 11:12 (外部编辑)