Blame view

database/update/script_sql/db-update-2016-06-15.sql 1.34 KB
97276a4a   Etienne Pallier   Mise à jour page ...
1
2
3
4
5
use database;

-- On execute TOUT ou RIEN
START TRANSACTION;

d58b8953   Alexandre   Version: 2.4.4.0
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
ALTER TABLE `configurations` ADD `emailGuest6` varchar(45)  DEFAULT NULL;
ALTER TABLE `configurations` ADD `emailGuest7` varchar(45)  DEFAULT NULL;
ALTER TABLE `configurations` ADD `emailGuest8` varchar(45)  DEFAULT NULL;
ALTER TABLE `configurations` ADD `emailGuest9` varchar(45)  DEFAULT NULL;
ALTER TABLE `configurations` ADD `emailGuest10` varchar(45)  DEFAULT NULL;

update emprunts set date_emprunt = NULL where date_emprunt = '1970-01-01';
update emprunts set date_retour_emprunt = NULL where date_retour_emprunt = '1970-01-01';

update suivis set date_controle = NULL where date_controle = '1970-01-01';
update suivis set date_prochain_controle = NULL where date_prochain_controle = '1970-01-01';

update materiels set date_acquisition = NULL where date_acquisition = '1970-01-01';
update materiels set date_archivage = NULL where date_archivage = '1970-01-01';
update materiels set date_reception = NULL where date_reception = '1970-01-01';

ALTER TABLE `configurations` ADD `host2_ldap` text DEFAULT NULL;
update configurations set host2_ldap = host_ldap where id = 1;
ALTER TABLE `configurations` DROP `host_ldap`;
ALTER TABLE `configurations` ADD `host_ldap` text DEFAULT NULL;
update configurations set host_ldap = host2_ldap where id = 1;
ALTER TABLE `configurations` DROP `host2_ldap`;
97276a4a   Etienne Pallier   Mise à jour page ...
28
29

COMMIT;