Fix: Error in creation foreign key

This commit is contained in:
Laurent Destailleur 2010-06-17 15:53:57 +00:00
parent 97278f000c
commit 3edc470f73

View File

@ -21,6 +21,7 @@ ALTER TABLE llx_bookmark ADD COLUMN position integer DEFAULT 0;
-- rename llx_product_det
ALTER TABLE llx_product_det RENAME TO llx_product_lang;
ALTER TABLE llx_product_lang ADD UNIQUE INDEX uk_product_lang (fk_product, lang);
-- V4.1 DELETE FROM llx_product_lang WHERE fk_product NOT IN (SELECT rowid from llx_product);
ALTER TABLE llx_product_lang ADD CONSTRAINT fk_product_lang_fk_product FOREIGN KEY (fk_product) REFERENCES llx_product (rowid);
ALTER TABLE llx_product ADD COLUMN virtual tinyint DEFAULT 0 NOT NULL AFTER tms;