X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=app%2FDoctrineMigrations%2FVersion20170511211659.php;h=d0752bafec74b48d671c1d1bc5a0ed9fe17c112f;hb=b8fa1b13a65f448ce6a8ac0745acc123f4af627e;hp=00ce7b1f319cc333f4800b8eeeebeb0f77d225ac;hpb=5c29ae4cf69c63033a23c1f5f3d76aa9131d32dc;p=github%2Fwallabag%2Fwallabag.git diff --git a/app/DoctrineMigrations/Version20170511211659.php b/app/DoctrineMigrations/Version20170511211659.php index 00ce7b1f..d0752baf 100644 --- a/app/DoctrineMigrations/Version20170511211659.php +++ b/app/DoctrineMigrations/Version20170511211659.php @@ -13,19 +13,21 @@ class Version20170511211659 extends WallabagMigration { public function up(Schema $schema) { - $tableName = $this->getTable('annotation'); - switch ($this->connection->getDatabasePlatform()->getName()) { case 'sqlite': + $annotationTableName = $this->getTable('annotation', true); + $userTableName = $this->getTable('user', true); + $entryTableName = $this->getTable('entry', true); + $this->addSql(<<addSql('DROP TABLE ' . $tableName); + $this->addSql('DROP TABLE ' . $annotationTableName); $this->addSql(<<addSql(<<addSql('DROP TABLE __temp__wallabag_annotation'); break; case 'mysql': - $this->addSql('ALTER TABLE ' . $tableName . ' MODIFY quote TEXT NOT NULL'); + $this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' MODIFY quote TEXT NOT NULL'); break; case 'postgresql': - $this->addSql('ALTER TABLE ' . $tableName . ' ALTER COLUMN quote TYPE TEXT'); + $this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' ALTER COLUMN quote TYPE TEXT'); break; } }