Difference between revisions of "DB changelog"

From Zen Cart(tm) Wiki
Jump to: navigation, search
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
{{Template:menuBarDevelopers}}
 
{{Template:menuBarDevelopers}}
{{Template:TOCFloatRight}}
+
''This page contains historic information regarding changes to the database structure.''
 
 
 
 
''This page contains historic information regarding changes in the database structure.''
 
  
 
'''''NOTE:''' For this page we consider 1.1.0 as the first version.''
 
'''''NOTE:''' For this page we consider 1.1.0 as the first version.''
Line 21: Line 18:
 
===== Deleted tables in <version> =====
 
===== Deleted tables in <version> =====
 
  <nowiki></nowiki>
 
  <nowiki></nowiki>
 +
-->
 +
 +
== Zen Cart&trade; v1.3.0 ==
 +
 +
===== New tables for 1.3.0 =====
 +
[[Table_ezpages|ezpages]]
 +
[[Table_meta_tags_categories_description|meta_tags_categories_description]]
 +
 +
===== Altered tables in 1.3.0 =====
 +
<nowiki>## Change counter_history
 +
ALTER TABLE counter_history CHANGE month startdate CHAR( 8 ) NULL DEFAULT NULL;
 +
ALTER TABLE counter_history ADD session_counter INT( 12 ) DEFAULT NULL;
 +
 +
## input vs textarea attributes
 +
ALTER TABLE products_options ADD products_options_rows SMALLINT( 2 ) DEFAULT '1' NOT NULL after products_options_images_style;
 +
ALTER TABLE customers_basket_attributes CHANGE products_options_value_text products_options_value_text BLOB NULL DEFAULT NULL;
 +
ALTER TABLE orders_products_attributes CHANGE products_options_values products_options_values BLOB NOT NULL;
 +
#hold customer and processed
 +
ALTER TABLE orders CHANGE ip_address ip_address VARCHAR( 96 ) NOT NULL;
  
 +
#Index Optimizations
 +
ALTER TABLE categories DROP INDEX idx_categories_parent_id_zen;
 +
ALTER TABLE coupon_gv_customer DROP INDEX idx_customer_id_zen;
 +
ALTER TABLE orders_products DROP INDEX idx_orders_id_zen;
 +
ALTER TABLE paypal DROP INDEX idx_paypal_paypal_ipn_id_zen;
 +
ALTER TABLE products_options_values DROP INDEX idx_prod_opt_val_id_zen;
 +
ALTER TABLE orders_products DROP INDEX orders_id_prod_id_zen;
 +
ALTER TABLE orders_products ADD INDEX idx_orders_id_prod_id_zen ( orders_id , products_id );
 +
ALTER TABLE template_select ADD INDEX idx_tpl_lang_zen (template_language) ;
 +
ALTER TABLE orders_total ADD INDEX idx_ot_class_zen (class);
 +
ALTER TABLE coupons ADD INDEX idx_coupon_code_zen (coupon_code);
 +
ALTER TABLE coupons ADD INDEX idx_coupon_type_zen (coupon_type);</nowiki>
  
  
-->
 
  
== Zen Cart v1.2.6 ==
+
== Zen Cart&trade; v1.2.6 ==
  
 
===== Altered tables in 1.2.6 =====
 
===== Altered tables in 1.2.6 =====
Line 39: Line 66:
  
  
== Zen Cart v1.2.5 ==
+
== Zen Cart&trade; v1.2.5 ==
  
 
===== New tables for 1.2.5 =====
 
===== New tables for 1.2.5 =====
Line 160: Line 187:
  
  
== Zen Cart v1.2.4 ==
+
== Zen Cart&trade; v1.2.4 ==
  
 
===== Altered tables in 1.2.4 =====
 
===== Altered tables in 1.2.4 =====
Line 171: Line 198:
  
  
== Zen Cart v1.2.3 ==
+
== Zen Cart&trade; v1.2.3 ==
  
 
===== Altered tables in 1.2.3 =====
 
===== Altered tables in 1.2.3 =====
Line 183: Line 210:
  
  
== Zen Cart v1.2.2 ==
+
== Zen Cart&trade; v1.2.2 ==
  
 
===== New tables for 1.2.2 =====
 
===== New tables for 1.2.2 =====
Line 212: Line 239:
  
  
== Zen Cart v1.2.1 ==
+
== Zen Cart&trade; v1.2.1 ==
  
 
===== New tables for 1.2.1 =====
 
