diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2017-01-30 16:22:03 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2017-01-30 16:22:03 +0100 |
commit | 7a340375c30531e0983deacdbfe39f13cb961005 (patch) | |
tree | b4a6cadba9b95a56f69a52eb3ab26cb78f9f66e0 /app/DoctrineMigrations | |
parent | ec67907420641b238683c8e103b9d0e6058bc7b5 (diff) | |
download | wallabag-7a340375c30531e0983deacdbfe39f13cb961005.tar.gz wallabag-7a340375c30531e0983deacdbfe39f13cb961005.tar.zst wallabag-7a340375c30531e0983deacdbfe39f13cb961005.zip |
Fixed duplicate entry for share_public in craue_setting_table
Diffstat (limited to 'app/DoctrineMigrations')
-rw-r--r-- | app/DoctrineMigrations/Version20160410190541.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/DoctrineMigrations/Version20160410190541.php b/app/DoctrineMigrations/Version20160410190541.php index ebf4135f..80bcd12a 100644 --- a/app/DoctrineMigrations/Version20160410190541.php +++ b/app/DoctrineMigrations/Version20160410190541.php | |||
@@ -40,7 +40,15 @@ class Version20160410190541 extends AbstractMigration implements ContainerAwareI | |||
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 | /** |