From ebca8345b0ff8256b2b33d48fba51547ba6e8cb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 4 Oct 2025 00:08:32 +0200 Subject: [PATCH] add tables missing (#35628) * add tables missing * add tables missing * add tables missing * add tables missing * add tables missing * add tables missing * Update 22.0.0-23.0.0.sql --- .../install/mysql/migration/21.0.0-22.0.0.sql | 2 ++ .../install/mysql/migration/22.0.0-23.0.0.sql | 17 ++++++++----- .../llx_categorie_propal-propal.key.sql | 24 +++++++++++++++++++ 3 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 htdocs/install/mysql/tables/llx_categorie_propal-propal.key.sql diff --git a/htdocs/install/mysql/migration/21.0.0-22.0.0.sql b/htdocs/install/mysql/migration/21.0.0-22.0.0.sql index ab5c0f81644..4ac7f7eb66a 100644 --- a/htdocs/install/mysql/migration/21.0.0-22.0.0.sql +++ b/htdocs/install/mysql/migration/21.0.0-22.0.0.sql @@ -329,3 +329,5 @@ ALTER TABLE llx_blockedlog ADD COLUMN debuginfo mediumtext; ALTER TABLE llx_webhook_history ADD COLUMN trigger_code text NOT NULL; ALTER TABLE llx_webhook_history ADD COLUMN error_message text; ALTER TABLE llx_webhook_history MODIFY COLUMN url varchar(255); + +-- end of migration diff --git a/htdocs/install/mysql/migration/22.0.0-23.0.0.sql b/htdocs/install/mysql/migration/22.0.0-23.0.0.sql index 648a8bd4587..5747ba93504 100644 --- a/htdocs/install/mysql/migration/22.0.0-23.0.0.sql +++ b/htdocs/install/mysql/migration/22.0.0-23.0.0.sql @@ -179,14 +179,19 @@ ALTER TABLE llx_element_contact ADD mandatory_signature TINYINT AFTER element_id -- default deposit % if payment term needs it on supplier ALTER TABLE llx_supplier_proposal ADD COLUMN deposit_percent varchar(63) DEFAULT NULL AFTER fk_cond_reglement; ALTER TABLE llx_commande_fournisseur ADD COLUMN deposit_percent varchar(63) DEFAULT NULL AFTER fk_cond_reglement; - - -create table llx_categorie_propal +CREATE TABLE llx_categorie_propal ( - fk_categorie integer NOT NULL, + fk_categorie integer NOT NULL, fk_propal integer NOT NULL, - import_key varchar(14) -)ENGINE=innodb; + import_key varchar(14) +) ENGINE=innodb; +--noqa:disable=PRS +ALTER TABLE llx_categorie_propal ADD PRIMARY KEY pk_categorie_propal (fk_categorie, fk_propal); +--noqa:enable=PRS +ALTER TABLE llx_categorie_propal ADD INDEX idx_categorie_propal_fk_categorie (fk_categorie); +ALTER TABLE llx_categorie_propal ADD INDEX idx_categorie_propal_fk_propal (fk_propal); +ALTER TABLE llx_categorie_propal ADD CONSTRAINT fk_categorie_propal_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid); +ALTER TABLE llx_categorie_propal ADD CONSTRAINT fk_categorie_propal_fk_propal_rowid FOREIGN KEY (fk_propal) REFERENCES llx_propal (rowid); create table llx_categorie_supplier_proposal ( diff --git a/htdocs/install/mysql/tables/llx_categorie_propal-propal.key.sql b/htdocs/install/mysql/tables/llx_categorie_propal-propal.key.sql new file mode 100644 index 00000000000..f88eea9082e --- /dev/null +++ b/htdocs/install/mysql/tables/llx_categorie_propal-propal.key.sql @@ -0,0 +1,24 @@ +-- ============================================================================ +-- +-- +-- 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 +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- ============================================================================ + +ALTER TABLE llx_categorie_propal ADD PRIMARY KEY pk_categorie_propal (fk_categorie, fk_propal); +ALTER TABLE llx_categorie_propal ADD INDEX idx_categorie_propal_fk_categorie (fk_categorie); +ALTER TABLE llx_categorie_propal ADD INDEX idx_categorie_propal_fk_propal (fk_propal); + +ALTER TABLE llx_categorie_propal ADD CONSTRAINT fk_categorie_propal_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid); +ALTER TABLE llx_categorie_propal ADD CONSTRAINT fk_categorie_propal_fk_propal_rowid FOREIGN KEY (fk_propal) REFERENCES llx_propal (rowid);