From 20fd33696bc5eb29c0ca9160e56930a1ec2fb2fe Mon Sep 17 00:00:00 2001 From: aynsix <35221835+aynsix@users.noreply.github.com> Date: Thu, 14 Jun 2018 21:09:15 +0400 Subject: [PATCH] migration script for old guest account (#2644) --- .../Version20180614113404.php | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 lib/Alchemy/Phrasea/Setup/DoctrineMigrations/Version20180614113404.php diff --git a/lib/Alchemy/Phrasea/Setup/DoctrineMigrations/Version20180614113404.php b/lib/Alchemy/Phrasea/Setup/DoctrineMigrations/Version20180614113404.php new file mode 100644 index 0000000000..bd360623df --- /dev/null +++ b/lib/Alchemy/Phrasea/Setup/DoctrineMigrations/Version20180614113404.php @@ -0,0 +1,28 @@ +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%"'); + } + + /** + * @param Schema $schema + */ + public function doDownSql(Schema $schema) + { + } +}