]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Doctrine/WallabagMigration.php
We should able to get the table name unescaped
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Doctrine / WallabagMigration.php
index eb5ae4072f51d1cc5c0218e5695a50ad1f49eea2..7aa2409a120c0c6de2459588a671fb1a64ed9964 100644 (file)
@@ -9,6 +9,8 @@ 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 . '"';