From 01c99b780ef93fc9d5ddde055ca6c3ac1412f709 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 19 Dec 2017 16:22:47 +0100 Subject: [PATCH] Fix missing index --- htdocs/install/mysql/migration/6.0.0-7.0.0.sql | 2 ++ .../install/mysql/tables/llx_accounting_bookkeeping.key.sql | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql index f042cb83556..fea6c1a51e6 100644 --- a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql +++ b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql @@ -71,6 +71,8 @@ ALTER TABLE llx_website_page ADD COLUMN type_container varchar(16) NOT NULL DEFA -- For 7.0 +ALTER TABLE llx_accounting_bookkeeping ADD INDEX idx_accounting_bookkeeping_fk_doc (fk_doc); + ALTER TABLE llx_c_revenuestamp ADD COLUMN revenuestamp_type varchar(16) DEFAULT 'fixed' NOT NULL; UPDATE llx_contrat SET ref = rowid WHERE ref IS NULL OR ref = ''; diff --git a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.key.sql b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.key.sql index 8e921a9964c..e035a957f5a 100644 --- a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.key.sql +++ b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.key.sql @@ -17,8 +17,10 @@ -- ============================================================================ ALTER TABLE llx_accounting_bookkeeping ADD INDEX idx_accounting_bookkeeping_doc_date (doc_date); +ALTER TABLE llx_accounting_bookkeeping ADD INDEX idx_accounting_bookkeeping_fk_doc (fk_doc); ALTER TABLE llx_accounting_bookkeeping ADD INDEX idx_accounting_bookkeeping_fk_docdet (fk_docdet); ALTER TABLE llx_accounting_bookkeeping ADD INDEX idx_accounting_bookkeeping_numero_compte (numero_compte); ALTER TABLE llx_accounting_bookkeeping ADD INDEX idx_accounting_bookkeeping_code_journal (code_journal); --- TODO Add a key for unicity \ No newline at end of file +-- Current unicity is tested by the journalize page on couple (fk_doc, doc_type) +-- TODO Add a key for unicity (not so easy as fk_doc, doc_type may have several lines for one piece)