===== New tables for 1.2.1 =====
Line 262: Line 289:
  
  
== Zen Cart v1.2.0 ==
+
== Zen Cart&trade; v1.2.0 ==
  
 
===== New tables in 1.2.0 =====
 
===== New tables in 1.2.0 =====
Line 394: Line 421:
  
  
== Zen Cart v1.1.4 ==
+
== Zen Cart&trade; v1.1.4 ==
  
 
===== Altered tables in 1.1.4 =====
 
===== Altered tables in 1.1.4 =====
Line 400: Line 427:
  
  
== Zen Cart v1.1.1 ==
+
== Zen Cart&trade; v1.1.1 ==
  
 
===== Altered tables in 1.1.1 =====
 
===== Altered tables in 1.1.1 =====
Line 412: Line 439:
  
  
== Zen Cart v1.1.0 ==
+
== Zen Cart&trade; v1.1.0 ==
  
 
===== New tables in 1.1.0 =====
 
===== New tables in 1.1.0 =====

Latest revision as of 13:49, 16 August 2006

This page contains historic information regarding changes to the database structure.

NOTE: For this page we consider 1.1.0 as the first version.


Zen Cart™ v1.3.0

New tables for 1.3.0
ezpages
meta_tags_categories_description
Altered tables in 1.3.0
## Change counter_history
ALTER TABLE counter_history CHANGE month startdate CHAR( 8 ) NULL DEFAULT NULL;
ALTER TABLE counter_history ADD session_counter INT( 12 ) DEFAULT NULL;

## input vs textarea attributes
ALTER TABLE products_options ADD products_options_rows SMALLINT( 2 ) DEFAULT '1' NOT NULL after products_options_images_style;
ALTER TABLE customers_basket_attributes CHANGE products_options_value_text products_options_value_text BLOB NULL DEFAULT NULL;
ALTER TABLE orders_products_attributes CHANGE products_options_values products_options_values BLOB NOT NULL;
#hold customer and processed
ALTER TABLE orders CHANGE ip_address ip_address VARCHAR( 96 ) NOT NULL;

#Index Optimizations
ALTER TABLE categories DROP INDEX idx_categories_parent_id_zen;
ALTER TABLE coupon_gv_customer DROP INDEX idx_customer_id_zen;
ALTER TABLE orders_products DROP INDEX idx_orders_id_zen;
ALTER TABLE paypal DROP INDEX idx_paypal_paypal_ipn_id_zen;
ALTER TABLE products_options_values DROP INDEX idx_prod_opt_val_id_zen;
ALTER TABLE orders_products DROP INDEX orders_id_prod_id_zen;
ALTER TABLE orders_products ADD INDEX idx_orders_id_prod_id_zen ( orders_id , products_id );
ALTER TABLE template_select ADD INDEX idx_tpl_lang_zen (template_language) ;
ALTER TABLE orders_total ADD INDEX idx_ot_class_zen (class);
ALTER TABLE coupons ADD INDEX idx_coupon_code_zen (coupon_code);
ALTER TABLE coupons ADD INDEX idx_coupon_type_zen (coupon_type);


Zen Cart™ v1.2.6

Altered tables in 1.2.6
ALTER TABLE admin_activity_log CHANGE COLUMN log_id log_id int(15) NOT NULL auto_increment;
ALTER TABLE whos_online CHANGE COLUMN user_agent user_agent varchar(255) NOT NULL default '';

#added for future orders editing
ALTER TABLE orders_products ADD products_prid TINYTEXT NOT NULL;
ALTER TABLE orders_products_attributes ADD products_prid TINYTEXT NOT NULL;
ALTER TABLE orders_products_download ADD products_prid TINYTEXT NOT NULL;


Zen Cart™ v1.2.5

New tables for 1.2.5
meta_tags_products_description
admin_activity_log


Altered tables in 1.2.5
ALTER TABLE banners ADD COLUMN banners_sort_order INT(11) DEFAULT '0' NOT NULL AFTER banners_on_ssl;

ALTER TABLE orders_products_attributes CHANGE COLUMN products_attributes_weight products_attributes_weight FLOAT DEFAULT '0' NOT NULL;
ALTER TABLE products CHANGE COLUMN products_weight products_weight FLOAT DEFAULT '0' NOT NULL;
ALTER TABLE products_attributes CHANGE COLUMN products_attributes_weight products_attributes_weight FLOAT DEFAULT '0' NOT NULL;


ALTER TABLE orders ADD COLUMN ip_address varchar(15) NOT NULL default '' ;

