2
0
forked from Wavyzz/dolibarr

Fix resource data structure missing address state (#26370)

* Added fk_state foreign key

* Update llx_resource.key.sql

* Update 18.0.0-19.0.0.sql

---------

Co-authored-by: William Mead <william.mead@manchenumerique.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
William Mead
2023-10-26 12:36:12 +02:00
committed by GitHub
parent a21443bebe
commit 3697580d7a
3 changed files with 8 additions and 0 deletions

View File

@@ -146,6 +146,9 @@ ALTER TABLE llx_resource ADD COLUMN max_users integer DEFAULT NULL AFTER photo_f
ALTER TABLE llx_resource ADD COLUMN phone varchar(255) DEFAULT NULL AFTER user_places;
ALTER TABLE llx_resource ADD COLUMN email varchar(255) DEFAULT NULL AFTER phone;
ALTER TABLE llx_resource ADD COLUMN url varchar(255) DEFAULT NULL AFTER email;
ALTER TABLE llx_resource ADD COLUMN fk_state integer DEFAULT NULL AFTER fk_country;
ALTER TABLE llx_resource ADD INDEX idx_resource_fk_state (fk_state);
--ALTER TABLE llx_resource ADD CONSTRAINT fk_resource_fk_state FOREIGN KEY (fk_state) REFERENCES llx_c_departements (rowid);
ALTER TABLE llx_user_rib ADD COLUMN bic_intermediate varchar(11) AFTER bic;
ALTER TABLE llx_bank_account ADD COLUMN bic_intermediate varchar(11) AFTER bic;

View File

@@ -1,5 +1,6 @@
-- Module to manage resources into Dolibarr ERP/CRM
-- Copyright (C) 2013 Jean-François Ferry <jfefe@aternatik.fr>
-- Copyright (C) 2023 William Mead <william.mead@manchenumerique.fr>
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
@@ -21,3 +22,6 @@ ALTER TABLE llx_resource ADD INDEX fk_code_type_resource_idx (fk_code_type_resou
ALTER TABLE llx_resource ADD INDEX idx_resource_fk_country (fk_country);
ALTER TABLE llx_resource ADD CONSTRAINT fk_resource_fk_country FOREIGN KEY (fk_country) REFERENCES llx_c_country (rowid);
ALTER TABLE llx_resource ADD INDEX idx_resource_fk_state (fk_state);
--ALTER TABLE llx_resource ADD CONSTRAINT fk_resource_fk_state FOREIGN KEY (fk_state) REFERENCES llx_c_departements (rowid);

View File

@@ -43,5 +43,6 @@ CREATE TABLE llx_resource
import_key varchar(14),
extraparams varchar(255), -- for stock other parameters with json format
fk_country integer DEFAULT NULL, -- Optional id of original country
fk_state integer DEFAULT NULL,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
)ENGINE=innodb;