aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/DoctrineMigrations/Version20160410190541.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-12-29 10:54:07 +0100
committerGitHub <noreply@github.com>2016-12-29 10:54:07 +0100
commit8527238846b0ea307ba68ca8a831eb0884c68d4a (patch)
treef93d54cd9fcbb85fa43c989ef670612f9a4d47e5 /app/DoctrineMigrations/Version20160410190541.php
parent90f6ee4dbe761f97edf0bf87ffeb1f75acec6c25 (diff)
parent7239082a5e290dada1d393f7a25acebb09ace2de (diff)
downloadwallabag-8527238846b0ea307ba68ca8a831eb0884c68d4a.tar.gz
wallabag-8527238846b0ea307ba68ca8a831eb0884c68d4a.tar.zst
wallabag-8527238846b0ea307ba68ca8a831eb0884c68d4a.zip
Merge pull request #2702 from wallabag/add-index-uuid
Added index on entry.uuid
Diffstat (limited to 'app/DoctrineMigrations/Version20160410190541.php')
-rw-r--r--app/DoctrineMigrations/Version20160410190541.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/DoctrineMigrations/Version20160410190541.php b/app/DoctrineMigrations/Version20160410190541.php
index 0cdec008..f166a325 100644
--- a/app/DoctrineMigrations/Version20160410190541.php
+++ b/app/DoctrineMigrations/Version20160410190541.php
@@ -31,10 +31,11 @@ class Version20160410190541 extends AbstractMigration implements ContainerAwareI
31 { 31 {
32 $entryTable = $schema->getTable($this->getTable('entry')); 32 $entryTable = $schema->getTable($this->getTable('entry'));
33 33
34 $this->skipIf($entryTable->hasColumn('uuid'), 'It seems that you already played this migration.'); 34 $this->skipIf($entryTable->hasColumn('uid'), 'It seems that you already played this migration.');
35 35
36 $entryTable->addColumn('uuid', 'guid', [ 36 $entryTable->addColumn('uid', 'string', [
37 'notnull' => false, 37 'notnull' => false,
38 'length' => 23,
38 ]); 39 ]);
39 $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('share_public', '1', 'entry')"); 40 $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('share_public', '1', 'entry')");
40 } 41 }
@@ -45,7 +46,7 @@ class Version20160410190541 extends AbstractMigration implements ContainerAwareI
45 public function down(Schema $schema) 46 public function down(Schema $schema)
46 { 47 {
47 $entryTable = $schema->getTable($this->getTable('entry')); 48 $entryTable = $schema->getTable($this->getTable('entry'));
48 $entryTable->dropColumn('uuid'); 49 $entryTable->dropColumn('uid');
49 50
50 $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'share_public'"); 51 $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'share_public'");
51 } 52 }