Cobub Razor
Cobub Toaster
Other Links
Cobub Razor
Cobub Toaster
Other Links
這是本文檔舊的修訂版!
When you are ready to upgrade Cobub Razor from version 0.5 to version 0.6, following steps is required:
1、Download the code of version 0.6 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.4 or V0.5 ). To facilitate debugging, you can rename ”web” to “razor_v6“, and set the $ config ['base_url'] value to the ‘http://192.168.1.103/razor_v6 ‘ in config.php which is under the application folder.
3、Copy the autoload.php and database.php of V0.5 under the directory of application\config\ to the diretory of application\config\ of V0.6, override these two files of V0.6, and replace $route['default_controller'] = “install/installation” to $route['default_controller'] = “report/home” of V0.6 in routes.php.
Here, assume that your database is razor and data warehouse is razordw, and umsinstall_ is the table prefix of them.
property name | property value | index |
---|---|---|
id | int(11) NOT NULL AUTO_INCREMENT | PRIMARY KEY |
product_id | int(11) DEFAULT NULL | |
is_active | tinyint(4) DEFAULT NULL | |
app_id | varchar(25) DEFAULT NULL | |
user_id | int(8) DEFAULT NULL | |
app_key | varchar(25) NOT NULL | |
app_secret | varchar(25) NOT NULL | |
app_mastersecret | varchar(25) NOT NULL | |
app_identifier | varchar(25) NOT NULL | |
activate_date | datetime NOT NULL |
sql:
CREATE TABLE `razor.umsinstall_getui_product` ( `id` int(11) NOT NULL AUTO_INCREMENT, `product_id` int(11) DEFAULT NULL, `is_active` tinyint(4) DEFAULT NULL, `app_id` varchar(25) DEFAULT NULL, `user_id` int(8) DEFAULT NULL, `app_key` varchar(25) NOT NULL, `app_secret` varchar(25) NOT NULL, `app_mastersecret` varchar(25) NOT NULL, `app_identifier` varchar(25) NOT NULL, `activate_date` datetime NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
property name | property value | index |
---|---|---|
id | int(11) NOT NULL AUTO_INCREMENT | PRIMARY KEY |
identifier | varchar(50) NOT NULL | |
user_id | int(50) NOT NULL | |
status | int(10) NOT NULL |
sql:
CREATE TABLE `razor.umsinstall_plugins` ( `id` int(11) NOT NULL AUTO_INCREMENT, `identifier` varchar(50) NOT NULL, `user_id` int(50) NOT NULL, `status` int(10) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
property name | property value | index |
---|---|---|
id | int(4) NOT NULL AUTO_INCREMENT | PRIMARY KEY |
product_id | int(4) NOT NULL | |
name | varchar(200) NOT NULL | |
tags | varchar(5000) NOT NULL | |
time | timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP |
sql:
CREATE TABLE `razor.umsinstall_tag_group` ( `id` int(4) NOT NULL AUTO_INCREMENT, `product_id` int(4) NOT NULL, `name` varchar(200) NOT NULL, `tags` varchar(5000) NOT NULL, `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
property name | property value | index |
---|---|---|
id | int(20) NOT NULL AUTO_INCREMENT | PRIMARY KEY |
user_id | int(20) NOT NULL | |
user_key | varchar(50) NOT NULL | |
user_secret | varchar(50) NOT NULL |
sql:
CREATE TABLE `umsinstall_userkeys` ( `id` int(20) NOT NULL AUTO_INCREMENT, `user_id` int(20) NOT NULL, `user_key` varchar(50) NOT NULL, `user_secret` varchar(50) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
Stored procedures: rundaily 、 rundim 、 runfact 、 runmonthly 、 runsum and runweekly 。
Steps:
1)you will get six sql script files under the directory of assets\sql of V0.6 : sp_rundaily.sql 、 sp_rundim.sql 、 sp_runfact.sql 、 sp_runmonthly.sql 、 sp_runsum.sql and sp_runweekly.sql.
2) modify table prefix
Modify the umsinstall_ in all sql scirpt files above to your own data warehouse’s table prefix, for example,your data warehouse table prefix “razordw_”;
Replace the “databaseprefix.umsdatainstall_” to “database.database’s table prefix”, for example, your database is cobubrazor,and database’s table prefix is razor_,the ”databaseprefix.umsdatainstall_” should be “cobubrazor.razor_“.
Note: you need to have prepared all the relevant SQL scripts(i.e. all sql scripts in Step two).
Note: Please backup the data of your database and data warehouse before you execute the sql scripts.
Before this step, you need to do the last thing :
Backup the directory of the previous web site(e.g web,which is the root directory of version 0.5),store it in a suitable place and named web-backup0.5, then delete web.
Change”razor_v6” to “web”(the name of V0.5),and set $config['base_url']= ‘http://192.168.1.103/web’ in config.php.