Fix dell'aggiornamento

This commit is contained in:
Thomas Zilio 2017-08-30 15:24:26 +02:00
parent 0a6b708960
commit 5b71a4c956
3 changed files with 6 additions and 3 deletions

View File

@ -40,7 +40,7 @@ if (!empty($rsddt)) {
'.Modules::link('Ddt di vendita', $rsddt[$i]['idddt'], $rsddt[$i]['numero_esterno']).'
</td>
<td>
<span>'.Translator::dateToLocale($rsddt[$i]['data']).'</span>
<span>'.(!empty($rsddt[$i]['data']) ? Translator::dateToLocale($rsddt[$i]['data']) : '').'</span>
</td>
<td>
<span>'.$rsddt[$i]['descrizione'].'</span>

View File

@ -153,7 +153,8 @@ if(!empty($fk)){
$database->query("ALTER TABLE `in_interventi_tecnici` DROP FOREIGN KEY `in_interventi_tecnici_ibfk_1`");
}
$database->query("ALTER TABLE `in_interventi` CHANGE `idintervento` `codice` varchar(25) NOT NULL UNIQUE");
$database->query("ALTER TABLE `in_interventi` DROP PRIMARY KEY, CHANGE `idintervento` `codice` varchar(25) NOT NULL UNIQUE, ADD PRIMARY KEY (`id`)");
$database->query("DROP INDEX primary_key ON `in_interventi`");
// Fix dei timestamp delle tabelle mg_prodotti, mg_movimenti, zz_logs e zz_files
$database->query('UPDATE `mg_prodotti` SET `created_at` = `data`, `updated_at` = `data`');

View File

@ -15,7 +15,9 @@ ALTER TABLE `zz_modules` CHANGE `module_dir` `directory` varchar(50) NOT NULL, C
UPDATE `zz_modules` SET `name` = REPLACE(`name`, '&agrave;', 'à'), `title` = REPLACE(`title`, '&agrave;', 'à');
-- Adattamento della tabella in_interventi
ALTER TABLE `in_interventi` DROP PRIMARY KEY, ADD `id` int(11) NOT NULL AUTO_INCREMENT FIRST, ADD PRIMARY KEY (`id`);
ALTER TABLE `in_interventi` ADD `id` int(11) NOT NULL;
CREATE INDEX primary_key ON `in_interventi` (`id`);
ALTER TABLE `in_interventi` CHANGE `id` `id` int(11) NOT NULL AUTO_INCREMENT FIRST;
ALTER TABLE `my_impianti_interventi` DROP PRIMARY KEY;