ALTER TABLE products ADD COLUMN metatags_title_status TINYINT(1) DEFAULT '0' NOT NULL;
ALTER TABLE products ADD COLUMN metatags_products_name_status TINYINT(1) DEFAULT '0' NOT NULL;
ALTER TABLE products ADD COLUMN metatags_model_status TINYINT(1) DEFAULT '0' NOT NULL;
ALTER TABLE products ADD COLUMN metatags_price_status TINYINT(1) DEFAULT '0' NOT NULL;
ALTER TABLE products ADD COLUMN metatags_title_tagline_status TINYINT(1) DEFAULT '0' NOT NULL;

ALTER TABLE orders_products_attributes CHANGE COLUMN products_options_values products_options_values VARCHAR(64) NOT NULL;
ALTER TABLE orders CHANGE COLUMN shipping_method shipping_method VARCHAR(128) NOT NULL;
ALTER TABLE orders CHANGE COLUMN payment_method payment_method VARCHAR(128) NOT NULL;
ALTER TABLE whos_online ADD COLUMN user_agent VARCHAR(64) NOT NULL default '';


### ADD INDEXES:
## On a large database, this could take some time, and sadly might encounter a timeout. 
## If a timeout occurs, simply run these commands manually...

ALTER TABLE banners_history ADD INDEX idx_banners_id_zen ( banners_id ) ;
ALTER TABLE banners ADD INDEX idx_status_group_zen ( status, banners_group ) ;

ALTER TABLE specials ADD INDEX idx_status_zen ( status ) ;
ALTER TABLE specials ADD INDEX idx_products_id_zen ( products_id ) ;
ALTER TABLE specials ADD INDEX idx_date_avail_zen ( specials_date_available ) ;

ALTER TABLE featured ADD INDEX idx_status_zen ( status ) ;
ALTER TABLE featured ADD INDEX idx_products_id_zen ( products_id ) ;
ALTER TABLE featured ADD INDEX idx_date_avail_zen ( featured_date_available ) ;

ALTER TABLE salemaker_sales ADD INDEX idx_sale_status_zen ( sale_status ) ;

ALTER TABLE categories ADD INDEX idx_categories_parent_id_TEST ( parent_id ) ;
ALTER TABLE categories ADD INDEX idx_parent_id_cat_id_zen ( parent_id, categories_id ) ;
ALTER TABLE categories ADD INDEX idx_status_zen ( categories_status );

ALTER TABLE product_types_to_category ADD INDEX idx_category_id_zen ( category_id ) ;
ALTER TABLE product_types_to_category ADD INDEX idx_product_type_id_zen ( product_type_id ) ;
ALTER TABLE product_types ADD INDEX idx_type_master_type_zen ( type_master_type ) ;

ALTER TABLE products ADD INDEX idx_products_status_zen ( products_status ) ;
ALTER TABLE products_to_categories ADD INDEX idx_cat_prod_id_zen (categories_id, products_id) ;
ALTER TABLE products_attributes ADD INDEX idx_id_options_id_values_zen ( products_id, options_id, options_values_id ) ;
ALTER TABLE products_discount_quantity ADD INDEX idx_id_qty_zen ( products_id, discount_qty ) ;
ALTER TABLE products_options_values_to_products_options ADD INDEX idx_prod_opt_val_id_zen ( products_options_values_id ) ;
ALTER TABLE products_options ADD INDEX idx_lang_id_zen ( language_id ) ;

ALTER TABLE tax_rates ADD INDEX idx_tax_zone_id_zen ( tax_zone_id ) ;
ALTER TABLE tax_rates ADD INDEX idx_tax_class_id_zen ( tax_class_id ) ;

ALTER TABLE configuration ADD INDEX idx_key_value_zen ( configuration_key, configuration_value(10) ) ;
ALTER TABLE configuration_group ADD INDEX idx_visible_zen ( visible ) ;
ALTER TABLE configuration ADD INDEX idx_cfg_grp_id_zen ( configuration_group_id ) ;
ALTER TABLE product_type_layout ADD INDEX idx_key_value_zen ( configuration_key, configuration_value(10) ) ;

ALTER TABLE customers ADD INDEX idx_email_address_zen ( customers_email_address ) ;
ALTER TABLE customers ADD INDEX idx_referral_zen ( customers_referral(10) ) ;
ALTER TABLE customers ADD INDEX idx_grp_pricing_zen ( customers_group_pricing ) ;
ALTER TABLE customers ADD INDEX idx_nick_zen ( customers_nick ) ;
ALTER TABLE customers ADD INDEX idx_newsletter_zen ( customers_newsletter ) ;
ALTER TABLE customers_basket ADD INDEX idx_customers_id_zen ( customers_id ) ;
ALTER TABLE customers_basket_attributes ADD INDEX idx_cust_id_prod_id_zen ( customers_id, products_id(36) );

