From 15a40f64018423a00982399c004e61dfa3d8d0ee Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 11 Aug 2016 15:50:18 +0200 Subject: [PATCH] Fix default value of entity --- htdocs/install/mysql/migration/3.9.0-4.0.0.sql | 8 ++++---- htdocs/install/mysql/tables/llx_oauth_state.sql | 2 +- htdocs/install/mysql/tables/llx_oauth_token.sql | 2 +- htdocs/install/mysql/tables/llx_product_lot.sql | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql index 1309c1dc225..a9ce468a14c 100644 --- a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql +++ b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql @@ -47,7 +47,7 @@ DELETE FROM llx_user_param where param = 'MAIN_THEME' and value in ('auguria', ' -- DROP TABLE llx_product_lot; CREATE TABLE llx_product_lot ( rowid integer AUTO_INCREMENT PRIMARY KEY, - entity integer, + entity integer DEFAULT 1, fk_product integer NOT NULL, -- Id of product batch varchar(30) DEFAULT NULL, -- Lot or serial number eatby date DEFAULT NULL, -- Eatby date @@ -198,7 +198,7 @@ ALTER TABLE llx_extrafields ADD COLUMN ishidden integer DEFAULT 0; ALTER TABLE llx_paiementfourn ADD COLUMN ref varchar(30) AFTER rowid; -ALTER TABLE llx_paiementfourn ADD COLUMN entity integer AFTER ref; +ALTER TABLE llx_paiementfourn ADD COLUMN entity integer DEFAULT 1 AFTER ref; CREATE TABLE llx_multicurrency @@ -499,7 +499,7 @@ CREATE TABLE llx_oauth_token ( token text, fk_user integer, fk_adherent integer, - entity integer + entity integer DEFAULT 1 )ENGINE=InnoDB; CREATE TABLE llx_oauth_state ( @@ -508,7 +508,7 @@ CREATE TABLE llx_oauth_state ( state varchar(128), fk_user integer, fk_adherent integer, - entity integer + entity integer DEFAuLT 1 )ENGINE=InnoDB; -- At end (higher risk of error) diff --git a/htdocs/install/mysql/tables/llx_oauth_state.sql b/htdocs/install/mysql/tables/llx_oauth_state.sql index 92cae17ef07..bab41e95f13 100644 --- a/htdocs/install/mysql/tables/llx_oauth_state.sql +++ b/htdocs/install/mysql/tables/llx_oauth_state.sql @@ -21,5 +21,5 @@ CREATE TABLE llx_oauth_state ( state varchar(128), fk_user integer, fk_adherent integer, - entity integer + entity integer DEFAULT 1 )ENGINE=InnoDB; \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_oauth_token.sql b/htdocs/install/mysql/tables/llx_oauth_token.sql index 5dd5cd0507f..0ae4fed1ea8 100644 --- a/htdocs/install/mysql/tables/llx_oauth_token.sql +++ b/htdocs/install/mysql/tables/llx_oauth_token.sql @@ -21,5 +21,5 @@ CREATE TABLE llx_oauth_token ( token text, fk_user integer, fk_adherent integer, - entity integer + entity integer DEFAULT 1 )ENGINE=InnoDB; \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_product_lot.sql b/htdocs/install/mysql/tables/llx_product_lot.sql index 498b6039977..3cf10b893ce 100644 --- a/htdocs/install/mysql/tables/llx_product_lot.sql +++ b/htdocs/install/mysql/tables/llx_product_lot.sql @@ -19,7 +19,7 @@ CREATE TABLE llx_product_lot ( rowid integer AUTO_INCREMENT PRIMARY KEY, - entity integer, + entity integer DEFAULT 1, fk_product integer NOT NULL, -- Id of product batch varchar(30) DEFAULT NULL, -- Lot or serial number eatby date DEFAULT NULL, -- Eatby date