發表回覆建立主題發起投票

> 版本升級資料庫資料表OR欄位補遺
oldpa
發表於: 2006-09-29, 12:05 PM
引用文章


超級會員
*****

所屬群組: 管理群組
發表總數: 5402
會員編號: 1
註冊日期: --



1.2版升級2.3版需增加之資料表或欄位
CODE

address_book
 entry_telephone varchar(32) default NULL,
 entry_fax varchar(32) default NULL,

admin_access
 listcategories int(1) NOT NULL default '0',
 news_categories int(1) NOT NULL default '0',
 news int(1) NOT NULL default '0',
 file_manager int(1) NOT NULL default '0',
 stats_stock_warning int(1) NOT NULL default '0',

orders
  delivery_telephone varchar(32) default NULL,
  delivery_fax varchar(32) default NULL,
  billing_telephone varchar(32) default NULL,
  billing_fax varchar(32) default NULL,


INSERT INTO configuration (configuration_id, configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'MORE_PICS', '0', 4, 3, '', '0000-00-00 00:00:00', NULL , NULL);
INSERT INTO configuration (configuration_id, configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'PRODUCT_IMAGE_FIXED_SIZE', 'false', 4, 4, 'now()', 'now()', NULL , 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id, configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'PRODUCT_IMAGE_FIXED_SIZE_BACKGROUND', 'FFFFFF', 4, 5, 'now()', 'now()', NULL , NULL);
INSERT INTO configuration (configuration_id, configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'DOWNLOAD_UNALLOWED_PAYMENT', 'cod,moneyorder',  13, 3, NULL, '', NULL, NULL);
INSERT INTO configuration (configuration_id, configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'DOWNLOAD_MIN_ORDERS_STATUS', '1',  13, 4, NULL, '', NULL, NULL);

INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CATEGORIES', 'true', 18, 1, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'NEW_ATTRIBUTES', 'true', 18, 2, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'PRODUCTS_ATTRIBUTES', 'true', 18, 3, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'MANUFACTURERS', 'true', 18, 4, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'REVIEWS', 'true', 18, 5, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'SPECIALS', 'true', 18, 6, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'PRODUCTS_EXPECTED', 'true', 18, 7, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'NEWS_CATEGORIES', 'true', 18, 8, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID1', 'true', 18, 9, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID2', 'true', 18, 10, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID3', 'true', 18, 11, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID4', 'true', 18, 12, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID5', 'true', 18, 13, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID7', 'true', 18, 14, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID8', 'true', 18, 15, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID9', 'true', 18, 16, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID10', 'true', 18, 17, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID11', 'true', 18, 18, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID12', 'true', 18, 19, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID13', 'true', 18, 20, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID14', 'true', 18, 21, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID15', 'true', 18, 22, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID16', 'true', 18, 23, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID17', 'true', 18, 24, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'ORDERS_STATUS', 'true', 18, 25, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'SHIPPING_STATUS', 'true', 18, 26, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CUSTOMERS', 'true', 18, 27, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CUSTOMERS_STATUS', 'true', 18, 28, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'ORDERS', 'true', 18, 29, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'COUPON_ADMIN', 'true', 18, 30, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'GV_QUEUE', 'true', 18, 31, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'GV_MAIL', 'true', 18, 32, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'GV_SENT', 'true', 18, 33, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'LANGUAGES', 'true', 18, 34, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'COUNTRIES', 'true', 18, 35, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CURRENCIES', 'true', 18, 36, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'ZONES', 'true', 18, 37, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'GEO_ZONES', 'true', 18, 38, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'TAX_CLASSES', 'true', 18, 39, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'TAX_RATES', 'true', 18, 40, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'PAYMENT', 'true', 18, 41, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'SHIPPING', 'true', 18, 42, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'ORDER_TOTAL', 'true', 18, 43, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'MODULE_EXPORT', 'true', 18, 44, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'STATS_PRODUCTS_VIEWED', 'true', 18, 45, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'STATS_PRODUCTS_PURCHASED', 'true', 18, 46, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'STATS_CUSTOMERS', 'true', 18, 47, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'SALES_REPORT', 'true', 18, 48, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'MODULE_NEWSLETTER', 'true', 18, 49, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONTENT_MANAGER', 'true', 18, 50, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'BACKUP', 'true', 18, 51, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'BANNER_MANAGER', 'true', 18, 52, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'SERVER_INFO', 'true', 18, 53, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'WHOS_ONLINE', 'true', 18, 54, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'FILE_MANAGER', 'true', 18, 55, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CATEGORIES_NOTE', 'true', 18, 56, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATION_NOTE', 'true', 18, 57, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CUSTOMERS_NOTE', 'true', 18, 58, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'GV_ADMIN_NOTE', 'true', 18, 59, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'LOCALIZATION_NOTE', 'true', 18, 60, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'MODULES_NOTE', 'true', 18, 61, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'REPORTS_NOTE', 'true', 18, 62, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'TOOLS_NOTE', 'true', 18, 63, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'STATS_STOCK_WARNING', 'true', 18, 64, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');


