Skip to content
Snippets Groups Projects
Commit 20141ec9 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix default value of new table

parent 34c19f9c
Branches
Tags
No related merge requests found
...@@ -47,7 +47,7 @@ DELETE FROM llx_user_param where param = 'MAIN_THEME' and value in ('auguria', ' ...@@ -47,7 +47,7 @@ DELETE FROM llx_user_param where param = 'MAIN_THEME' and value in ('auguria', '
-- DROP TABLE llx_product_lot; -- DROP TABLE llx_product_lot;
CREATE TABLE llx_product_lot ( CREATE TABLE llx_product_lot (
rowid integer AUTO_INCREMENT PRIMARY KEY, rowid integer AUTO_INCREMENT PRIMARY KEY,
entity integer, entity integer DEFAULT 1,
fk_product integer NOT NULL, -- Id of product fk_product integer NOT NULL, -- Id of product
batch varchar(30) DEFAULT NULL, -- Lot or serial number batch varchar(30) DEFAULT NULL, -- Lot or serial number
eatby date DEFAULT NULL, -- Eatby date eatby date DEFAULT NULL, -- Eatby date
...@@ -61,6 +61,10 @@ CREATE TABLE llx_product_lot ( ...@@ -61,6 +61,10 @@ CREATE TABLE llx_product_lot (
ALTER TABLE llx_product_lot ADD UNIQUE INDEX uk_product_lot(fk_product, batch); ALTER TABLE llx_product_lot ADD UNIQUE INDEX uk_product_lot(fk_product, batch);
-- VPGSQL8.2 ALTER TABLE llx_product_lot ALTER COLUMN entity SET DEFAULT 1;
ALTER TABLE llx_product_lot MODIFY COLUMN entity integer DEFAULT 1;
UPDATE llx_product_lot SET entity = 1 WHERE entity IS NULL;
DROP TABLE llx_stock_serial; DROP TABLE llx_stock_serial;
ALTER TABLE llx_product ADD COLUMN note_public text; ALTER TABLE llx_product ADD COLUMN note_public text;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment