mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-26 02:51:04 +00:00
Fix PG migration
This commit is contained in:
parent
24acf2e0f3
commit
b700b38e17
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue