From b700b38e1729d50a19ba403004869eb540121ec7 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Wed, 7 Aug 2019 11:46:58 +0200 Subject: [PATCH] Fix PG migration --- app/DoctrineMigrations/Version20190806130304.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/DoctrineMigrations/Version20190806130304.php b/app/DoctrineMigrations/Version20190806130304.php index b1e8f8d00..1449bdd3d 100644 --- a/app/DoctrineMigrations/Version20190806130304.php +++ b/app/DoctrineMigrations/Version20190806130304.php @@ -40,7 +40,7 @@ final class Version20190806130304 extends WallabagMigration $this->addSql('CREATE INDEX user_starred ON ' . $this->getTable('entry') . ' (user_id, is_starred, starred_at)'); break; case 'postgresql': - $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' ALTER COLUMN language VARCHAR(20) DEFAULT NULL'); + $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' ALTER language TYPE VARCHAR(20)'); $this->addSql('CREATE INDEX user_language ON ' . $this->getTable('entry') . ' (language, user_id)'); $this->addSql('CREATE INDEX user_starred ON ' . $this->getTable('entry') . ' (user_id, is_starred, starred_at)'); break; @@ -77,7 +77,7 @@ final class Version20190806130304 extends WallabagMigration $this->addSql('DROP INDEX user_starred ON ' . $this->getTable('entry')); break; case 'postgresql': - $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' ALTER COLUMN language LONGTEXT DEFAULT NULL'); + $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' ALTER language TYPE TEXT'); $this->addSql('DROP INDEX user_language ON ' . $this->getTable('entry')); $this->addSql('DROP INDEX user_starred ON ' . $this->getTable('entry')); break;