aboutsummaryrefslogtreecommitdiffhomepage
path: root/app
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2017-01-31 11:03:58 +0100
committerGitHub <noreply@github.com>2017-01-31 11:03:58 +0100
commit38c73f9691b27624d9f5f3f410ab233aa86cf1ea (patch)
tree6629ff7734446ff7389d8c7c9176cd5fad0be343 /app
parentec67907420641b238683c8e103b9d0e6058bc7b5 (diff)
parenta5cd696b22599b1ccb5f2adc05c5ffc563da9756 (diff)
downloadwallabag-38c73f9691b27624d9f5f3f410ab233aa86cf1ea.tar.gz
wallabag-38c73f9691b27624d9f5f3f410ab233aa86cf1ea.tar.zst
wallabag-38c73f9691b27624d9f5f3f410ab233aa86cf1ea.zip
Merge pull request #2809 from wallabag/fix-22-migrations
Fixed duplicate entry for share_public in craue_setting_table
Diffstat (limited to 'app')
-rw-r--r--app/DoctrineMigrations/Version20160410190541.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/app/DoctrineMigrations/Version20160410190541.php b/app/DoctrineMigrations/Version20160410190541.php
index ebf4135f..6294d842 100644
--- a/app/DoctrineMigrations/Version20160410190541.php
+++ b/app/DoctrineMigrations/Version20160410190541.php
@@ -34,13 +34,21 @@ class Version20160410190541 extends AbstractMigration implements ContainerAwareI
34 { 34 {
35 $entryTable = $schema->getTable($this->getTable('entry')); 35 $entryTable = $schema->getTable($this->getTable('entry'));
36 36
37 $this->skipIf($entryTable->hasColumn('uid'), 'It seems that you already played this migration.'); 37 $this->skipIf($entryTable->hasColumn('uid') || $entryTable->hasColumn('uuid'), 'It seems that you already played this migration.');
38 38
39 $entryTable->addColumn('uid', 'string', [ 39 $entryTable->addColumn('uid', 'string', [
40 'notnull' => false, 40 'notnull' => false,
41 'length' => 23, 41 'length' => 23,
42 ]); 42 ]);
43 $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('share_public', '1', 'entry')"); 43
44 $sharePublic = $this->container
45 ->get('doctrine.orm.default_entity_manager')
46 ->getConnection()
47 ->fetchArray('SELECT * FROM '.$this->getTable('craue_config_setting')." WHERE name = 'share_public'");
48
49 if (false === $sharePublic) {
50 $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('share_public', '1', 'entry')");
51 }
44 } 52 }
45 53
46 /** 54 /**