ALTER TABLE orders ADD INDEX idx_status_orders_cust_zen ( orders_status, orders_id, customers_id );
ALTER TABLE orders_status_history ADD INDEX idx_orders_id_status_id_zen ( orders_id, orders_status_id ) ;
ALTER TABLE orders_products ADD INDEX idx_orders_id_zen ( orders_id ) ;
ALTER TABLE orders_products ADD INDEX orders_id_prod_id_zen ( orders_id , products_id ) ;
ALTER TABLE orders_products_attributes ADD INDEX idx_orders_id_prod_id_zen ( orders_id , orders_products_id ) ;
ALTER TABLE orders_products_download ADD INDEX idx_orders_id_zen ( orders_id );
ALTER TABLE orders_products_download ADD INDEX idx_orders_products_id_zen ( orders_products_id );

ALTER TABLE layout_boxes ADD INDEX idx_name_template_zen ( layout_template, layout_box_name ) ;

ALTER TABLE coupon_gv_queue ADD INDEX idx_release_flag_zen ( release_flag ) ;
ALTER TABLE coupons ADD INDEX idx_active_type_zen ( coupon_active, coupon_type ) ;
ALTER TABLE coupons_description DROP INDEX coupon_id;
ALTER TABLE coupons_description ADD PRIMARY KEY (coupon_id, language_id);
ALTER TABLE coupon_restrict ADD INDEX idx_coup_id_prod_id_zen (coupon_id, product_id);
ALTER TABLE coupon_redeem_track ADD INDEX idx_coupon_id_zen ( coupon_id ) ;
ALTER TABLE coupon_gv_queue DROP INDEX uid;
ALTER TABLE coupon_gv_queue ADD INDEX idx_cust_id_order_id_zen ( customer_id , order_id ) ;
ALTER TABLE coupon_email_track ADD INDEX idx_coupon_id_zen ( coupon_id ) ;

ALTER TABLE reviews ADD INDEX idx_products_id_zen ( products_id ) ;
ALTER TABLE reviews ADD INDEX idx_customers_id_zen ( customers_id ) ;

ALTER TABLE admin ADD INDEX idx_admin_name_zen ( admin_name ) ;

ALTER TABLE files_uploaded ADD INDEX idx_customers_id_zen ( customers_id ) ;

ALTER TABLE email_archive DROP INDEX email_to;
ALTER TABLE email_archive ADD INDEX idx_email_to_address_zen ( email_to_address ) ;
ALTER TABLE email_archive DROP INDEX module ;
ALTER TABLE email_archive ADD INDEX idx_module_zen ( module ) ;

ALTER TABLE media_to_products ADD INDEX idx_media_product_zen ( media_id, product_id ) ;
ALTER TABLE media_clips ADD INDEX idx_media_id_zen ( media_id ) ;
ALTER TABLE product_music_extra ADD INDEX idx_music_genre_id_zen ( music_genre_id ) ;

ALTER TABLE paypal ADD INDEX idx_zen_order_id_zen ( zen_order_id ) ;
ALTER TABLE paypal_payment_status_history ADD INDEX idx_paypal_ipn_id_zen ( paypal_ipn_id ) ;
ALTER TABLE paypal_session ADD INDEX idx_session_id_zen ( session_id(36) ) ;

#############


Zen Cart™ v1.2.4

Altered tables in 1.2.4
ALTER TABLE project_version_history DROP COLUMN project_version_ip_address;

# This step was missed in the 1.2.3 upgrade when it was first released.
ALTER TABLE paypal CHANGE COLUMN payment_date payment_date datetime NOT NULL default '0001-01-01 00:00:00';
ALTER TABLE paypal CHANGE COLUMN zen_order_id zen_order_id int(11) unsigned NOT NULL default '0';


Zen Cart™ v1.2.3

Altered tables in 1.2.3
## Table Structure updates
ALTER TABLE paypal CHANGE COLUMN payment_date payment_date datetime NOT NULL default '0001-01-01 00:00:00';
ALTER TABLE paypal CHANGE COLUMN last_modified last_modified datetime NOT NULL default '0001-01-01 00:00:00';
ALTER TABLE paypal CHANGE COLUMN date_added date_added datetime NOT NULL default '0001-01-01 00:00:00';

