diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2019-08-07 11:46:58 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2019-08-07 11:46:58 +0200 |
commit | b700b38e1729d50a19ba403004869eb540121ec7 (patch) | |
tree | fb8e54f02e39b87041f488a9c5294fca71dc6261 /app/DoctrineMigrations/Version20190806130304.php | |
parent | 24acf2e0f3a6b18c86de6dd7e5efd930aaaad9dd (diff) | |
download | wallabag-b700b38e1729d50a19ba403004869eb540121ec7.tar.gz wallabag-b700b38e1729d50a19ba403004869eb540121ec7.tar.zst wallabag-b700b38e1729d50a19ba403004869eb540121ec7.zip |
Fix PG migration
Diffstat (limited to 'app/DoctrineMigrations/Version20190806130304.php')
-rw-r--r-- | app/DoctrineMigrations/Version20190806130304.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/DoctrineMigrations/Version20190806130304.php b/app/DoctrineMigrations/Version20190806130304.php index b1e8f8d0..1449bdd3 100644 --- a/app/DoctrineMigrations/Version20190806130304.php +++ b/app/DoctrineMigrations/Version20190806130304.php | |||
@@ -40,7 +40,7 @@ final class Version20190806130304 extends WallabagMigration | |||
40 | $this->addSql('CREATE INDEX user_starred ON ' . $this->getTable('entry') . ' (user_id, is_starred, starred_at)'); | 40 | $this->addSql('CREATE INDEX user_starred ON ' . $this->getTable('entry') . ' (user_id, is_starred, starred_at)'); |
41 | break; | 41 | break; |
42 | case 'postgresql': | 42 | case 'postgresql': |
43 | $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' ALTER COLUMN language VARCHAR(20) DEFAULT NULL'); | 43 | $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' ALTER language TYPE VARCHAR(20)'); |
44 | $this->addSql('CREATE INDEX user_language ON ' . $this->getTable('entry') . ' (language, user_id)'); | 44 | $this->addSql('CREATE INDEX user_language ON ' . $this->getTable('entry') . ' (language, user_id)'); |
45 | $this->addSql('CREATE INDEX user_starred ON ' . $this->getTable('entry') . ' (user_id, is_starred, starred_at)'); | 45 | $this->addSql('CREATE INDEX user_starred ON ' . $this->getTable('entry') . ' (user_id, is_starred, starred_at)'); |
46 | break; | 46 | break; |
@@ -77,7 +77,7 @@ final class Version20190806130304 extends WallabagMigration | |||
77 | $this->addSql('DROP INDEX user_starred ON ' . $this->getTable('entry')); | 77 | $this->addSql('DROP INDEX user_starred ON ' . $this->getTable('entry')); |
78 | break; | 78 | break; |
79 | case 'postgresql': | 79 | case 'postgresql': |
80 | $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' ALTER COLUMN language LONGTEXT DEFAULT NULL'); | 80 | $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' ALTER language TYPE TEXT'); |
81 | $this->addSql('DROP INDEX user_language ON ' . $this->getTable('entry')); | 81 | $this->addSql('DROP INDEX user_language ON ' . $this->getTable('entry')); |
82 | $this->addSql('DROP INDEX user_starred ON ' . $this->getTable('entry')); | 82 | $this->addSql('DROP INDEX user_starred ON ' . $this->getTable('entry')); |
83 | break; | 83 | break; |