This is an ongoing list of *any* changes to *any* DataDict array in a schema_inc in *any* package.
|
|
||Date|Table|Reason|who
|
+15-SEP-2009 | bitcommerce | major refactor of order and shopping cart, move to database only carts (no more session junk) | [/spider] |
+Sql92 UPDATE: |{code source="sql"} |
+ALTER TABLE com_products RENAME products_price_sorter TO lowest_purchase_price; |
+ |
+DELETE FROM com_customers_basket_att; |
+DELETE FROM com_customers_basket; |
+ |
+ALTER TABLE com_customers_basket RENAME products_id TO products_key; |
+ALTER TABLE com_customers_basket ADD products_id INT NOT NULL; |
+ALTER TABLE com_customers_basket ADD CONSTRAINT com_customers_basket_products_ref FOREIGN KEY (products_id) REFERENCES com_products(products_id); |
+ALTER TABLE com_customers_basket DROP customers_basket_date_added; |
+ALTER TABLE com_customers_basket ADD date_added TIMESTAMP; |
+ALTER TABLE com_customers_basket ADD cookie VARCHAR(64); |
+ |
+ALTER TABLE com_customers_basket_att DROP COLUMN customers_id; |
+ALTER TABLE com_customers_basket_att DROP COLUMN products_id; |
+ALTER TABLE com_customers_basket_att ADD customers_basket_id int NOT NULL; |
+ALTER TABLE com_customers_basket_att ADD CONSTRAINT com_customers_basket_att_ref FOREIGN KEY (customers_basket_id) REFERENCES com_customers_basket(customers_basket_id); |
+ |
+ALTER TABLE com_customers_basket_att DROP products_options_sort_order; |
+ALTER TABLE com_customers_basket_att RENAME COLUMN products_options_id TO products_options_key; |
+ALTER TABLE com_customers_basket_att ADD products_options_id INT NOT NULL; |
+ALTER TABLE com_customers_basket_att RENAME products_options_value_id TO products_options_values_id; |
+ALTER TABLE com_customers_basket RENAME customers_basket_quantity TO products_quantity;{/code} |
+01-AUG-2007 | bitcommerce | trim products_options_html_attributes field name | [/lsces] |
+Sql92 UPDATE: |{code source="sql"} |
+ALTER TABLE com_products_options |
+RENAME products_options_html_attributes TO products_options_html_attrib |
+{/code} |
+04-APR-2007 | bitcommerce | add commission payment table | [/spider] |
+Sql92 UPDATE: |{code source="sql"} |
+CREATE TABLE com_commissions_payments ( commissions_payment_id SERIAL PRIMARY KEY, payee_user_id INT NOT NULL, payer_user_id INT NOT NULL, period_start_date BIGINT NOT NULL, period_end_date BIGINT NOT NULL, payment_date BIGINT NOT NULL, payment_amount NUMERIC(15,2) NOT NULL, payment_method VARCHAR(250) NOT NULL, payment_reference_number VARCHAR(250) NOT NULL, payment_note TEXT, CONSTRAINT com_commissions_payments_payee_ref FOREIGN KEY (payee_user_id) REFERENCES users_users(user_id), CONSTRAINT com_commissions_payments_payer_ref FOREIGN KEY (payer_user_id) REFERENCES users_users(user_id) ); |
+{/code} |
+04-FEB-2007 | bitcommerce | Add html attributes field for options controller to provide a handy place to place javascript | [/spider] |
+Sql92 UPDATE: |{code source="sql"} |
+ALTER TABLE com_products_options ADD products_options_html_attributes TEXT; |
+{/code} |
+06-JAN-2007 | bitcommerce | Massive normailization and simplication of the products options/values/attributes mess into simple "Product Options" with a table for the options (still called product_attributes for now) and a mapping table, com_products_options_map | [/spider] |
+Sql92 UPDATE: |{code source="sql"} |
+ALTER TABLE com_products_options ADD PRIMARY KEY(products_options_id); |
+ALTER TABLE com_products_options_values ADD PRIMARY KEY(products_options_values_id); |
+ |
+CREATE TABLE com.com_products_attributes_normal ( products_attributes_id SERIAL, products_id INT4 NOT NULL, products_options_id INT4 NOT NULL, products_options_values_id INT4 NOT NULL, options_values_price NUMERIC, price_prefix VARCHAR(1), products_options_sort_order INT4, product_attribute_is_free SMALLINT, products_attributes_wt FLOAT8, products_attributes_wt_pfix VARCHAR(1), attributes_display_only SMALLINT, attributes_default SMALLINT, attributes_discounted SMALLINT DEFAULT 1 NOT NULL, attributes_image VARCHAR(64), attributes_price_base_inc SMALLINT DEFAULT 1 NOT NULL, attributes_price_onetime NUMERIC, attributes_price_factor NUMERIC, attributes_pf_offset NUMERIC, attributes_pf_onetime NUMERIC, attributes_pf_onetime_offset NUMERIC, attributes_qty_prices TEXT, attributes_qty_prices_onetime TEXT, attributes_price_words NUMERIC, attributes_price_words_free INT2, attributes_price_letters NUMERIC, attributes_price_letters_free INT2, attributes_required SMALLINT , CONSTRAINT "prod_attr_products_id_ref" FOREIGN KEY ( "products_id" ) REFERENCES "com_products"( "products_id" ), CONSTRAINT "prod_attr_options_id_ref" FOREIGN KEY ( "products_options_id" ) REFERENCES "com_products_options"( "products_options_id" ), CONSTRAINT "prod_attr_options_val_id_ref" FOREIGN KEY ( "products_options_values_id" ) REFERENCES "com_products_options_values"( "products_options_values_id" ), PRIMARY KEY (products_options_values_id) ); |
+ |
+CREATE TABLE com.com_products_options_map (products_id INT NOT NULL, products_options_values_id INT NOT NULL, override_price NUMERIC ); |
+ALTER TABLE com_products_options_map ADD PRIMARY KEY (products_id,products_options_values_id); |
+CREATE INDEX com_products_options_map_prod_idx ON com_products_options_map(products_id); |
+CREATE INDEX com_products_options_map_att_idx ON com_products_options_map(products_options_values_id); |
+ |
+INSERT INTO com_products_attributes_normal (SELECT * FROM com_products_attributes WHERE products_attributes_id IN (select products_attributes_id FROM (select distinct options_id, options_values_id, MIN(products_attributes_id) AS products_attributes_id FROM com_products_attributes group by options_id, options_values_id) AS sub)); |
+ |
+UPDATE com_products_attributes_normal SET products_attributes_id = nextval('com_products_attributes_normal_products_attributes_id_seq'); |
+ |
+INSERT INTO com.com_products_options_map (SELECT cpa.products_id, cpan.products_options_values_id FROM com_products_attributes cpa INNER JOIN com_products_attributes_normal cpan ON(cpa.options_id=cpan.products_options_id AND cpa.options_values_id=cpan.products_options_values_id)); |
+ |
+-- Swap the new and the old |
+ALTER TABLE com_products_attributes RENAME TO com_products_attributes_old; |
+ALTER TABLE com_products_attributes_normal RENAME TO com_products_attributes; |
+ALTER TABLE com_products_attributes DROP COLUMN products_id; |
+ |
+ALTER TABLE com_products_attributes ADD products_options_values_name VARCHAR(64); |
+UPDATE com_products_attributes SET products_options_values_name=(SELECT products_options_values_name FROM com_products_options_values cpov WHERE cpov.products_options_values_id=com_products_attributes.products_options_values_id); |
+ALTER TABLE com_products_attributes ALTER products_options_values_name SET NOT NULL; |
+ALTER TABLE com_products_options_values RENAME TO drop_com_products_options_values; |
+ALTER TABLE com_prd_opt_val_to_prd_opt RENAME TO drop_com_prd_opt_val_to_prd_opt; |
+{/code} |
03-SEP-2006 | bitcommerce | add user_id to com_orders_status_history | [/spider]
|
Sql92 UPDATE: |{code source="sql"}
|
ALTER TABLE com_orders_status_history ADD COLUMN user_id INT;
|