mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-15 14:03:27 +00:00
update doctrine table schema before applying patch
This commit is contained in:
@@ -225,6 +225,13 @@ class appbox extends base
|
||||
// it is need before applying patches
|
||||
$advices = $this->upgradeDB(false, $app);
|
||||
|
||||
// update also the doctrine table schema before applying patch
|
||||
if ($app['orm.em']->getConnection()->getDatabasePlatform()->supportsAlterTable()) {
|
||||
$tool = new SchemaTool($app['orm.em']);
|
||||
$metas = $app['orm.em']->getMetadataFactory()->getAllMetadata();
|
||||
$tool->updateSchema($metas, true);
|
||||
}
|
||||
|
||||
foreach ($this->get_databoxes() as $s) {
|
||||
$advices = array_merge($advices, $s->upgradeDB(false, $app));
|
||||
}
|
||||
@@ -240,12 +247,6 @@ class appbox extends base
|
||||
|
||||
$app['phraseanet.cache-service']->flushAll();
|
||||
|
||||
if ($app['orm.em']->getConnection()->getDatabasePlatform()->supportsAlterTable()) {
|
||||
$tool = new SchemaTool($app['orm.em']);
|
||||
$metas = $app['orm.em']->getMetadataFactory()->getAllMetadata();
|
||||
$tool->updateSchema($metas, true);
|
||||
}
|
||||
|
||||
if (version::lt($from_version, '3.1')) {
|
||||
$upgrader->addRecommendation($app->trans('Your install requires data migration, please execute the following command'), 'bin/setup system:upgrade-datas --from=3.1');
|
||||
} elseif (version::lt($from_version, '3.5')) {
|
||||
|
Reference in New Issue
Block a user