原configuration裡的
DOWNLOAD_MAX_DAYS
DOWNLOAD_MAX_COUNT
參數可以選擇刪除

DROP TABLE IF EXISTS news_categories;
CREATE TABLE news_categories (
 categories_id int(11) NOT NULL auto_increment,
 categories_image varchar(64) default NULL,
 parent_id int(11) NOT NULL default '0',
 categories_status tinyint(1) unsigned NOT NULL default '1',
 categories_template varchar(64) default NULL,
 group_ids text,
 listing_template varchar(64) default NULL,
 sort_order int(3) default NULL,
 products_sorting varchar(32) default NULL,
 products_sorting2 varchar(32) default NULL,
 date_added datetime default NULL,
 last_modified datetime default NULL,
 PRIMARY KEY  (categories_id),
 KEY idx_categories_parent_id (parent_id)
) TYPE=MyISAM;


DROP TABLE IF EXISTS news_categories_description;
CREATE TABLE news_categories_description (
 categories_id int(11) NOT NULL default '0',
 language_id int(11) NOT NULL default '1',
 categories_name varchar(32) NOT NULL default '',
 categories_heading_title varchar(255) NOT NULL default '',
 categories_description text NOT NULL,
 categories_meta_title varchar(100) NOT NULL default '',
 categories_meta_description varchar(255) NOT NULL default '',
 categories_meta_keywords varchar(255) NOT NULL default '',
 PRIMARY KEY  (categories_id,language_id),
 KEY idx_categories_name (categories_name)
) TYPE=MyISAM;


DROP TABLE IF EXISTS news_products;
CREATE TABLE news_products (
 products_id int(11) NOT NULL auto_increment,
 products_model varchar(64) default NULL,
 group_ids text,
 products_sort int(4) default NULL,
 products_image varchar(64) default NULL,
 products_discount_allowed decimal(3,2) NOT NULL default '0.00',
 products_date_added datetime NOT NULL default '0000-00-00 00:00:00',
 products_status tinyint(1) NOT NULL default '0',
 products_last_modified datetime default NULL,
 products_date_available datetime default NULL,
 product_template varchar(64) default NULL,
 manufacturers_id int(11) default NULL,
 products_ordered int(11) NOT NULL default '0',
 products_fsk18 int(1) NOT NULL default '0',
 PRIMARY KEY  (products_id),
 KEY idx_products_date_added (products_date_added)
) TYPE=MyISAM;




DROP TABLE IF EXISTS news_products_description;
CREATE TABLE news_products_description (
 products_id int(11) NOT NULL auto_increment,
 language_id int(11) NOT NULL default '1',
 products_name varchar(64) NOT NULL default '',
 products_description text,
 products_short_description text,
 products_meta_title text NOT NULL,
 products_meta_description text NOT NULL,
 products_meta_keywords text NOT NULL,
 products_url varchar(255) default NULL,
 products_viewed int(5) default '0',
 PRIMARY KEY  (products_id,language_id),
 KEY products_name (products_name)
) TYPE=MyISAM;



DROP TABLE IF EXISTS news_products_to_categories;
CREATE TABLE news_products_to_categories (
 products_id int(11) NOT NULL default '0',
 categories_id int(11) NOT NULL default '0',
 PRIMARY KEY  (products_id,categories_id)
) TYPE=MyISAM;


DROP TABLE IF EXISTS products_more_images;
CREATE TABLE products_more_images (
 image_id INT NOT NULL auto_increment,
 products_id INT NOT NULL ,
 image_nr SMALLINT NOT NULL ,
 image_name VARCHAR( 254 ) NOT NULL ,
 PRIMARY KEY ( image_id )
) TYPE=MyISAM;





2.X版升級2.3版需增加之資料表或欄位
CODE

address_book
 entry_telephone varchar(32) default NULL,
 entry_fax varchar(32) default NULL,

admin_access
 listcategories int(1) NOT NULL default '0',
 news_categories int(1) NOT NULL default '0',
 news int(1) NOT NULL default '0',
 file_manager int(1) NOT NULL default '0',
 stats_stock_warning int(1) NOT NULL default '0',

orders
  delivery_telephone varchar(32) default NULL,
  delivery_fax varchar(32) default NULL,
  billing_telephone varchar(32) default NULL,
  billing_fax varchar(32) default NULL,


INSERT INTO configuration (configuration_id, configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'MORE_PICS', '0', 4, 3, '', '0000-00-00 00:00:00', NULL , NULL);
INSERT INTO configuration (configuration_id, configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'PRODUCT_IMAGE_FIXED_SIZE', 'false', 4, 4, 'now()', 'now()', NULL , 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id, configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'PRODUCT_IMAGE_FIXED_SIZE_BACKGROUND', 'FFFFFF', 4, 5, 'now()', 'now()', NULL , NULL);
INSERT INTO configuration (configuration_id, configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'DOWNLOAD_UNALLOWED_PAYMENT', 'cod,moneyorder',  13, 3, NULL, '', NULL, NULL);
INSERT INTO configuration (configuration_id, configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'DOWNLOAD_MIN_ORDERS_STATUS', '1',  13, 4, NULL, '', NULL, NULL);

INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CATEGORIES', 'true', 18, 1, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'NEW_ATTRIBUTES', 'true', 18, 2, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'PRODUCTS_ATTRIBUTES', 'true', 18, 3, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'MANUFACTURERS', 'true', 18, 4, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'REVIEWS', 'true', 18, 5, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'SPECIALS', 'true', 18, 6, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'PRODUCTS_EXPECTED', 'true', 18, 7, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'NEWS_CATEGORIES', 'true', 18, 8, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID1', 'true', 18, 9, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID2', 'true', 18, 10, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID3', 'true', 18, 11, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID4', 'true', 18, 12, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID5', 'true', 18, 13, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID7', 'true', 18, 14, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID8', 'true', 18, 15, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID9', 'true', 18, 16, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID10', 'true', 18, 17, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID11', 'true', 18, 18, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID12', 'true', 18, 19, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID13', 'true', 18, 20, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID14', 'true', 18, 21, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID15', 'true', 18, 22, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID16', 'true', 18, 23, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATIONGID17', 'true', 18, 24, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'ORDERS_STATUS', 'true', 18, 25, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'SHIPPING_STATUS', 'true', 18, 26, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CUSTOMERS', 'true', 18, 27, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CUSTOMERS_STATUS', 'true', 18, 28, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'ORDERS', 'true', 18, 29, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'COUPON_ADMIN', 'true', 18, 30, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'GV_QUEUE', 'true', 18, 31, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'GV_MAIL', 'true', 18, 32, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'GV_SENT', 'true', 18, 33, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'LANGUAGES', 'true', 18, 34, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'COUNTRIES', 'true', 18, 35, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CURRENCIES', 'true', 18, 36, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'ZONES', 'true', 18, 37, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'GEO_ZONES', 'true', 18, 38, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'TAX_CLASSES', 'true', 18, 39, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'TAX_RATES', 'true', 18, 40, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'PAYMENT', 'true', 18, 41, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'SHIPPING', 'true', 18, 42, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'ORDER_TOTAL', 'true', 18, 43, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'MODULE_EXPORT', 'true', 18, 44, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'STATS_PRODUCTS_VIEWED', 'true', 18, 45, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'STATS_PRODUCTS_PURCHASED', 'true', 18, 46, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'STATS_CUSTOMERS', 'true', 18, 47, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'SALES_REPORT', 'true', 18, 48, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'MODULE_NEWSLETTER', 'true', 18, 49, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONTENT_MANAGER', 'true', 18, 50, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'BACKUP', 'true', 18, 51, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'BANNER_MANAGER', 'true', 18, 52, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'SERVER_INFO', 'true', 18, 53, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'WHOS_ONLINE', 'true', 18, 54, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'FILE_MANAGER', 'true', 18, 55, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CATEGORIES_NOTE', 'true', 18, 56, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CONFIGURATION_NOTE', 'true', 18, 57, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'CUSTOMERS_NOTE', 'true', 18, 58, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'GV_ADMIN_NOTE', 'true', 18, 59, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'LOCALIZATION_NOTE', 'true', 18, 60, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'MODULES_NOTE', 'true', 18, 61, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'REPORTS_NOTE', 'true', 18, 62, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'TOOLS_NOTE', 'true', 18, 63, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id,  configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES   ('', 'STATS_STOCK_WARNING', 'true', 18, 64, NULL, '', NULL, 'twe_cfg_select_option(array(\'true\', \'false\'),');


原configuration裡的
DOWNLOAD_MAX_DAYS
DOWNLOAD_MAX_COUNT
參數可以選擇刪除

DROP TABLE IF EXISTS products_more_images;
CREATE TABLE products_more_images (
 image_id INT NOT NULL auto_increment,
 products_id INT NOT NULL ,
 image_nr SMALLINT NOT NULL ,
 image_name VARCHAR( 254 ) NOT NULL ,
 PRIMARY KEY ( image_id )
) TYPE=MyISAM;



--------------------

傳送簡訊個人網站
Top
1 位使用者正在閱讀本主題 (1 位訪客及 0 位匿名使用者)
0 位會員:

主題選項 發表回覆建立主題發起投票