Fix missing index

This commit is contained in:
Laurent Destailleur 2017-12-19 16:22:47 +01:00
parent f504716501
commit 01c99b780e
2 changed files with 5 additions and 1 deletions

View File

@ -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 = '';

View File

@ -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
-- 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)