Blame view

database/update/script_sql/db-update-2016-06-27.sql 892 Bytes
9b4da83b   Alexandre   Version: 2.5.0.0
1
2
use database;

7cc1b02e   Alexandre   bugfixes
3
4
5
set foreign_key_checks=0;

ALTER TABLE `documents` ADD `type_document_id` int(11) DEFAULT NULL;
9b4da83b   Alexandre   Version: 2.5.0.0
6

f6132986   Alexandre   maj db-update-201...
7
CREATE TABLE IF NOT EXISTS `type_documents` (
9b4da83b   Alexandre   Version: 2.5.0.0
8
9
10
11
12
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
);

a7a6c329   Alexandre   bugfixes
13
14
15
16
ALTER TABLE type_documents ENGINE=innoDB;
ALTER TABLE users ENGINE=innoDB;
ALTER TABLE configurations ENGINE=innoDB;

73c4199c   Alexandre   bugfixes
17
18
19
20
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;

ALTER TABLE `documents` DROP `chemin`;
ALTER TABLE `documents` DROP `description`;
9b4da83b   Alexandre   Version: 2.5.0.0
21

9b4da83b   Alexandre   Version: 2.5.0.0
22
23
24
ALTER TABLE `documents` ADD `description` text DEFAULT NULL;
ALTER TABLE `documents` ADD `nom` VARCHAR(100) DEFAULT NULL;

9b4da83b   Alexandre   Version: 2.5.0.0
25
26
27

DROP TABLE IF EXISTS `fichiers`;
DROP TABLE IF EXISTS `utilisateurs`;
73c4199c   Alexandre   bugfixes
28
29

Insert into type_documents(id, nom) values (1, 'N/A');