Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

1546
 
1862
 
1862
 
oscommerce.sql
_> 1 -# $Id: oscommerce.sql 1546 2007-03-31 02:21:32Z hpdl $
   1+# $Id: oscommerce.sql 1862 2009-03-06 23:34:07Z hpdl $
22 #
  33 # osCommerce, Open Source E-Commerce Solutions
  44 # http://www.oscommerce.com
     
 !
197197   PRIMARY KEY (customers_id)
  198198 );
  199199 
<> 200 -DROP TABLE IF EXISTS osc_customers_basket;
  201 -CREATE TABLE osc_customers_basket (
  202 -  customers_basket_id int NOT NULL auto_increment,
  203 -  customers_id int NOT NULL,
  204 -  products_id tinytext NOT NULL,
  205 -  customers_basket_quantity int NOT NULL,
  206 -  final_price decimal(15,4) NOT NULL,
  207 -  customers_basket_date_added datetime,
  208 -  PRIMARY KEY (customers_basket_id)
  209 -);
  210 -
211200 DROP TABLE IF EXISTS osc_languages;
  212201 CREATE TABLE osc_languages (
  213202   languages_id int NOT NULL auto_increment,
     
 !
345334   products_model varchar(12),
  346335   products_name varchar(64) NOT NULL,
  347336   products_price decimal(15,4) NOT NULL,
<> 348 -  final_price decimal(15,4) NOT NULL,
349337   products_tax decimal(7,4) NOT NULL,
  350338   products_quantity int(2) NOT NULL,
  351339   PRIMARY KEY (orders_products_id)
     
 !
371359    PRIMARY KEY (orders_status_history_id)
  372360 );
  373361 
<> 374 -DROP TABLE IF EXISTS osc_orders_products_attributes;
  375 -CREATE TABLE osc_orders_products_attributes (
  376 -  orders_products_attributes_id int NOT NULL auto_increment,
   362+DROP TABLE IF EXISTS osc_orders_products_variants;
   363+CREATE TABLE osc_orders_products_variants (
   364+  id int NOT NULL auto_increment,
377365   orders_id int NOT NULL,
  378366   orders_products_id int NOT NULL,
<> 379 -  products_options varchar(32) NOT NULL,
  380 -  products_options_values varchar(32) NOT NULL,
  381 -  options_values_price decimal(15,4) NOT NULL,
  382 -  price_prefix char(1) NOT NULL,
  383 -  PRIMARY KEY (orders_products_attributes_id)
   367+  group_title varchar(255) NOT NULL,
   368+  value_title text NOT NULL,
   369+  PRIMARY KEY (id),
   370+  KEY idx_orders_products_variants_orders_products_ids (orders_id, orders_products_id)
384371 );
  385372 
  386373 DROP TABLE IF EXISTS osc_orders_products_download;
     
 !
428415    KEY idx_orders_transactions_status_name (status_name)
  429416 );
  430417 
<>  418+DROP TABLE IF EXISTS osc_product_attributes;
   419+CREATE TABLE osc_product_attributes (
   420+  id INT UNSIGNED NOT NULL,
   421+  products_id INT UNSIGNED NOT NULL,
   422+  languages_id INT UNSIGNED NOT NULL,
   423+  value TEXT NOT NULL,
   424+  KEY idx_pa_id_products_id (id, products_id),
   425+  KEY idx_pa_languages_id (languages_id)
   426+);
   427+
431428 DROP TABLE IF EXISTS osc_products;
  432429 CREATE TABLE osc_products (
  433430   products_id int NOT NULL auto_increment,
<> 434 -  products_quantity int(4) NOT NULL,
   431+  parent_id int NOT NULL DEFAULT 0,
   432+  products_quantity int NOT NULL,
435433   products_price decimal(15,4) NOT NULL,
<>  434+  products_model varchar(255) NOT NULL,
436435   products_date_added datetime NOT NULL,
  437436   products_last_modified datetime,
<> 438 -  products_date_available datetime,
439437   products_weight decimal(5,2) NOT NULL,
  440438   products_weight_class int NOT NULL,
  441439   products_status tinyint(1) NOT NULL,
  442440   products_tax_class_id int NOT NULL,
  443441   manufacturers_id int NULL,
  444442   products_ordered int NOT NULL default '0',
<>  443+  has_children int default 0,
445444   PRIMARY KEY (products_id),
  446445   KEY idx_products_date_added (products_date_added)
  447446 );
  448447 
