From b0f67b745b292bf861a764a48d9572b6a5b70b89 Mon Sep 17 00:00:00 2001 From: aina-esokia Date: Tue, 10 Jul 2018 17:11:37 +0400 Subject: [PATCH 1/2] guest account patch doctrine migration --- lib/Alchemy/Phrasea/Core/Version.php | 2 +- lib/classes/patch/410alpha11a.php | 61 ++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 lib/classes/patch/410alpha11a.php diff --git a/lib/Alchemy/Phrasea/Core/Version.php b/lib/Alchemy/Phrasea/Core/Version.php index 1fbafcb5b7..275d7479c2 100644 --- a/lib/Alchemy/Phrasea/Core/Version.php +++ b/lib/Alchemy/Phrasea/Core/Version.php @@ -16,7 +16,7 @@ class Version /** * @var string */ - private $number = '4.1.0-alpha.9'; + private $number = '4.1.0-alpha.11'; /** * @var string diff --git a/lib/classes/patch/410alpha11a.php b/lib/classes/patch/410alpha11a.php new file mode 100644 index 0000000000..7e02a8f524 --- /dev/null +++ b/lib/classes/patch/410alpha11a.php @@ -0,0 +1,61 @@ +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; + } +} From fb79966f9103d02d8ed46a727584f202254cc662 Mon Sep 17 00:00:00 2001 From: aina-esokia Date: Wed, 11 Jul 2018 16:50:23 +0400 Subject: [PATCH 2/2] update column guest also for deleted guest account --- .../Phrasea/Setup/DoctrineMigrations/Version20180614113404.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Alchemy/Phrasea/Setup/DoctrineMigrations/Version20180614113404.php b/lib/Alchemy/Phrasea/Setup/DoctrineMigrations/Version20180614113404.php index bd360623df..2f411dfd0c 100644 --- a/lib/Alchemy/Phrasea/Setup/DoctrineMigrations/Version20180614113404.php +++ b/lib/Alchemy/Phrasea/Setup/DoctrineMigrations/Version20180614113404.php @@ -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%"'); } /**