Skip to content
Snippets Groups Projects
Commit 77d5efde authored by Regis Houssin's avatar Regis Houssin
Browse files

Fix: add constraint

parent 3ab469f5
No related branches found
No related tags found
No related merge requests found
......@@ -168,4 +168,10 @@ create table llx_entity
active tinyint DEFAULT 1 NOT NULL
) type=innodb;
INSERT INTO llx_entity (label, description, datec, fk_user_creat, visible, active) VALUES ('Default Entity', 'This is the default entity', NOW(), 1, 1, 1);
\ No newline at end of file
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
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);
......@@ -34,7 +34,7 @@ create table llx_fichinter
fk_user_author integer, -- createur de la fiche
fk_user_valid integer, -- valideur de la fiche
fk_statut smallint DEFAULT 0,
duree real, -- dure totale de l'intervention
duree real, -- duree totale de l'intervention
description text,
note_private text,
note_public text,
......
-- ===================================================================
-- Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id$
-- ===================================================================
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);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment