X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=inline;f=app%2FDoctrineMigrations%2FVersion20160812120952.php;h=3ed1b79838f6ac397e3d5fb930920b1f9b8a9fac;hb=18d7bc3a353d8737c64a0f9e1c9fdcb7a756c3e5;hp=39423e2f56d1a9eb8004bc01bb82f373435bb8c2;hpb=64a8781e453c40ff144d03405abe2dc1ccfacbe0;p=github%2Fwallabag%2Fwallabag.git diff --git a/app/DoctrineMigrations/Version20160812120952.php b/app/DoctrineMigrations/Version20160812120952.php index 39423e2f..3ed1b798 100644 --- a/app/DoctrineMigrations/Version20160812120952.php +++ b/app/DoctrineMigrations/Version20160812120952.php @@ -21,7 +21,7 @@ class Version20160812120952 extends AbstractMigration implements ContainerAwareI private function getTable($tableName) { - return $this->container->getParameter('database_table_prefix') . $tableName; + return $this->container->getParameter('database_table_prefix').$tableName; } /** @@ -29,6 +29,8 @@ class Version20160812120952 extends AbstractMigration implements ContainerAwareI */ public function up(Schema $schema) { + $this->skipIf($schema->getTable($this->getTable('oauth2_clients'))->hasColumn('name'), 'It seems that you already played this migration.'); + switch ($this->connection->getDatabasePlatform()->getName()) { case 'sqlite': $this->addSql('ALTER TABLE '.$this->getTable('oauth2_clients').' ADD name longtext DEFAULT NULL');