X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=app%2FDoctrineMigrations%2FVersion20161122203647.php;h=9b17d6efddfc90547bd02c5f2dc0de527ee7272d;hb=4acbeb93717612f361627f7d4b946fcb4477823c;hp=94197193cdc3d6c277749330128b17eb467e35cc;hpb=b87f1712336564ec14e37487f512568bc4d986f7;p=github%2Fwallabag%2Fwallabag.git 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]); } }