diff --git a/htdocs/install/mysql/migration/24.0.0-25.0.0.sql b/htdocs/install/mysql/migration/24.0.0-25.0.0.sql index 364e8c177e4..bb9ab59b4ed 100644 --- a/htdocs/install/mysql/migration/24.0.0-25.0.0.sql +++ b/htdocs/install/mysql/migration/24.0.0-25.0.0.sql @@ -78,4 +78,9 @@ UPDATE llx_commande_fournisseurdet SET subprice_ttc = 0 WHERE subprice_ttc <> 0 UPDATE llx_facture_fourn_det SET pu_ttc = 0 WHERE pu_ttc <> 0 AND EXISTS (SELECT c.rowid FROM llx_const as c WHERE c.name = 'MAIN_VERSION_LAST_UPGRADE' AND c.value < '25.0.0'); UPDATE llx_supplier_proposaldet SET subprice_ttc = 0 WHERE subprice_ttc <> 0 AND EXISTS (SELECT c.rowid FROM llx_const as c WHERE c.name = 'MAIN_VERSION_LAST_UPGRADE' AND c.value < '25.0.0'); +-- Explicit contact address mode flag. NULL keeps the legacy resolution for existing records, +-- so an existing alternative contact address stays independent from its thirdparty address. +-- VMYSQL4.1 ALTER TABLE llx_socpeople ADD COLUMN use_thirdparty_address smallint DEFAULT NULL AFTER fk_soc; +-- VPGSQL8.2 ALTER TABLE llx_socpeople ADD COLUMN use_thirdparty_address smallint DEFAULT NULL; + -- end of migration diff --git a/htdocs/install/mysql/tables/llx_socpeople.sql b/htdocs/install/mysql/tables/llx_socpeople.sql index ce980d864c4..14e7423cf80 100644 --- a/htdocs/install/mysql/tables/llx_socpeople.sql +++ b/htdocs/install/mysql/tables/llx_socpeople.sql @@ -25,6 +25,7 @@ create table llx_socpeople datec datetime, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_soc integer, -- lien vers la societe + use_thirdparty_address smallint DEFAULT NULL, -- 1=use linked thirdparty address, 0=use contact address, null=legacy resolution entity integer DEFAULT 1 NOT NULL, -- multi company id ref_ext varchar(255), -- reference into an external system (not used by dolibarr) name_alias varchar(255),