From: Verdon V. <ve...@us...> - 2008-12-05 15:22:58
|
Update of /cvsroot/phpwebsite-comm/modules/vshop/boost In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13083/boost Modified Files: boost.php install.sql uninstall.php update.php Added Files: sql_update_070.sql Log Message: initial 0.7.0 work --- NEW FILE: sql_update_070.sql --- -- vshop - phpwebsite module -- @version $Id: sql_update_070.sql,v 1.1 2008/12/05 15:22:49 verdonv Exp $ -- @author Verdon Vaillancourt <verdonv at users dot sourceforge dot net> CREATE TABLE vshop_option_sets ( id int not null default 0, title varchar(255), type int not null default 0, PRIMARY KEY (id) ); CREATE TABLE vshop_option_values ( id int not null default 0, set_id int not null default 0, sort int not null default 0, title varchar(255), PRIMARY KEY (id) ); CREATE TABLE vshop_attributes ( id int not null default 0, set_id int not null default 0, value_id int not null default 0, item_id int not null default 0, price_mod decimal(11,2) not null default 0.00, price_prefix varchar(1), weight_mod decimal(8,2) not null default 0.00, weight_prefix varchar(1), PRIMARY KEY (id) ); Index: uninstall.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/vshop/boost/uninstall.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** uninstall.php 25 Nov 2008 15:19:28 -0000 1.1.1.1 --- uninstall.php 5 Dec 2008 15:22:49 -0000 1.2 *************** *** 29,32 **** --- 29,35 ---- PHPWS_DB::dropTable('vshop_taxes'); PHPWS_DB::dropTable('vshop_orders'); + PHPWS_DB::dropTable('vshop_option_sets'); + PHPWS_DB::dropTable('vshop_option_values'); + PHPWS_DB::dropTable('vshop_attributes'); $content[] = dgettext('vshop', 'vShop tables dropped.'); Index: install.sql =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/vshop/boost/install.sql,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** install.sql 25 Nov 2008 15:19:28 -0000 1.1.1.1 --- install.sql 5 Dec 2008 15:22:49 -0000 1.2 *************** *** 58,59 **** --- 58,87 ---- PRIMARY KEY (id) ); + + CREATE TABLE vshop_option_sets ( + id int not null default 0, + title varchar(255), + type int not null default 0, + PRIMARY KEY (id) + ); + + CREATE TABLE vshop_option_values ( + id int not null default 0, + set_id int not null default 0, + sort int not null default 0, + title varchar(255), + PRIMARY KEY (id) + ); + + CREATE TABLE vshop_attributes ( + id int not null default 0, + set_id int not null default 0, + value_id int not null default 0, + item_id int not null default 0, + price_mod decimal(11,2) not null default 0.00, + price_prefix varchar(1), + weight_mod decimal(8,2) not null default 0.00, + weight_prefix varchar(1), + PRIMARY KEY (id) + ); + Index: boost.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/vshop/boost/boost.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** boost.php 2 Dec 2008 19:43:12 -0000 1.2 --- boost.php 5 Dec 2008 15:22:49 -0000 1.3 *************** *** 24,28 **** $proper_name = 'vShop'; ! $version = '0.6.0'; $register = false; $unregister = false; --- 24,28 ---- $proper_name = 'vShop'; ! $version = '0.7.0'; $register = false; $unregister = false; Index: update.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/vshop/boost/update.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** update.php 3 Dec 2008 20:37:45 -0000 1.2 --- update.php 5 Dec 2008 15:22:49 -0000 1.3 *************** *** 49,52 **** --- 49,75 ---- + case version_compare($currentVersion, '0.7.0', '<'): + $result = PHPWS_DB::importFile(PHPWS_SOURCE_DIR . 'mod/vshop/boost/sql_update_070.sql'); + if (PEAR::isError($result)) { + PHPWS_Error::log($result); + $content[] = '+ Unable to add the option sets and values, and attributes tables.'; + return false; + } else { + $content[] = '+ added the option sets and values, and attributes tables.'; + $content[] = '<pre>'; + + $files = array('templates/list_option_sets.tpl', + 'templates/list_option_values.tpl', + 'templates/edit_settings.tpl' + ); + vshopUpdateFiles($files, $content); + + $content[] = '0.7.0 changes + ---------------- + + added support for product attributes + + </pre>'; + } + |