239
240
241
242
243
244
245
246
247
248
249
250
251
252
|
$db->exec('PRAGMA foreign_keys = OFF; BEGIN;');
// Mise à jour base de données
$db->exec(file_get_contents(ROOT . '/include/data/0.7.2.sql'));
$db->exec('END;');
}
Utils::clearCaches();
$config->setVersion(garradin_version());
echo '<h2>Mise à jour terminée.</h2>
<p><a href="'.WWW_URL.'admin/">Retour</a></p>';
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
|
$db->exec('PRAGMA foreign_keys = OFF; BEGIN;');
// Mise à jour base de données
$db->exec(file_get_contents(ROOT . '/include/data/0.7.2.sql'));
$db->exec('END;');
}
if (version_compare($v, '0.7.3', '<'))
{
// Bug étrange dans la 0.7.2 où la base de données n'est pas mise à jour,
// donc on vérifie et refait la màj ici
try {
$db->exec('SELECT id_auteur FROM compta_rapprochement;');
}
catch (Exception $e)
{
$db->exec('PRAGMA foreign_keys = OFF; BEGIN;');
$db->exec(file_get_contents(ROOT . '/include/data/0.7.2.sql'));
$db->exec('END;');
}
}
Utils::clearCaches();
$config->setVersion(garradin_version());
echo '<h2>Mise à jour terminée.</h2>
<p><a href="'.WWW_URL.'admin/">Retour</a></p>';
|