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
{
$this->container = $container;
}
- private function getTable($tableName)
- {
- return $this->container->getParameter('database_table_prefix').$tableName;
- }
-
/**
* @param Schema $schema
*/
$clientsTable->dropColumn('user_id', 'integer');
- if ($this->connection->getDatabasePlatform()->getName() != 'sqlite') {
+ if ($this->connection->getDatabasePlatform()->getName() !== 'sqlite') {
$clientsTable->removeForeignKey($this->constraintName);
}
}
+
+ private function getTable($tableName)
+ {
+ return $this->container->getParameter('database_table_prefix') . $tableName;
+ }
}