Merge pull request #2674 from aynsix/PHRAS-1929-account-guest-patch-migration-doctrine

PHRAS-1929 guest account patch doctrine migration
This commit is contained in:
Nicolas Maillat
2018-07-11 15:42:15 +02:00
committed by GitHub
3 changed files with 63 additions and 2 deletions

View File

@@ -16,7 +16,7 @@ class Version
/**
* @var string
*/
private $number = '4.1.0-alpha.10';
private $number = '4.1.0-alpha.11';
/**
* @var string

View File

@@ -16,7 +16,7 @@ class Version20180614113404 extends AbstractMigration
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('UPDATE Users SET guest = 1 WHERE login LIKE "guest%"');
$this->addSql('UPDATE Users SET guest = 1 WHERE login LIKE "guest%" OR login LIKE "(#deleted_guest%"');
}
/**

View File

@@ -0,0 +1,61 @@
<?php
/*
* This file is part of Phraseanet
*
* (c) 2005-2016 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_410alpha11a implements patchInterface
{
/** @var string */
private $release = '4.1.0-alpha.11';
/** @var array */
private $concern = [base::APPLICATION_BOX];
/**
* {@inheritdoc}
*/
public function get_release()
{
return $this->release;
}
/**
* {@inheritdoc}
*/
public function getDoctrineMigrations()
{
return ['20180614113404'];
}
/**
* {@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;
}
}