NEW: ref in product customer price: add fields in database

This commit is contained in:
Marc de Lima Lucio 2020-10-26 10:52:22 +01:00
parent 858c48bd15
commit f4e63bb046
3 changed files with 7 additions and 2 deletions

View File

@ -423,6 +423,9 @@ ALTER TABLE llx_product MODIFY COLUMN finished tinyint DEFAULT NULL;
ALTER TABLE llx_product ADD CONSTRAINT fk_product_finished FOREIGN KEY (finished) REFERENCES llx_c_product_nature (code);
ALTER TABLE llx_product_customer_price ADD COLUMN ref_customer varchar(30);
ALTER TABLE llx_product_customer_price_log ADD COLUMN ref_customer varchar(30);
-- MIGRATION TO DO AFTER RENAMING AN OBJECT
-- drop constraint

View File

@ -27,7 +27,8 @@ create table llx_product_customer_price
datec datetime,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_product integer NOT NULL,
fk_soc integer NOT NULL,
fk_soc integer NOT NULL,
ref_customer varchar(30),
price double(24,8) DEFAULT 0,
price_ttc double(24,8) DEFAULT 0,
price_min double(24,8) DEFAULT 0,

View File

@ -26,7 +26,8 @@ create table llx_product_customer_price_log
entity integer DEFAULT 1 NOT NULL, -- multi company id
datec datetime,
fk_product integer NOT NULL,
fk_soc integer DEFAULT 0 NOT NULL,
fk_soc integer DEFAULT 0 NOT NULL,
ref_customer varchar(30),
price double(24,8) DEFAULT 0,
price_ttc double(24,8) DEFAULT 0,
price_min double(24,8) DEFAULT 0,