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/Version20161118134328.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app/DoctrineMigrations/Version20161118134328.php') diff --git a/app/DoctrineMigrations/Version20161118134328.php b/app/DoctrineMigrations/Version20161118134328.php index f168cb53..7b2eeb7b 100644 --- a/app/DoctrineMigrations/Version20161118134328.php +++ b/app/DoctrineMigrations/Version20161118134328.php @@ -47,7 +47,10 @@ class Version20161118134328 extends AbstractMigration implements ContainerAwareI */ public function down(Schema $schema) { - $userTable = $schema->getTable($this->getTable('entry')); - $userTable->dropColumn('http_status'); + $entryTable = $schema->getTable($this->getTable('entry')); + + $this->skipIf(!$entryTable->hasColumn('http_status'), 'It seems that you already played this migration.'); + + $entryTable->dropColumn('http_status'); } } -- cgit v1.2.3