Commit f61329860009e3d6e4a0c03b9abeb7dec4679a67

Authored by Alexandre
1 parent 9b4da83b

maj db-update-2016-06-27.sql

Showing 1 changed file with 2 additions and 3 deletions   Show diff stats
database/update/script_sql/db-update-2016-06-27.sql
... ... @@ -3,7 +3,7 @@ use database;
3 3 ALTER TABLE `documents` DROP `chemin`;
4 4 ALTER TABLE `documents` DROP `description`;
5 5  
6   -CREATE TABLE `type_documents` (
  6 +CREATE TABLE IF NOT EXISTS `type_documents` (
7 7 `id` int(11) NOT NULL AUTO_INCREMENT,
8 8 `nom` varchar(100) DEFAULT NULL,
9 9 PRIMARY KEY (`id`)
... ... @@ -15,8 +15,7 @@ ALTER TABLE `documents` ADD `type_document_id` int(11) DEFAULT 1;
15 15 ALTER TABLE `documents` ADD `description` text DEFAULT NULL;
16 16 ALTER TABLE `documents` ADD `nom` VARCHAR(100) DEFAULT NULL;
17 17  
18   -ALTER TABLE `documents`
19   - ADD CONSTRAINT `fk_documents_type_documents_id` FOREIGN KEY (`type_document_id`) REFERENCES `type_documents` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION;
  18 +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;
20 19  
21 20 DROP TABLE IF EXISTS `fichiers`;
22 21 DROP TABLE IF EXISTS `utilisateurs`;
... ...