aboutsummaryrefslogtreecommitdiffhomepage
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/DoctrineMigrations/Version20170127093841.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/app/DoctrineMigrations/Version20170127093841.php b/app/DoctrineMigrations/Version20170127093841.php
index 384529a1..20c79479 100644
--- a/app/DoctrineMigrations/Version20170127093841.php
+++ b/app/DoctrineMigrations/Version20170127093841.php
@@ -36,8 +36,7 @@ class Version20170127093841 extends AbstractMigration implements ContainerAwareI
36 public function up(Schema $schema) 36 public function up(Schema $schema)
37 { 37 {
38 $entryTable = $schema->getTable($this->getTable('entry')); 38 $entryTable = $schema->getTable($this->getTable('entry'));
39 $this->skipIf($entryTable->hasIndex($this->indexStarredName), 'It seems that you already played this migration.'); 39 $this->skipIf($entryTable->hasIndex($this->indexStarredName) && $entryTable->hasIndex($this->indexArchivedName), 'It seems that you already played this migration.');
40 $this->skipIf($entryTable->hasIndex($this->indexStarredName), 'It seems that you already played this migration.');
41 40
42 $entryTable->addIndex(['is_starred'], $this->indexStarredName); 41 $entryTable->addIndex(['is_starred'], $this->indexStarredName);
43 $entryTable->addIndex(['is_archived'], $this->indexArchivedName); 42 $entryTable->addIndex(['is_archived'], $this->indexArchivedName);
@@ -49,8 +48,7 @@ class Version20170127093841 extends AbstractMigration implements ContainerAwareI
49 public function down(Schema $schema) 48 public function down(Schema $schema)
50 { 49 {
51 $entryTable = $schema->getTable($this->getTable('entry')); 50 $entryTable = $schema->getTable($this->getTable('entry'));
52 $this->skipIf(false === $entryTable->hasIndex($this->indexStarredName), 'It seems that you already played this migration.'); 51 $this->skipIf(false === $entryTable->hasIndex($this->indexStarredName) && false === $entryTable->hasIndex($this->indexArchivedName), 'It seems that you already played this migration.');
53 $this->skipIf(false === $entryTable->hasIndex($this->indexStarredName), 'It seems that you already played this migration.');
54 52
55 $entryTable->dropIndex($this->indexStarredName); 53 $entryTable->dropIndex($this->indexStarredName);
56 $entryTable->dropIndex($this->indexArchivedName); 54 $entryTable->dropIndex($this->indexArchivedName);