mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Add Secrets to ApplicationBox.
This commit is contained in:
@@ -185,46 +185,47 @@ abstract class base implements cache_cacheableInterface
|
||||
$stmt->closeCursor();
|
||||
|
||||
$ORMTables = [
|
||||
'AuthFailures',
|
||||
'ApiApplications',
|
||||
'AggregateTokens',
|
||||
'ApiAccounts',
|
||||
'ApiApplications',
|
||||
'ApiLogs',
|
||||
'ApiOauthCodes',
|
||||
'ApiOauthRefreshTokens',
|
||||
'ApiOauthTokens',
|
||||
'AggregateTokens',
|
||||
'AuthFailures',
|
||||
'BasketElements',
|
||||
'Baskets',
|
||||
'FeedEntries',
|
||||
'FeedItems',
|
||||
'FeedPublishers',
|
||||
'FeedTokens',
|
||||
'Feeds',
|
||||
'FeedTokens',
|
||||
'FtpCredential',
|
||||
'FtpExportElements',
|
||||
'FtpExports',
|
||||
'LazaretAttributes',
|
||||
'LazaretChecks',
|
||||
'LazaretFiles',
|
||||
'LazaretSessions',
|
||||
'OrderElements',
|
||||
'Orders',
|
||||
'Registrations',
|
||||
'Secrets',
|
||||
'SessionModules',
|
||||
'Sessions',
|
||||
'StoryWZ',
|
||||
'Tasks',
|
||||
'UserNotificationSettings',
|
||||
'UserQueries',
|
||||
'Users',
|
||||
'UserSettings',
|
||||
'UsrAuthProviders',
|
||||
'UsrListOwners',
|
||||
'UsrLists',
|
||||
'UsrListsContent',
|
||||
'ValidationDatas',
|
||||
'ValidationParticipants',
|
||||
'ValidationSessions',
|
||||
'LazaretAttributes',
|
||||
'LazaretChecks',
|
||||
'LazaretFiles',
|
||||
'LazaretSessions',
|
||||
'SessionModules',
|
||||
'Sessions',
|
||||
'Tasks',
|
||||
'UsrAuthProviders',
|
||||
'UserQueries',
|
||||
'UserSettings',
|
||||
'Users',
|
||||
'UserNotificationSettings',
|
||||
];
|
||||
|
||||
foreach ($rs as $row) {
|
||||
@@ -742,6 +743,7 @@ abstract class base implements cache_cacheableInterface
|
||||
foreach ($list_patches as $patch) {
|
||||
// Gets doctrine migrations required for current patch
|
||||
foreach ($patch->getDoctrineMigrations() as $doctrineVersion) {
|
||||
/** @var \Doctrine\DBAL\Migrations\Version $version */
|
||||
$version = $app['doctrine-migration.configuration']->getVersion($doctrineVersion);
|
||||
// Skip if already migrated
|
||||
if ($version->isMigrated()) {
|
||||
@@ -750,17 +752,22 @@ abstract class base implements cache_cacheableInterface
|
||||
|
||||
$migration = $version->getMigration();
|
||||
|
||||
// Inject entity manager
|
||||
$migration->setEntityManager($app['orm.em']);
|
||||
// Handle legacy migrations
|
||||
if ($migration instanceof \Alchemy\Phrasea\Setup\DoctrineMigrations\AbstractMigration) {
|
||||
// Inject entity manager
|
||||
$migration->setEntityManager($app['orm.em']);
|
||||
|
||||
// Execute migration if not marked as migrated and not already applied by an older patch
|
||||
if (!$migration->isAlreadyApplied()) {
|
||||
// Execute migration if not marked as migrated and not already applied by an older patch
|
||||
if (!$migration->isAlreadyApplied()) {
|
||||
$version->execute('up');
|
||||
continue;
|
||||
}
|
||||
|
||||
// Or mark it as migrated
|
||||
$version->markMigrated();
|
||||
} else {
|
||||
$version->execute('up');
|
||||
continue;
|
||||
}
|
||||
|
||||
// Or mark it as migrated
|
||||
$version->markMigrated();
|
||||
}
|
||||
|
||||
if (false === $patch->apply($this, $app)) {
|
||||
|
63
lib/classes/patch/400alpha2a.php
Normal file
63
lib/classes/patch/400alpha2a.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2015 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
|
||||
class patch_400alpha2a implements patchInterface
|
||||
{
|
||||
/** @var string */
|
||||
private $release = '4.0.0-alpha.2';
|
||||
|
||||
/** @var array */
|
||||
private $concern = [base::APPLICATION_BOX];
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function get_release()
|
||||
{
|
||||
return $this->release;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getDoctrineMigrations()
|
||||
{
|
||||
return [
|
||||
'20150519173347',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function require_all_upgrades()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function concern()
|
||||
{
|
||||
return $this->concern;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function apply(base $databox, Application $app)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user