aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/DoctrineMigrations/Version20161122203647.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/DoctrineMigrations/Version20161122203647.php')
-rw-r--r--app/DoctrineMigrations/Version20161122203647.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/DoctrineMigrations/Version20161122203647.php b/app/DoctrineMigrations/Version20161122203647.php
index ea2703b6..2cb990e1 100644
--- a/app/DoctrineMigrations/Version20161122203647.php
+++ b/app/DoctrineMigrations/Version20161122203647.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 * Methods and properties removed from `FOS\UserBundle\Model\User` 11 * Methods and properties removed from `FOS\UserBundle\Model\User`.
12 * 12 *
13 * - `$expired` 13 * - `$expired`
14 * - `$credentialsExpired` 14 * - `$credentialsExpired`
@@ -32,7 +32,7 @@ class Version20161122203647 extends AbstractMigration implements ContainerAwareI
32 32
33 private function getTable($tableName) 33 private function getTable($tableName)
34 { 34 {
35 return $this->container->getParameter('database_table_prefix') . $tableName; 35 return $this->container->getParameter('database_table_prefix').$tableName;
36 } 36 }
37 37
38 /** 38 /**
@@ -42,7 +42,12 @@ class Version20161122203647 extends AbstractMigration implements ContainerAwareI
42 { 42 {
43 $this->abortIf($this->connection->getDatabasePlatform()->getName() === 'sqlite', 'This up migration can\'t be executed on SQLite databases, because SQLite don\'t support DROP COLUMN.'); 43 $this->abortIf($this->connection->getDatabasePlatform()->getName() === 'sqlite', 'This up migration can\'t be executed on SQLite databases, because SQLite don\'t support DROP COLUMN.');
44 44
45 $this->skipIf(false === $schema->getTable($this->getTable('user'))->hasColumn('expired'), 'It seems that you already played this migration.');
46
45 $this->addSql('ALTER TABLE '.$this->getTable('user').' DROP expired'); 47 $this->addSql('ALTER TABLE '.$this->getTable('user').' DROP expired');
48
49 $this->skipIf(false === $schema->getTable($this->getTable('user'))->hasColumn('credentials_expired'), 'It seems that you already played this migration.');
50
46 $this->addSql('ALTER TABLE '.$this->getTable('user').' DROP credentials_expired'); 51 $this->addSql('ALTER TABLE '.$this->getTable('user').' DROP credentials_expired');
47 } 52 }
48 53