diff options
author | Jérémy Benoist <j0k3r@users.noreply.github.com> | 2017-07-03 13:39:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-03 13:39:54 +0200 |
commit | 71e1cbc8eb5928d393b0772055d6b711e90a09b3 (patch) | |
tree | 71795eadcf13fda9198b8cd9a3da26d51826bbd9 /app/DoctrineMigrations/Version20160410190541.php | |
parent | 822c877949aff8ae57677671115f8f4fc69588d5 (diff) | |
parent | 38520658addc217f127b0627ea28dcf8d6e6178c (diff) | |
download | wallabag-71e1cbc8eb5928d393b0772055d6b711e90a09b3.tar.gz wallabag-71e1cbc8eb5928d393b0772055d6b711e90a09b3.tar.zst wallabag-71e1cbc8eb5928d393b0772055d6b711e90a09b3.zip |
Merge pull request #3258 from wallabag/cs-fixer
Add a real configuration for CS-Fixer
Diffstat (limited to 'app/DoctrineMigrations/Version20160410190541.php')
-rw-r--r-- | app/DoctrineMigrations/Version20160410190541.php | 16 |
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 | } |