## mysqldiff 0.25
## 
## run on Wed Feb 19 09:53:13 2003
##
## ---   db: osc
## +++   db: oscms1

ALTER TABLE address_book CHANGE COLUMN entry_country_id entry_country_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'
ALTER TABLE address_book CHANGE COLUMN entry_zone_id entry_zone_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'
ALTER TABLE address_book CHANGE COLUMN address_book_id address_book_id int(11) NOT NULL default '1'; # was int(5) NOT NULL default '1'
ALTER TABLE address_book CHANGE COLUMN customers_id customers_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'

ALTER TABLE address_format CHANGE COLUMN address_format_id address_format_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment

ALTER TABLE banners CHANGE COLUMN banners_id banners_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment
ALTER TABLE banners CHANGE COLUMN status status int(1) NOT NULL default '1'; # was int(1) default '1'
ALTER TABLE banners CHANGE COLUMN banners_url banners_url varchar(255) NOT NULL default ''; # was varchar(64) NOT NULL default ''

ALTER TABLE banners_history CHANGE COLUMN banners_id banners_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'
ALTER TABLE banners_history CHANGE COLUMN banners_history_id banners_history_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment

ALTER TABLE categories DROP COLUMN status; # was int(1) default '1'
ALTER TABLE categories CHANGE COLUMN parent_id parent_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'
ALTER TABLE categories CHANGE COLUMN categories_id categories_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment

ALTER TABLE categories_description CHANGE COLUMN language_id language_id int(11) NOT NULL default '1'; # was int(5) NOT NULL default '1'
ALTER TABLE categories_description CHANGE COLUMN categories_id categories_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'

ALTER TABLE configuration CHANGE COLUMN configuration_id configuration_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment
ALTER TABLE configuration CHANGE COLUMN configuration_group_id configuration_group_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'

ALTER TABLE configuration_group CHANGE COLUMN configuration_group_id configuration_group_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment

ALTER TABLE countries CHANGE COLUMN countries_id countries_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment
ALTER TABLE countries CHANGE COLUMN address_format_id address_format_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'

ALTER TABLE currencies CHANGE COLUMN currencies_id currencies_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment

ALTER TABLE customers CHANGE COLUMN customers_id customers_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment

ALTER TABLE customers_basket CHANGE COLUMN final_price final_price decimal(15,4) NOT NULL default '0.0000'; # was decimal(6,2) NOT NULL default '0.00'
ALTER TABLE customers_basket CHANGE COLUMN customers_basket_id customers_basket_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment
ALTER TABLE customers_basket CHANGE COLUMN customers_id customers_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'

ALTER TABLE customers_basket_attributes CHANGE COLUMN customers_basket_attributes_id customers_basket_attributes_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment
ALTER TABLE customers_basket_attributes CHANGE COLUMN products_options_id products_options_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'
ALTER TABLE customers_basket_attributes CHANGE COLUMN products_options_value_id products_options_value_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'
ALTER TABLE customers_basket_attributes CHANGE COLUMN customers_id customers_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'

ALTER TABLE customers_info CHANGE COLUMN customers_info_id customers_info_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'

ALTER TABLE geo_zones CHANGE COLUMN geo_zone_id geo_zone_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment

ALTER TABLE languages CHANGE COLUMN languages_id languages_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment

DROP TABLE login;

ALTER TABLE manufacturers CHANGE COLUMN manufacturers_id manufacturers_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment

ALTER TABLE manufacturers_info CHANGE COLUMN manufacturers_id manufacturers_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'
ALTER TABLE manufacturers_info CHANGE COLUMN languages_id languages_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'

ALTER TABLE newsletters CHANGE COLUMN newsletters_id newsletters_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment

ALTER TABLE orders CHANGE COLUMN customers_id customers_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'
ALTER TABLE orders CHANGE COLUMN payment_method payment_method varchar(32) NOT NULL default ''; # was varchar(12) NOT NULL default ''
ALTER TABLE orders DROP COLUMN comments; # was text
ALTER TABLE orders CHANGE COLUMN orders_id orders_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment
ALTER TABLE orders DROP COLUMN shipping_cost; # was decimal(8,2) NOT NULL default '0.00'
ALTER TABLE orders DROP COLUMN shipping_method; # was varchar(32) default NULL
ALTER TABLE orders ADD COLUMN billing_suburb varchar(32) default NULL;
ALTER TABLE orders ADD COLUMN customers_company varchar(32) default NULL;
ALTER TABLE orders ADD COLUMN billing_postcode varchar(10) NOT NULL default '';
ALTER TABLE orders ADD COLUMN billing_street_address varchar(64) NOT NULL default '';
ALTER TABLE orders ADD COLUMN billing_address_format_id int(5) NOT NULL default '0';
ALTER TABLE orders ADD COLUMN billing_city varchar(32) NOT NULL default '';
ALTER TABLE orders ADD COLUMN billing_company varchar(32) default NULL;
ALTER TABLE orders ADD COLUMN billing_country varchar(32) NOT NULL default '';
ALTER TABLE orders ADD COLUMN billing_name varchar(64) NOT NULL default '';
ALTER TABLE orders ADD COLUMN delivery_company varchar(32) default NULL;
ALTER TABLE orders ADD COLUMN billing_state varchar(32) default NULL;

ALTER TABLE orders_products CHANGE COLUMN orders_products_id orders_products_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment
ALTER TABLE orders_products CHANGE COLUMN final_price final_price decimal(15,4) NOT NULL default '0.0000'; # was decimal(8,2) NOT NULL default '0.00'
ALTER TABLE orders_products CHANGE COLUMN products_id products_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'
ALTER TABLE orders_products CHANGE COLUMN products_price products_price decimal(15,4) NOT NULL default '0.0000'; # was decimal(8,2) NOT NULL default '0.00'
ALTER TABLE orders_products CHANGE COLUMN orders_id orders_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'

ALTER TABLE orders_products_attributes CHANGE COLUMN orders_products_id orders_products_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'
ALTER TABLE orders_products_attributes CHANGE COLUMN options_values_price options_values_price decimal(15,4) NOT NULL default '0.0000'; # was decimal(8,2) NOT NULL default '0.00'
ALTER TABLE orders_products_attributes CHANGE COLUMN orders_products_attributes_id orders_products_attributes_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment
ALTER TABLE orders_products_attributes CHANGE COLUMN orders_id orders_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'

ALTER TABLE orders_products_download CHANGE COLUMN orders_products_id orders_products_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'
ALTER TABLE orders_products_download CHANGE COLUMN orders_products_download_id orders_products_download_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment
ALTER TABLE orders_products_download CHANGE COLUMN orders_id orders_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'

ALTER TABLE orders_status CHANGE COLUMN language_id language_id int(11) NOT NULL default '1'; # was int(5) NOT NULL default '1'
ALTER TABLE orders_status CHANGE COLUMN orders_status_id orders_status_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'

ALTER TABLE orders_status_history DROP COLUMN new_value; # was int(5) NOT NULL default '0'
ALTER TABLE orders_status_history CHANGE COLUMN orders_id orders_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'
ALTER TABLE orders_status_history CHANGE COLUMN orders_status_history_id orders_status_history_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment
ALTER TABLE orders_status_history DROP COLUMN old_value; # was int(5) default NULL
ALTER TABLE orders_status_history ADD COLUMN comments text;
ALTER TABLE orders_status_history ADD COLUMN orders_status_id int(5) NOT NULL default '0';

DROP TABLE permissions;

ALTER TABLE products CHANGE COLUMN manufacturers_id manufacturers_id int(11) default NULL; # was int(5) default NULL
ALTER TABLE products CHANGE COLUMN products_date_added products_date_added datetime NOT NULL default '0000-00-00 00:00:00'; # was datetime default NULL
ALTER TABLE products CHANGE COLUMN products_tax_class_id products_tax_class_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'
ALTER TABLE products CHANGE COLUMN products_id products_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment
ALTER TABLE products CHANGE COLUMN products_price products_price decimal(15,4) NOT NULL default '0.0000'; # was decimal(8,2) NOT NULL default '0.00'
ALTER TABLE products ADD COLUMN products_ordered int(11) NOT NULL default '0';
ALTER TABLE products ADD INDEX idx_products_date_added (products_date_added);

ALTER TABLE products_attributes CHANGE COLUMN options_values_id options_values_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'
ALTER TABLE products_attributes CHANGE COLUMN options_values_price options_values_price decimal(15,4) NOT NULL default '0.0000'; # was decimal(8,2) NOT NULL default '0.00'
ALTER TABLE products_attributes CHANGE COLUMN products_id products_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'
ALTER TABLE products_attributes CHANGE COLUMN options_id options_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'
ALTER TABLE products_attributes CHANGE COLUMN products_attributes_id products_attributes_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment

ALTER TABLE products_attributes_download CHANGE COLUMN products_attributes_id products_attributes_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'

ALTER TABLE products_description CHANGE COLUMN products_id products_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment
ALTER TABLE products_description CHANGE COLUMN language_id language_id int(11) NOT NULL default '1'; # was int(5) NOT NULL default '1'

ALTER TABLE products_notifications CHANGE COLUMN customers_id customers_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'
ALTER TABLE products_notifications CHANGE COLUMN products_id products_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'

ALTER TABLE products_options CHANGE COLUMN language_id language_id int(11) NOT NULL default '1'; # was int(5) NOT NULL default '1'
ALTER TABLE products_options CHANGE COLUMN products_options_id products_options_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'

ALTER TABLE products_options_values CHANGE COLUMN products_options_values_id products_options_values_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'
ALTER TABLE products_options_values CHANGE COLUMN language_id language_id int(11) NOT NULL default '1'; # was int(5) NOT NULL default '1'

ALTER TABLE products_options_values_to_products_options CHANGE COLUMN products_options_values_to_products_options_id products_options_values_to_products_options_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment
ALTER TABLE products_options_values_to_products_options CHANGE COLUMN products_options_values_id products_options_values_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'
ALTER TABLE products_options_values_to_products_options CHANGE COLUMN products_options_id products_options_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'

ALTER TABLE products_to_categories CHANGE COLUMN products_id products_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'
ALTER TABLE products_to_categories CHANGE COLUMN categories_id categories_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'

ALTER TABLE reviews CHANGE COLUMN reviews_id reviews_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment
ALTER TABLE reviews CHANGE COLUMN customers_id customers_id int(11) default NULL; # was int(5) default NULL
ALTER TABLE reviews CHANGE COLUMN products_id products_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'

ALTER TABLE reviews_description CHANGE COLUMN reviews_id reviews_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'
ALTER TABLE reviews_description CHANGE COLUMN languages_id languages_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'

ALTER TABLE specials CHANGE COLUMN status status int(1) NOT NULL default '1'; # was int(1) default '1'
ALTER TABLE specials CHANGE COLUMN products_id products_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'
ALTER TABLE specials CHANGE COLUMN specials_id specials_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment
ALTER TABLE specials CHANGE COLUMN specials_new_products_price specials_new_products_price decimal(15,4) NOT NULL default '0.0000'; # was decimal(8,2) NOT NULL default '0.00'

ALTER TABLE tax_class CHANGE COLUMN tax_class_id tax_class_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment

ALTER TABLE tax_rates CHANGE COLUMN tax_rates_id tax_rates_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment
ALTER TABLE tax_rates CHANGE COLUMN tax_zone_id tax_zone_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'
ALTER TABLE tax_rates CHANGE COLUMN tax_class_id tax_class_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'

DROP TABLE users;

ALTER TABLE whos_online CHANGE COLUMN customer_id customer_id int(11) default NULL; # was int(5) default NULL

ALTER TABLE zones CHANGE COLUMN zone_country_id zone_country_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'
ALTER TABLE zones CHANGE COLUMN zone_id zone_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment

ALTER TABLE zones_to_geo_zones CHANGE COLUMN zone_country_id zone_country_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0'
ALTER TABLE zones_to_geo_zones CHANGE COLUMN association_id association_id int(11) NOT NULL auto_increment; # was int(5) NOT NULL auto_increment
ALTER TABLE zones_to_geo_zones CHANGE COLUMN zone_id zone_id int(11) default NULL; # was int(5) default NULL
ALTER TABLE zones_to_geo_zones CHANGE COLUMN geo_zone_id geo_zone_id int(11) default NULL; # was int(5) default NULL

CREATE TABLE orders_total (
  orders_total_id int(10) unsigned NOT NULL auto_increment,
  orders_id int(11) NOT NULL default '0',
  title varchar(255) NOT NULL default '',
  text varchar(255) NOT NULL default '',
  value decimal(15,4) NOT NULL default '0.0000',
  class varchar(32) NOT NULL default '',
  sort_order int(11) NOT NULL default '0',
  PRIMARY KEY  (orders_total_id),
  KEY idx_orders_total_orders_id (orders_id)
) TYPE=MyISAM;

