aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/DoctrineMigrations/Version20161122144743.php
diff options
context:
space:
mode:
authorJeremy Benoist <j0k3r@users.noreply.github.com>2016-11-30 14:17:40 +0100
committerGitHub <noreply@github.com>2016-11-30 14:17:40 +0100
commit9abac9651fd0af4586245364657dc9455ba5c73c (patch)
treefb8f3e1c5ac43d1f08d4197af7026eb1cd27eb00 /app/DoctrineMigrations/Version20161122144743.php
parentad51d77146494f04466c288b05b57b0d96113fd5 (diff)
parent067ae472cc50a6047d6197f1a042ce239153407d (diff)
downloadwallabag-9abac9651fd0af4586245364657dc9455ba5c73c.tar.gz
wallabag-9abac9651fd0af4586245364657dc9455ba5c73c.tar.zst
wallabag-9abac9651fd0af4586245364657dc9455ba5c73c.zip
Merge pull request #2650 from wallabag/add-hascolumn
Added hasColumn() in migration to check column existence
Diffstat (limited to 'app/DoctrineMigrations/Version20161122144743.php')
-rw-r--r--app/DoctrineMigrations/Version20161122144743.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/DoctrineMigrations/Version20161122144743.php b/app/DoctrineMigrations/Version20161122144743.php
index ec80c48e..536b8339 100644
--- a/app/DoctrineMigrations/Version20161122144743.php
+++ b/app/DoctrineMigrations/Version20161122144743.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 * Add the restricted_access internal setting for articles with paywall 11 * Add the restricted_access internal setting for articles with paywall.
12 */ 12 */
13class Version20161122144743 extends AbstractMigration implements ContainerAwareInterface 13class Version20161122144743 extends AbstractMigration implements ContainerAwareInterface
14{ 14{
@@ -24,7 +24,7 @@ class Version20161122144743 extends AbstractMigration implements ContainerAwareI
24 24
25 private function getTable($tableName) 25 private function getTable($tableName)
26 { 26 {
27 return $this->container->getParameter('database_table_prefix') . $tableName; 27 return $this->container->getParameter('database_table_prefix').$tableName;
28 } 28 }
29 29
30 /** 30 /**
@@ -32,7 +32,7 @@ class Version20161122144743 extends AbstractMigration implements ContainerAwareI
32 */ 32 */
33 public function up(Schema $schema) 33 public function up(Schema $schema)
34 { 34 {
35 $this->addSql("INSERT INTO ".$this->getTable('craue_config_setting')." (name, value, section) VALUES ('restricted_access', 0, 'entry')"); 35 $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('restricted_access', 0, 'entry')");
36 } 36 }
37 37
38 /** 38 /**
@@ -40,6 +40,6 @@ class Version20161122144743 extends AbstractMigration implements ContainerAwareI
40 */ 40 */
41 public function down(Schema $schema) 41 public function down(Schema $schema)
42 { 42 {
43 $this->addSql("DELETE FROM ".$this->getTable('craue_config_setting')." WHERE name = 'restricted_access';"); 43 $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'restricted_access';");
44 } 44 }
45} 45}