From 4acbeb93717612f361627f7d4b946fcb4477823c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 23 Jan 2017 14:16:00 +0100 Subject: Added hardcoded SQL for migration to 2.2 --- app/DoctrineMigrations/Version20161122203647.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app/DoctrineMigrations/Version20161122203647.php') diff --git a/app/DoctrineMigrations/Version20161122203647.php b/app/DoctrineMigrations/Version20161122203647.php index 94197193..9b17d6ef 100644 --- a/app/DoctrineMigrations/Version20161122203647.php +++ b/app/DoctrineMigrations/Version20161122203647.php @@ -54,7 +54,10 @@ class Version20161122203647 extends AbstractMigration implements ContainerAwareI public function down(Schema $schema) { $userTable = $schema->getTable($this->getTable('user')); - $userTable->addColumn('expired', 'smallint'); - $userTable->addColumn('credentials_expired', 'smallint'); + + $this->skipIf(true === $userTable->hasColumn('expired') || true === $userTable->hasColumn('credentials_expired'), 'It seems that you already played this migration.'); + + $userTable->addColumn('expired', 'smallint', ['notnull' => false]); + $userTable->addColumn('credentials_expired', 'smallint', ['notnull' => false]); } } -- cgit v1.2.3