X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=app%2FDoctrineMigrations%2FVersion20161024212538.php;h=698819be33de44f67e6f41ec7a5253bb0a9ab1d8;hb=1953a872932a63792293b4aec087880265ba89f7;hp=ecb872d1059ec99b0d723e494b40e9c9d3cb2c6a;hpb=4acbeb93717612f361627f7d4b946fcb4477823c;p=github%2Fwallabag%2Fwallabag.git diff --git a/app/DoctrineMigrations/Version20161024212538.php b/app/DoctrineMigrations/Version20161024212538.php index ecb872d1..698819be 100644 --- a/app/DoctrineMigrations/Version20161024212538.php +++ b/app/DoctrineMigrations/Version20161024212538.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added user_id column on oauth2_clients to prevent users to delete API clients from other users + * Added user_id column on oauth2_clients to prevent users to delete API clients from other users. */ class Version20161024212538 extends AbstractMigration implements ContainerAwareInterface { @@ -24,11 +24,6 @@ class Version20161024212538 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ @@ -60,8 +55,13 @@ class Version20161024212538 extends AbstractMigration implements ContainerAwareI $clientsTable->dropColumn('user_id', 'integer'); - if ($this->connection->getDatabasePlatform()->getName() != 'sqlite') { + if ('sqlite' !== $this->connection->getDatabasePlatform()->getName()) { $clientsTable->removeForeignKey($this->constraintName); } } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } }