Commit 7cc1b02e3a5566e0c0be67a529d69e9ebef32fb7
1 parent
fe672157
Exists in
master
and in
3 other branches
bugfixes
Showing
4 changed files
with
12 additions
and
5 deletions
Show diff stats
database/labinvent_2.1_12-05-16.sql
... | ... | @@ -77,10 +77,10 @@ CREATE TABLE IF NOT EXISTS `documents` ( |
77 | 77 | `nom` VARCHAR(100) DEFAULT NULL, |
78 | 78 | `materiel_id` int(11) DEFAULT NULL, |
79 | 79 | `suivi_id` int(11) DEFAULT NULL, |
80 | - `type_document_id` int(11) DEFAULT 1, | |
80 | + `type_document_id` int(11) DEFAULT NULL, | |
81 | 81 | PRIMARY KEY (`id`), |
82 | 82 | KEY `fk_documents_materiel_id` (`materiel_id`), |
83 | - KEY `fk_documents_suivi_id` (`suivi_id`) | |
83 | + KEY `fk_documents_suivi_id` (`suivi_id`), | |
84 | 84 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; |
85 | 85 | |
86 | 86 | -- -------------------------------------------------------- | ... | ... |
database/update/script_sql/.gitignore
database/update/script_sql/db-update-2016-06-27-irap.sql
1 | 1 | use database; |
2 | 2 | |
3 | +set foreign_key_checks=0; | |
4 | + | |
5 | +ALTER TABLE `documents` DROP `type_document_id`; | |
6 | + | |
7 | +ALTER TABLE `documents` ADD `type_document_id` int(11) DEFAULT NULL; | |
3 | 8 | ALTER TABLE `documents` ADD CONSTRAINT `fk_documents_type_documents_id` FOREIGN KEY (`type_document_id`) REFERENCES `type_documents` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION; |
4 | 9 | ... | ... |
database/update/script_sql/db-update-2016-06-27.sql