mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 05:23:21 +00:00
Remove PreSchema Upgrader
This commit is contained in:
@@ -13,7 +13,6 @@ namespace Alchemy\Phrasea\Core\Provider;
|
||||
|
||||
use Alchemy\Phrasea\Setup\ConfigurationTester;
|
||||
use Alchemy\Phrasea\Application;
|
||||
use Alchemy\Phrasea\Setup\Version\PreSchemaUpgrade\PreSchemaUpgradeCollection;
|
||||
use Silex\Application as SilexApplication;
|
||||
use Silex\ServiceProviderInterface;
|
||||
|
||||
@@ -25,10 +24,6 @@ class ConfigurationTesterServiceProvider implements ServiceProviderInterface
|
||||
$app['phraseanet.configuration-tester'] = $app->share(function (Application $app) {
|
||||
return new ConfigurationTester($app);
|
||||
});
|
||||
|
||||
$app['phraseanet.pre-schema-upgrader'] = $app->share(function () {
|
||||
return new PreSchemaUpgradeCollection();
|
||||
});
|
||||
}
|
||||
|
||||
public function boot(SilexApplication $app)
|
||||
|
@@ -1,41 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2013 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Alchemy\Phrasea\Setup\Version\PreSchemaUpgrade;
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
|
||||
/**
|
||||
* Collection of Doctrine schema pre-upgrades
|
||||
*/
|
||||
class PreSchemaUpgradeCollection
|
||||
{
|
||||
/** @var PreSchemaUpgradeInterface[] */
|
||||
private $upgrades = [];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies all applyable upgrades
|
||||
*
|
||||
* @param Application $app
|
||||
*/
|
||||
public function apply(Application $app)
|
||||
{
|
||||
foreach ($this->upgrades as $upgrade) {
|
||||
if ($upgrade->isApplyable($app)) {
|
||||
$upgrade->apply($app['EM']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,38 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2013 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Alchemy\Phrasea\Setup\Version\PreSchemaUpgrade;
|
||||
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Alchemy\Phrasea\Application;
|
||||
|
||||
/**
|
||||
* Interface for DB schema upgrade that have to be done before Doctrine schema
|
||||
* upgrade
|
||||
*/
|
||||
interface PreSchemaUpgradeInterface
|
||||
{
|
||||
/**
|
||||
* Applies the pre-upgrade/
|
||||
*
|
||||
* @param EntityManager $em
|
||||
*/
|
||||
public function apply(EntityManager $em);
|
||||
|
||||
/**
|
||||
* Returns true if the Upgrade is applyable
|
||||
*
|
||||
* @param Application $app
|
||||
*
|
||||
* @return Boolean
|
||||
*/
|
||||
public function isApplyable(Application $app);
|
||||
}
|
@@ -306,8 +306,6 @@ class appbox extends base
|
||||
|
||||
$upgrader->set_current_message(_('Creating new tables'));
|
||||
|
||||
$app['phraseanet.pre-schema-upgrader']->apply($app);
|
||||
|
||||
$upgrader->add_steps_complete(1);
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user