Fix: Clean orphelins

This commit is contained in:
Laurent Destailleur 2010-04-18 20:55:34 +00:00
parent 88fd8c701e
commit 8f4f9c5de2

View File

@ -212,6 +212,7 @@ create table llx_entity
INSERT INTO llx_entity (rowid, label, description, datec, fk_user_creat, visible, active) VALUES (1, 'Default Entity', 'This is the default entity', NOW(), 1, 1, 1);
-- Add constraint
-- V4.1 DELETE FROM llx_fichinterdet WHERE fk_fichinter NOT IN (SELECT rowid from llx_fichinter);
ALTER TABLE llx_fichinterdet ADD INDEX idx_fichinterdet_fk_fichinter (fk_fichinter);
ALTER TABLE llx_fichinterdet ADD CONSTRAINT fk_fichinterdet_fk_fichinter FOREIGN KEY (fk_fichinter) REFERENCES llx_fichinter (rowid);