]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Fixed migrations
authorNicolas Lœuillet <nicolas@loeuillet.org>
Mon, 10 Apr 2017 07:26:08 +0000 (09:26 +0200)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Mon, 10 Apr 2017 07:26:08 +0000 (09:26 +0200)
app/DoctrineMigrations/Version20170405182620.php

index c1ae7df9a017e41ca1e34d7a344840cec913a537..3ef9633f6df1acba02f6f1d0ec43ce50531646df 100644 (file)
@@ -40,6 +40,8 @@ class Version20170405182620 extends AbstractMigration implements ContainerAwareI
             'notnull' => false,
         ]);
 
+        $this->skipIf($entryTable->hasColumn('published_by'), 'It seems that you already played this migration.');
+
         $entryTable->addColumn('published_by', 'text', [
             'notnull' => false,
         ]);
@@ -55,6 +57,9 @@ class Version20170405182620 extends AbstractMigration implements ContainerAwareI
         $this->skipIf(!$entryTable->hasColumn('published_at'), 'It seems that you already played this migration.');
 
         $entryTable->dropColumn('published_at');
+
+        $this->skipIf(!$entryTable->hasColumn('published_by'), 'It seems that you already played this migration.');
+
         $entryTable->dropColumn('published_by');
     }
 }