From f96dd391fa2891612d77cb294d81cf1ac48db791 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 13 Aug 2018 16:11:23 +0200 Subject: [PATCH] Fix error in foreign key pointing to old table --- htdocs/install/mysql/migration/7.0.0-8.0.0.sql | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/install/mysql/migration/7.0.0-8.0.0.sql b/htdocs/install/mysql/migration/7.0.0-8.0.0.sql index 530070c8252..a3bed1fd332 100644 --- a/htdocs/install/mysql/migration/7.0.0-8.0.0.sql +++ b/htdocs/install/mysql/migration/7.0.0-8.0.0.sql @@ -32,6 +32,10 @@ -- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup); +-- Forgot in < 4.0 + +ALTER TABLE llx_c_ziptown DROP FOREIGN KEY fk_c_ziptown_fk_pays; +ALTER TABLE llx_c_ziptown ADD CONSTRAINT fk_c_ziptown_fk_pays FOREIGN KEY (fk_pays) REFERENCES llx_c_country(rowid); -- Forgot in 7.0 @@ -48,6 +52,8 @@ ALTER TABLE llx_ecm_files ADD UNIQUE INDEX uk_ecm_files (filepath, filename, ent UPDATE llx_const set name = __ENCRYPT('INVOICE_FREE_TEXT')__ where name = __ENCRYPT('FACTURE_FREE_TEXT')__; +fk_c_ziptown_fk_pays + -- drop very old table (bad name) DROP TABLE llx_c_accountancy_category;