diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-11-26 15:40:42 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-11-28 14:28:35 +0100 |
commit | 84c6a48df412af7a15a63de5484c4bbcf27de33e (patch) | |
tree | 2e428e005fc92b8fde621c1ae224ab1222bae00b /app/DoctrineMigrations/Version20161104073720.php | |
parent | a4d55a9161144f7e0daafff8da13dabc9e090ae2 (diff) | |
download | wallabag-84c6a48df412af7a15a63de5484c4bbcf27de33e.tar.gz wallabag-84c6a48df412af7a15a63de5484c4bbcf27de33e.tar.zst wallabag-84c6a48df412af7a15a63de5484c4bbcf27de33e.zip |
Added dropColumn for SQLite and some enhancements
Diffstat (limited to 'app/DoctrineMigrations/Version20161104073720.php')
-rw-r--r-- | app/DoctrineMigrations/Version20161104073720.php | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/app/DoctrineMigrations/Version20161104073720.php b/app/DoctrineMigrations/Version20161104073720.php index 7a0361f8..cd2029cb 100644 --- a/app/DoctrineMigrations/Version20161104073720.php +++ b/app/DoctrineMigrations/Version20161104073720.php | |||
@@ -29,18 +29,8 @@ class Version20161104073720 extends AbstractMigration implements ContainerAwareI | |||
29 | */ | 29 | */ |
30 | public function up(Schema $schema) | 30 | public function up(Schema $schema) |
31 | { | 31 | { |
32 | switch ($this->connection->getDatabasePlatform()->getName()) { | 32 | $entryTable = $schema->getTable($this->getTable('entry')); |
33 | case 'sqlite': | 33 | $entryTable->addIndex(['created_at']); |
34 | $this->addSql('CREATE INDEX `created_at` ON `'.$this->getTable('entry').'` (`created_at` DESC)'); | ||
35 | break; | ||
36 | |||
37 | case 'mysql': | ||
38 | $this->addSql('ALTER TABLE '.$this->getTable('entry').' ADD INDEX created_at (created_at);'); | ||
39 | break; | ||
40 | |||
41 | case 'postgresql': | ||
42 | $this->addSql('CREATE INDEX created_at ON '.$this->getTable('entry').' (created_at DESC)'); | ||
43 | } | ||
44 | } | 34 | } |
45 | 35 | ||
46 | /** | 36 | /** |