ALTER TABLE project_version_history DROP INDEX project_version_key;


Zen Cart™ v1.2.2

New tables for 1.2.2
paypal_session
project_version_history


Altered tables in 1.2.2
#orders table
ALTER TABLE orders ADD COLUMN payment_module_code varchar(32) NOT NULL default '' AFTER payment_method;
ALTER TABLE orders ADD COLUMN shipping_method varchar(32) NOT NULL default '' AFTER payment_module_code;
ALTER TABLE orders ADD COLUMN shipping_module_code varchar(32) NOT NULL default '' AFTER shipping_method;

#paypal 
ALTER TABLE paypal ADD COLUMN zen_order_id int(17) NOT NULL default '0' AFTER paypal_ipn_id;

#Version Control
ALTER TABLE project_version CHANGE COLUMN project_version_patch_major project_version_patch1 varchar(20) NOT NULL default '';
ALTER TABLE project_version CHANGE COLUMN project_version_patch_minor project_version_patch2 varchar(20) NOT NULL default '';
ALTER TABLE project_version ADD COLUMN project_version_patch1_source varchar(20) NOT NULL default '' AFTER project_version_patch2;
ALTER TABLE project_version ADD COLUMN project_version_patch2_source varchar(20) NOT NULL default '' AFTER project_version_patch1_source;
ALTER TABLE project_version DROP COLUMN project_version_ip_address;
Deleted tables in 1.2.2
#paypal 
DROP TABLE IF EXISTS orders_session_info;


Zen Cart™ v1.2.1

New tables for 1.2.1
orders_session_info - Deleted in 1.2.2
paypal
paypal_payment_status
paypal_payment_status_history


Altered tables in 1.2.1
## Table Structure updates to handle better use of decimal points
ALTER TABLE customers_basket CHANGE COLUMN customers_basket_quantity customers_basket_quantity FLOAT DEFAULT '0' NOT NULL;
ALTER TABLE orders_products CHANGE COLUMN products_quantity products_quantity FLOAT DEFAULT '0' NOT NULL;
ALTER TABLE products CHANGE COLUMN products_quantity products_quantity FLOAT DEFAULT '0' NOT NULL;
ALTER TABLE products CHANGE COLUMN products_ordered products_ordered FLOAT DEFAULT '0' NOT NULL;
ALTER TABLE products CHANGE COLUMN products_quantity_order_min products_quantity_order_min FLOAT DEFAULT '1' NOT NULL;
ALTER TABLE products CHANGE COLUMN products_quantity_order_units products_quantity_order_units FLOAT DEFAULT '1' NOT NULL;
ALTER TABLE products CHANGE COLUMN products_quantity_order_max products_quantity_order_max FLOAT DEFAULT '0' NOT NULL;
ALTER TABLE products_discount_quantity CHANGE COLUMN discount_qty discount_qty FLOAT DEFAULT '0' NOT NULL;

## Customers Table additions
ALTER TABLE customers ADD COLUMN customers_referral VARCHAR(32) NOT NULL default '';

## Add Coupon_Code to Order Table:
ALTER TABLE orders ADD COLUMN coupon_code varchar(32) NOT NULL default '' AFTER payment_method;

## PayPal IPN Updates
ALTER TABLE orders_products_attributes ADD products_options_id INT( 11 ) DEFAULT '0' NOT NULL;
ALTER TABLE orders_products_attributes ADD products_options_values_id INT( 11 ) DEFAULT '0' NOT NULL;

## the following fixes misspelled column name from 1.2.0:
ALTER TABLE product_types CHANGE COLUMN date_addded date_added datetime NOT NULL default '0001-01-01 00:00:00';


Deleted tables in 1.2.1
## These tables are obsolete after the new PayPal IPN is installed
DROP TABLE IF EXISTS paypal_ipn_address_status;
DROP TABLE IF EXISTS paypal_ipn_mc_currency;
DROP TABLE IF EXISTS paypal_ipn_payment_status;
DROP TABLE IF EXISTS paypal_ipn_payment_type;
DROP TABLE IF EXISTS paypal_ipn_pending_reason;
DROP TABLE IF EXISTS paypal_ipn_reason_code;
DROP TABLE IF EXISTS paypal_ipn_txn_type;

DROP TABLE IF EXISTS paypal_ipn;
DROP TABLE IF EXISTS paypal_ipn_orders;
DROP TABLE IF EXISTS paypal_ipn_orders_memo;


