X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FDoctrine%2FWallabagMigration.php;h=4a3fef3b10e398a1304604061c67c9da6a5d2f2d;hb=6fc95673df5349d682eb6ca6185f894eb711d13a;hp=eb5ae4072f51d1cc5c0218e5695a50ad1f49eea2;hpb=bfe7a692261760517199a3797191fd214fc2ee6c;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Doctrine/WallabagMigration.php b/src/Wallabag/CoreBundle/Doctrine/WallabagMigration.php index eb5ae407..4a3fef3b 100644 --- a/src/Wallabag/CoreBundle/Doctrine/WallabagMigration.php +++ b/src/Wallabag/CoreBundle/Doctrine/WallabagMigration.php @@ -2,13 +2,15 @@ namespace Wallabag\CoreBundle\Doctrine; -use Doctrine\DBAL\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; +use Doctrine\Migrations\AbstractMigration; use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; abstract class WallabagMigration extends AbstractMigration implements ContainerAwareInterface { + const UN_ESCAPED_TABLE = true; + /** * @var ContainerInterface */ @@ -28,10 +30,14 @@ abstract class WallabagMigration extends AbstractMigration implements ContainerA $this->container = $container; } - protected function getTable($tableName) + protected function getTable($tableName, $unEscaped = false) { $table = $this->container->getParameter('database_table_prefix') . $tableName; + if (self::UN_ESCAPED_TABLE === $unEscaped) { + return $table; + } + // escape table name is handled using " on postgresql if ('postgresql' === $this->connection->getDatabasePlatform()->getName()) { return '"' . $table . '"';