aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/DoctrineMigrations/Version20160410190541.php
diff options
context:
space:
mode:
authorJérémy Benoist <j0k3r@users.noreply.github.com>2017-10-23 11:09:17 +0200
committerGitHub <noreply@github.com>2017-10-23 11:09:17 +0200
commit1953a872932a63792293b4aec087880265ba89f7 (patch)
treefd16599e737fcdaf193c933ef3ec4a4ee248b117 /app/DoctrineMigrations/Version20160410190541.php
parentd83d25dadec2c38460a32d96f5d2903426fec9d3 (diff)
parent702f2d67d60ca963492b90dad74cb5f8dcc84e51 (diff)
downloadwallabag-1953a872932a63792293b4aec087880265ba89f7.tar.gz
wallabag-1953a872932a63792293b4aec087880265ba89f7.tar.zst
wallabag-1953a872932a63792293b4aec087880265ba89f7.zip
Merge pull request #3011 from wallabag/2.3
wallabag 2.3.0
Diffstat (limited to 'app/DoctrineMigrations/Version20160410190541.php')
-rw-r--r--app/DoctrineMigrations/Version20160410190541.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/app/DoctrineMigrations/Version20160410190541.php b/app/DoctrineMigrations/Version20160410190541.php
index 6294d842..55c12ce1 100644
--- a/app/DoctrineMigrations/Version20160410190541.php
+++ b/app/DoctrineMigrations/Version20160410190541.php
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface; 8use Symfony\Component\DependencyInjection\ContainerInterface;
9 9
10/** 10/**
11 * Added foreign keys for account resetting 11 * Added foreign keys for account resetting.
12 */ 12 */
13class Version20160410190541 extends AbstractMigration implements ContainerAwareInterface 13class Version20160410190541 extends AbstractMigration implements ContainerAwareInterface
14{ 14{
@@ -22,11 +22,6 @@ class Version20160410190541 extends AbstractMigration implements ContainerAwareI
22 $this->container = $container; 22 $this->container = $container;
23 } 23 }
24 24
25 private function getTable($tableName)
26 {
27 return $this->container->getParameter('database_table_prefix').$tableName;
28 }
29
30 /** 25 /**
31 * @param Schema $schema 26 * @param Schema $schema
32 */ 27 */
@@ -44,10 +39,10 @@ class Version20160410190541 extends AbstractMigration implements ContainerAwareI
44 $sharePublic = $this->container 39 $sharePublic = $this->container
45 ->get('doctrine.orm.default_entity_manager') 40 ->get('doctrine.orm.default_entity_manager')
46 ->getConnection() 41 ->getConnection()
47 ->fetchArray('SELECT * FROM '.$this->getTable('craue_config_setting')." WHERE name = 'share_public'"); 42 ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_public'");
48 43
49 if (false === $sharePublic) { 44 if (false === $sharePublic) {
50 $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('share_public', '1', 'entry')"); 45 $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('share_public', '1', 'entry')");
51 } 46 }
52 } 47 }
53 48
@@ -59,6 +54,11 @@ class Version20160410190541 extends AbstractMigration implements ContainerAwareI
59 $entryTable = $schema->getTable($this->getTable('entry')); 54 $entryTable = $schema->getTable($this->getTable('entry'));
60 $entryTable->dropColumn('uid'); 55 $entryTable->dropColumn('uid');
61 56
62 $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'share_public'"); 57 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_public'");
58 }
59
60 private function getTable($tableName)
61 {
62 return $this->container->getParameter('database_table_prefix') . $tableName;
63 } 63 }
64} 64}