Zen Cart™ v1.2.0

New tables in 1.2.0
authorizenet
customers_wishlist
db_cache
email_archive
featured
get_terms_to_filter
group_pricing
media_clips
media_manager
media_to_products
media_types
music_genre
paypal_ipn - Deleted in 1.2.1
paypal_ipn_address_status - Deleted in 1.2.1
paypal_ipn_mc_currency - Deleted in 1.2.1
paypal_ipn_orders - Deleted in 1.2.1
paypal_ipn_orders_memo - Deleted in 1.2.1
paypal_ipn_payment_status - Deleted in 1.2.1
paypal_ipn_payment_type - Deleted in 1.2.1
paypal_ipn_pending_reason - Deleted in 1.2.1
paypal_ipn_reason_code - Deleted in 1.2.1
paypal_ipn_txn_type - Deleted in 1.2.1
product_music_extra
product_type_layout
product_types
product_types_to_category
products_discount_quantity
project_version
query_builder
record_artists
record_artists_info
record_company
record_company_info


Altered tables in 1.2.0
ALTER TABLE banners CHANGE COLUMN date_added date_added datetime NOT NULL default '0001-01-01 00:00:00';
ALTER TABLE banners CHANGE COLUMN banners_group banners_group varchar(15) NOT NULL default '';
ALTER TABLE banners ADD COLUMN banners_open_new_windows int(1) NOT NULL default '1';
ALTER TABLE banners ADD COLUMN banners_on_ssl int(1) NOT NULL default '1';
ALTER TABLE banners_history CHANGE COLUMN banners_history_date banners_history_date datetime NOT NULL default '0001-01-01 00:00:00';
ALTER TABLE categories ADD COLUMN categories_status tinyint(1) NOT NULL default '1';
ALTER TABLE categories ADD INDEX idx_sort_order (sort_order);
ALTER TABLE categories_description ADD COLUMN categories_description text NOT NULL;
ALTER TABLE configuration CHANGE COLUMN configuration_key configuration_key varchar(255) NOT NULL default '';
ALTER TABLE configuration CHANGE COLUMN set_function set_function text;
ALTER TABLE configuration CHANGE COLUMN use_function use_function text;
ALTER TABLE configuration CHANGE COLUMN date_added date_added datetime NOT NULL default '0001-01-01 00:00:00';
ALTER TABLE coupon_email_track CHANGE COLUMN date_sent date_sent datetime NOT NULL default '0001-01-01 00:00:00';
ALTER TABLE coupon_gv_queue CHANGE COLUMN date_created date_created datetime NOT NULL default '0001-01-01 00:00:00';
ALTER TABLE coupon_redeem_track CHANGE COLUMN redeem_date redeem_date datetime NOT NULL default '0001-01-01 00:00:00';
ALTER TABLE coupons CHANGE COLUMN coupon_start_date coupon_start_date datetime NOT NULL default '0001-01-01 00:00:00';
ALTER TABLE coupons CHANGE COLUMN date_created date_created datetime NOT NULL default '0001-01-01 00:00:00';
ALTER TABLE coupons CHANGE COLUMN date_modified date_modified datetime NOT NULL default '0001-01-01 00:00:00';
ALTER TABLE coupons CHANGE COLUMN coupon_expire_date coupon_expire_date datetime NOT NULL default '0001-01-01 00:00:00';
ALTER TABLE currencies CHANGE COLUMN symbol_right symbol_right varchar(24) default NULL;
ALTER TABLE currencies CHANGE COLUMN symbol_left symbol_left varchar(24) default NULL;
ALTER TABLE customers CHANGE COLUMN customers_dob customers_dob datetime NOT NULL default '0001-01-01 00:00:00';
ALTER TABLE customers ADD COLUMN customers_nick varchar(96) NOT NULL default '' AFTER customers_email_address;
ALTER TABLE customers ADD COLUMN customers_group_pricing int(11) NOT NULL default '0';
ALTER TABLE customers ADD COLUMN customers_email_format varchar(4) NOT NULL default 'TEXT';
ALTER TABLE customers ADD COLUMN customers_authorization int(1) NOT NULL default '0';
ALTER TABLE geo_zones CHANGE COLUMN date_added date_added datetime NOT NULL default '0001-01-01 00:00:00';
ALTER TABLE newsletters CHANGE COLUMN date_added date_added datetime NOT NULL default '0001-01-01 00:00:00';
ALTER TABLE newsletters ADD COLUMN content_html text NOT NULL AFTER content;
ALTER TABLE orders ADD COLUMN paypal_ipn_id int(11) NOT NULL default '0';
ALTER TABLE orders_products ADD COLUMN onetime_charges decimal(15,4) NOT NULL default '0.0000';
ALTER TABLE orders_products ADD COLUMN products_priced_by_attribute tinyint(1) NOT NULL default '0';
ALTER TABLE orders_products ADD COLUMN product_is_free tinyint(1) NOT NULL default '0';
ALTER TABLE orders_products ADD COLUMN products_discount_type tinyint(1) NOT NULL default '0';
ALTER TABLE orders_products ADD COLUMN products_discount_type_from tinyint(1) NOT NULL default '0';
ALTER TABLE orders_products_attributes ADD COLUMN product_attribute_is_free tinyint(1) NOT NULL default '0';
ALTER TABLE orders_products_attributes ADD COLUMN products_attributes_weight decimal(8,4) NOT NULL default '0.0000';
ALTER TABLE orders_products_attributes ADD COLUMN products_attributes_weight_prefix char(1) NOT NULL default '';
ALTER TABLE orders_products_attributes ADD COLUMN attributes_discounted tinyint(1) NOT NULL default '1';
ALTER TABLE orders_products_attributes ADD COLUMN attributes_price_base_included tinyint(1) NOT NULL default '1';
ALTER TABLE orders_products_attributes ADD COLUMN attributes_price_onetime decimal(15,4) NOT NULL default '0.0000';
ALTER TABLE orders_products_attributes ADD COLUMN attributes_price_factor decimal(15,4) NOT NULL default '0.0000';
ALTER TABLE orders_products_attributes ADD COLUMN attributes_price_factor_offset decimal(15,4) NOT NULL default '0.0000';
ALTER TABLE orders_products_attributes ADD COLUMN attributes_price_factor_onetime decimal(15,4) NOT NULL default '0.0000';
ALTER TABLE orders_products_attributes ADD COLUMN attributes_price_factor_onetime_offset decimal(15,4) NOT NULL default '0.0000';
ALTER TABLE orders_products_attributes ADD COLUMN attributes_qty_prices text;
ALTER TABLE orders_products_attributes ADD COLUMN attributes_qty_prices_onetime text;
ALTER TABLE orders_products_attributes ADD COLUMN attributes_price_words decimal(15,4) NOT NULL default '0.0000';
ALTER TABLE orders_products_attributes ADD COLUMN attributes_price_words_free int(4) NOT NULL default '0';
ALTER TABLE orders_products_attributes ADD COLUMN attributes_price_letters decimal(15,4) NOT NULL default '0.0000';
ALTER TABLE orders_products_attributes ADD COLUMN attributes_price_letters_free int(4) NOT NULL default '0';

ALTER TABLE orders_status_history CHANGE COLUMN date_added date_added datetime NOT NULL default '0001-01-01 00:00:00';
ALTER TABLE products CHANGE COLUMN products_date_added products_date_added datetime NOT NULL default '0001-01-01 00:00:00';
ALTER TABLE products ADD COLUMN products_type int(11) NOT NULL default '1' AFTER products_id;
ALTER TABLE products ADD COLUMN products_sort_order int(11) NOT NULL default '0';
ALTER TABLE products ADD COLUMN products_discount_type tinyint(1) NOT NULL default '0';
ALTER TABLE products ADD COLUMN products_discount_type_from tinyint(1) NOT NULL default '0';
ALTER TABLE products ADD COLUMN products_price_sorter decimal(15,4) NOT NULL default '0.0000';
ALTER TABLE products ADD COLUMN master_categories_id int(11) NOT NULL default '0';
ALTER TABLE products ADD COLUMN products_mixed_discount_quantity tinyint(1) NOT NULL default '1';
ALTER TABLE products_attributes ADD COLUMN attributes_price_onetime decimal(15,4) NOT NULL default '0.0000';
ALTER TABLE products_attributes ADD COLUMN attributes_price_factor decimal(15,4) NOT NULL default '0.0000';
ALTER TABLE products_attributes ADD COLUMN attributes_price_factor_offset decimal(15,4) NOT NULL default '0.0000';
ALTER TABLE products_attributes ADD COLUMN attributes_price_factor_onetime decimal(15,4) NOT NULL default '0.0000';
ALTER TABLE products_attributes ADD COLUMN attributes_price_factor_onetime_offset decimal(15,4) NOT NULL default '0.0000';
ALTER TABLE products_attributes ADD COLUMN attributes_qty_prices text;
ALTER TABLE products_attributes ADD COLUMN attributes_qty_prices_onetime text;
ALTER TABLE products_attributes ADD COLUMN attributes_price_words decimal(15,4) NOT NULL default '0.0000';
ALTER TABLE products_attributes ADD COLUMN attributes_price_words_free int(4) NOT NULL default '0';
ALTER TABLE products_attributes ADD COLUMN attributes_price_letters decimal(15,4) NOT NULL default '0.0000';
ALTER TABLE products_attributes ADD COLUMN attributes_price_letters_free int(4) NOT NULL default '0';
ALTER TABLE products_attributes ADD COLUMN attributes_required tinyint(1) NOT NULL default '0';
ALTER TABLE products_notifications CHANGE COLUMN date_added date_added datetime NOT NULL default '0001-01-01 00:00:00';
ALTER TABLE products_options_types DROP COLUMN language_id;
ALTER TABLE products_options_types DROP PRIMARY KEY;
ALTER TABLE products_options_types ADD PRIMARY KEY (products_options_types_id);
ALTER TABLE reviews ADD COLUMN status int(1) NOT NULL default '1';
ALTER TABLE salemaker_sales CHANGE COLUMN sale_date_start sale_date_start date NOT NULL default '0001-01-01';
ALTER TABLE salemaker_sales CHANGE COLUMN sale_date_end sale_date_end date NOT NULL default '0001-01-01';
ALTER TABLE salemaker_sales CHANGE COLUMN sale_date_added sale_date_added date NOT NULL default '0001-01-01';
ALTER TABLE salemaker_sales CHANGE COLUMN sale_date_last_modified sale_date_last_modified date NOT NULL default '0001-01-01';
ALTER TABLE salemaker_sales CHANGE COLUMN sale_date_status_change sale_date_status_change date NOT NULL default '0001-01-01';
ALTER TABLE specials CHANGE COLUMN expires_date expires_date date NOT NULL default '0001-01-01';
ALTER TABLE specials ADD COLUMN specials_date_available date NOT NULL default '0001-01-01';
ALTER TABLE tax_class CHANGE COLUMN date_added date_added datetime NOT NULL default '0001-01-01 00:00:00';
ALTER TABLE tax_rates CHANGE COLUMN date_added date_added datetime NOT NULL default '0001-01-01 00:00:00';
ALTER TABLE zones_to_geo_zones CHANGE COLUMN date_added date_added datetime NOT NULL default '0001-01-01 00:00:00';
ALTER TABLE products_options ADD COLUMN products_options_images_per_row int(2) default '5' AFTER products_options_size;
ALTER TABLE products_options ADD COLUMN products_options_images_style int(1) default '0';


