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/Version20170510082609.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/Version20170510082609.php')
-rw-r--r-- | app/DoctrineMigrations/Version20170510082609.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/app/DoctrineMigrations/Version20170510082609.php b/app/DoctrineMigrations/Version20170510082609.php index a99af2d2..329613b1 100644 --- a/app/DoctrineMigrations/Version20170510082609.php +++ b/app/DoctrineMigrations/Version20170510082609.php | |||
@@ -29,11 +29,6 @@ class Version20170510082609 extends AbstractMigration implements ContainerAwareI | |||
29 | $this->container = $container; | 29 | $this->container = $container; |
30 | } | 30 | } |
31 | 31 | ||
32 | private function getTable($tableName) | ||
33 | { | ||
34 | return $this->container->getParameter('database_table_prefix').$tableName; | ||
35 | } | ||
36 | |||
37 | /** | 32 | /** |
38 | * @param Schema $schema | 33 | * @param Schema $schema |
39 | */ | 34 | */ |
@@ -42,7 +37,7 @@ class Version20170510082609 extends AbstractMigration implements ContainerAwareI | |||
42 | $this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'This migration only apply to MySQL'); | 37 | $this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'This migration only apply to MySQL'); |
43 | 38 | ||
44 | foreach ($this->fields as $field) { | 39 | foreach ($this->fields as $field) { |
45 | $this->addSql('ALTER TABLE '.$this->getTable('user').' CHANGE '.$field.' '.$field.' VARCHAR(180) NOT NULL;'); | 40 | $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE ' . $field . ' ' . $field . ' VARCHAR(180) NOT NULL;'); |
46 | } | 41 | } |
47 | } | 42 | } |
48 | 43 | ||
@@ -54,7 +49,12 @@ class Version20170510082609 extends AbstractMigration implements ContainerAwareI | |||
54 | $this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'This migration only apply to MySQL'); | 49 | $this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'This migration only apply to MySQL'); |
55 | 50 | ||
56 | foreach ($this->fields as $field) { | 51 | foreach ($this->fields as $field) { |
57 | $this->addSql('ALTER TABLE '.$this->getTable('user').' CHANGE '.$field.' '.$field.' VARCHAR(255) NOT NULL;'); | 52 | $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE ' . $field . ' ' . $field . ' VARCHAR(255) NOT NULL;'); |
58 | } | 53 | } |
59 | } | 54 | } |
55 | |||
56 | private function getTable($tableName) | ||
57 | { | ||
58 | return $this->container->getParameter('database_table_prefix') . $tableName; | ||
59 | } | ||
60 | } | 60 | } |