diff --git a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.key.sql b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.key.sql index 2b756f9da5c..dc76f2a6545 100644 --- a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.key.sql +++ b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.key.sql @@ -17,12 +17,13 @@ -- ============================================================================ ALTER TABLE llx_accounting_bookkeeping ADD INDEX idx_accounting_bookkeeping_ref (ref); +ALTER TABLE llx_accounting_bookkeeping ADD INDEX idx_accounting_bookkeeping_piece_num (piece_num, entity); + 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_doc_date (doc_date); ALTER TABLE llx_accounting_bookkeeping ADD INDEX idx_accounting_bookkeeping_numero_compte (numero_compte, entity); ALTER TABLE llx_accounting_bookkeeping ADD INDEX idx_accounting_bookkeeping_code_journal (code_journal, entity); -ALTER TABLE llx_accounting_bookkeeping ADD INDEX idx_accounting_bookkeeping_piece_num (piece_num, entity); -- Current unicity is tested by the "transfer in accountancy"" 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)