Zen Cart™ v1.1.4

Altered tables in 1.1.4
ALTER TABLE customers_basket_attributes CHANGE COLUMN products_options_sort_order products_options_sort_order TEXT NOT NULL;


Zen Cart™ v1.1.1

Altered tables in 1.1.1
ALTER TABLE salemaker_sales CHANGE sale_categories_selected sale_categories_selected TEXT DEFAULT NULL;
ALTER TABLE salemaker_sales CHANGE sale_categories_all sale_categories_all TEXT DEFAULT NULL;

ALTER TABLE configuration CHANGE configuration_title configuration_title TEXT NOT NULL;
ALTER TABLE configuration CHANGE configuration_value configuration_value TEXT DEFAULT NULL;
ALTER TABLE configuration CHANGE configuration_description configuration_description TEXT DEFAULT NULL;


Zen Cart™ v1.1.0

New tables in 1.1.0
address_book
address_format
admin
banners
banners_history
categories
categories_description
configuration
configuration_group
counter
counter_history
countries
coupon_email_track
coupon_gv_customer
coupon_gv_queue
coupon_redeem_track
coupons
coupons_description
coupon_restrict
currencies
customers
customers_basket
customers_basket_attributes
customers_info
files_uploaded
geo_zones
languages
layout_boxes
manufacturers
manufacturers_info
newsletters
orders
orders_products
orders_status
orders_status_history
orders_products_attributes
orders_products_download
orders_total
products
products_attributes
products_attributes_download
products_description
products_notifications
products_options
products_options_types
products_options_values
products_options_values_to_products_options
products_to_categories
reviews
reviews_description
salemaker_sales
sessions
specials
tax_class
tax_rates
template_select
whos_online
zones
zones_to_geo_zones