aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/DoctrineMigrations/Version20170510082609.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/DoctrineMigrations/Version20170510082609.php')
-rw-r--r--app/DoctrineMigrations/Version20170510082609.php14
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}