<> 449 -DROP TABLE IF EXISTS osc_products_attributes;
  450 -CREATE TABLE osc_products_attributes (
  451 -  products_attributes_id int NOT NULL auto_increment,
  452 -  products_id int NOT NULL,
  453 -  options_id int NOT NULL,
  454 -  options_values_id int NOT NULL,
  455 -  options_values_price decimal(15,4) NOT NULL,
  456 -  price_prefix char(1) NOT NULL,
  457 -  PRIMARY KEY (products_attributes_id)
  458 -);
  459 -
  460 -DROP TABLE IF EXISTS osc_products_attributes_download;
  461 -CREATE TABLE osc_products_attributes_download (
  462 -  products_attributes_id int NOT NULL,
  463 -  products_attributes_filename varchar(255) NOT NULL default '',
  464 -  products_attributes_maxdays int(2) default '0',
  465 -  products_attributes_maxcount int(2) default '0',
  466 -  PRIMARY KEY  (products_attributes_id)
  467 -);
  468 -
469448 DROP TABLE IF EXISTS osc_products_description;
  470449 CREATE TABLE osc_products_description (
  471450   products_id int NOT NULL auto_increment,
  472451   language_id int NOT NULL default '1',
  473452   products_name varchar(64) NOT NULL default '',
  474453   products_description text,
<> 475 -  products_model varchar(16),
476454   products_keyword varchar(64),
  477455   products_tags varchar(255),
  478456   products_url varchar(255),
     
 !
514492   PRIMARY KEY (products_id, customers_id)
  515493 );
  516494 
