aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle')
-rw-r--r--src/Wallabag/CoreBundle/Doctrine/WallabagMigration.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Doctrine/WallabagMigration.php b/src/Wallabag/CoreBundle/Doctrine/WallabagMigration.php
index eb5ae407..7aa2409a 100644
--- a/src/Wallabag/CoreBundle/Doctrine/WallabagMigration.php
+++ b/src/Wallabag/CoreBundle/Doctrine/WallabagMigration.php
@@ -9,6 +9,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
9 9
10abstract class WallabagMigration extends AbstractMigration implements ContainerAwareInterface 10abstract class WallabagMigration extends AbstractMigration implements ContainerAwareInterface
11{ 11{
12 const UN_ESCAPED_TABLE = true;
13
12 /** 14 /**
13 * @var ContainerInterface 15 * @var ContainerInterface
14 */ 16 */
@@ -28,10 +30,14 @@ abstract class WallabagMigration extends AbstractMigration implements ContainerA
28 $this->container = $container; 30 $this->container = $container;
29 } 31 }
30 32
31 protected function getTable($tableName) 33 protected function getTable($tableName, $unEscaped = false)
32 { 34 {
33 $table = $this->container->getParameter('database_table_prefix') . $tableName; 35 $table = $this->container->getParameter('database_table_prefix') . $tableName;
34 36
37 if (self::UN_ESCAPED_TABLE === $unEscaped) {
38 return $table;
39 }
40
35 // escape table name is handled using " on postgresql 41 // escape table name is handled using " on postgresql
36 if ('postgresql' === $this->connection->getDatabasePlatform()->getName()) { 42 if ('postgresql' === $this->connection->getDatabasePlatform()->getName()) {
37 return '"' . $table . '"'; 43 return '"' . $table . '"';