aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/DoctrineMigrations/Version20160410190541.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2017-07-01 09:52:38 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2017-07-01 09:52:38 +0200
commitf808b01692a835673f328d7221ba8c212caa9b61 (patch)
tree0c3b1fc5b1ddbd7af72227303503177689e1d403 /app/DoctrineMigrations/Version20160410190541.php
parent822c877949aff8ae57677671115f8f4fc69588d5 (diff)
downloadwallabag-f808b01692a835673f328d7221ba8c212caa9b61.tar.gz
wallabag-f808b01692a835673f328d7221ba8c212caa9b61.tar.zst
wallabag-f808b01692a835673f328d7221ba8c212caa9b61.zip
Add a real configuration for CS-Fixer
Diffstat (limited to 'app/DoctrineMigrations/Version20160410190541.php')
-rw-r--r--app/DoctrineMigrations/Version20160410190541.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/app/DoctrineMigrations/Version20160410190541.php b/app/DoctrineMigrations/Version20160410190541.php
index 5e5cae35..55c12ce1 100644
--- a/app/DoctrineMigrations/Version20160410190541.php
+++ b/app/DoctrineMigrations/Version20160410190541.php
@@ -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}