<> 517 -DROP TABLE IF EXISTS osc_products_options;
  518 -CREATE TABLE osc_products_options (
  519 -  products_options_id int NOT NULL default '0',
  520 -  language_id int NOT NULL default '1',
  521 -  products_options_name varchar(32) NOT NULL default '',
  522 -  PRIMARY KEY  (products_options_id,language_id)
   495+DROP TABLE IF EXISTS osc_products_to_categories;
   496+CREATE TABLE osc_products_to_categories (
   497+  products_id int NOT NULL,
   498+  categories_id int NOT NULL,
   499+  PRIMARY KEY (products_id,categories_id)
523500 );
  524501 
<> 525 -DROP TABLE IF EXISTS osc_products_options_values;
  526 -CREATE TABLE osc_products_options_values (
  527 -  products_options_values_id int NOT NULL default '0',
  528 -  language_id int NOT NULL default '1',
  529 -  products_options_values_name varchar(64) NOT NULL default '',
  530 -  PRIMARY KEY  (products_options_values_id,language_id)
   502+DROP TABLE IF EXISTS osc_products_variants;
   503+CREATE TABLE osc_products_variants (
   504+  products_id INT UNSIGNED NOT NULL,
   505+  products_variants_values_id INT UNSIGNED NOT NULL,
   506+  default_combo TINYINT UNSIGNED DEFAULT 0,
   507+  PRIMARY KEY (products_id, products_variants_values_id)
531508 );
  532509 
<> 533 -DROP TABLE IF EXISTS osc_products_options_values_to_products_options;
  534 -CREATE TABLE osc_products_options_values_to_products_options (
  535 -  products_options_values_to_products_options_id int NOT NULL auto_increment,
  536 -  products_options_id int NOT NULL,
  537 -  products_options_values_id int NOT NULL,
  538 -  PRIMARY KEY (products_options_values_to_products_options_id)
   510+DROP TABLE IF EXISTS osc_products_variants_groups;
   511+CREATE TABLE osc_products_variants_groups (
   512+  id int NOT NULL auto_increment,
   513+  languages_id int NOT NULL,
   514+  title varchar(255) NOT NULL,
   515+  sort_order int NOT NULL,
   516+  module varchar(255) NOT NULL,
   517+  PRIMARY KEY (id, languages_id)
539518 );
  540519 
<> 541 -DROP TABLE IF EXISTS osc_products_to_categories;
  542 -CREATE TABLE osc_products_to_categories (
  543 -  products_id int NOT NULL,
  544 -  categories_id int NOT NULL,
  545 -  PRIMARY KEY (products_id,categories_id)
   520+DROP TABLE IF EXISTS osc_products_variants_values;
   521+CREATE TABLE osc_products_variants_values (
   522+  id int NOT NULL auto_increment,
   523+  languages_id int NOT NULL,
   524+  products_variants_groups_id int NOT NULL,
   525+  title varchar(255) NOT NULL,
   526+  sort_order int NOT NULL,
   527+  PRIMARY KEY (id, languages_id),
   528+  KEY idx_products_variants_values_groups_id (products_variants_groups_id)
546529 );
  547530 
  548531 DROP TABLE IF EXISTS osc_reviews;
     
 !
569552   PRIMARY KEY (sesskey)
  570553 );
  571554 
<>  555+DROP TABLE IF EXISTS osc_shipping_availability;
   556+CREATE TABLE osc_shipping_availability (
   557+  id INT UNSIGNED NOT NULL,
   558+  languages_id INT UNSIGNED NOT NULL,
   559+  title varchar(255) NOT NULL,
   560+  css_key varchar(255),
   561+  PRIMARY KEY (id, languages_id)
   562+);
   563+
   564+DROP TABLE IF EXISTS osc_shopping_carts;
   565+CREATE TABLE osc_shopping_carts (
   566+  customers_id INT UNSIGNED NOT NULL,
   567+  item_id SMALLINT UNSIGNED NOT NULL,
   568+  products_id INT UNSIGNED NOT NULL,
   569+  quantity SMALLINT UNSIGNED NOT NULL,
   570+  date_added DATETIME,
   571+  KEY idx_sc_customers_id (customers_id),
   572+  KEY idx_sc_customers_id_products_id (customers_id, products_id)
   573+);
   574+
   575+DROP TABLE IF EXISTS osc_shopping_carts_custom_variants_values;
   576+CREATE TABLE osc_shopping_carts_custom_variants_values (
   577+  shopping_carts_item_id SMALLINT UNSIGNED NOT NULL,
   578+  customers_id INT UNSIGNED NOT NULL,
   579+  products_id INT UNSIGNED NOT NULL,
   580+  products_variants_values_id INT UNSIGNED NOT NULL,
   581+  products_variants_values_text TEXT NOT NULL,
   582+  KEY idx_sccvv_customers_id_products_id (customers_id, products_id)
   583+);
   584+
572585 DROP TABLE IF EXISTS osc_specials;
  573586 CREATE TABLE osc_specials (
  574587   specials_id int NOT NULL auto_increment,
     
 !
704717 INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('E-Mail Address', 'STORE_OWNER_EMAIL_ADDRESS', 'root@localhost', 'The e-mail address of my store owner', '1', '3', now());
  705718 INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('E-Mail From', 'EMAIL_FROM', '"Store Owner" <root@localhost>', 'The e-mail address used in (sent) e-mails', '1', '4', now());
  706719 INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES ('Country', 'STORE_COUNTRY', '223', 'The country my store is located in <br><br><b>Note: Please remember to update the store zone.</b>', '1', '6', 'osC_Address::getCountryName', 'osc_cfg_set_countries_pulldown_menu', now());
<> 707 -INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES ('Zone', 'STORE_ZONE', '', 'The zone my store is located in', '1', '7', 'osC_Address::getZoneName', 'osc_cfg_set_zones_pulldown_menu', now());
   720+INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES ('Zone', 'STORE_ZONE', '4031', 'The zone my store is located in', '1', '7', 'osC_Address::getZoneName', 'osc_cfg_set_zones_pulldown_menu', now());
708721 INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Send Extra Order Emails To', 'SEND_EXTRA_ORDER_EMAILS_TO', '', 'Send extra order emails to the following email addresses, in this format: Name 1 &lt;email@address1&gt;, Name 2 &lt;email@address2&gt;', '1', '11', now());
  709722 INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES ('Allow Guest To Tell A Friend', 'ALLOW_GUEST_TO_TELL_A_FRIEND', '-1', 'Allow guests to tell a friend about a product', '1', '15', 'osc_cfg_use_get_boolean_value', 'osc_cfg_set_boolean_value(array(1, -1))', now());
  710723 INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Store Address and Phone', 'STORE_NAME_ADDRESS', 'Store Name\nAddress\nCountry\nPhone', 'This is the Store Name, Address and Phone used on printable documents and displayed online', '1', '18', 'osc_cfg_set_textarea_field', now());
     
 !
57825795 # USA/Florida
  57835796 INSERT INTO osc_tax_rates VALUES (1, 1, 1, 1, 7.0, 'FL TAX 7.0%', now(), now());
  57845797 INSERT INTO osc_geo_zones (geo_zone_id,geo_zone_name,geo_zone_description,date_added) VALUES (1,"Florida","Florida local sales tax zone",now());
<> 5785 -INSERT INTO osc_zones_to_geo_zones (association_id,zone_country_id,zone_id,geo_zone_id,date_added) VALUES (1,223,176,1,now());
   5798+INSERT INTO osc_zones_to_geo_zones (association_id,zone_country_id,zone_id,geo_zone_id,date_added) VALUES (1,223,4031,1,now());
<_ 57865799 
  57875800 # Templates
  57885801