summaryrefslogtreecommitdiffstats
path: root/f8c1d77efa988974026189bf8214ef0fecaf1522.patch
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-07-31 11:33:36 +0200
committerRemi Collet <fedora@famillecollet.com>2014-07-31 11:33:36 +0200
commit1eeeb359948aa4ef2360195b00f0a5177e848e68 (patch)
treeeff9341e0c74ead0aecdf234d6f76ee1b075681c /f8c1d77efa988974026189bf8214ef0fecaf1522.patch
parentdc02ff66bce9187acf1259c052f509c8d1a2c0a0 (diff)
php-doctrine-dbal: backport rawhide change (add an upstream patch)
Diffstat (limited to 'f8c1d77efa988974026189bf8214ef0fecaf1522.patch')
-rw-r--r--f8c1d77efa988974026189bf8214ef0fecaf1522.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/f8c1d77efa988974026189bf8214ef0fecaf1522.patch b/f8c1d77efa988974026189bf8214ef0fecaf1522.patch
new file mode 100644
index 0000000..c6dfc27
--- /dev/null
+++ b/f8c1d77efa988974026189bf8214ef0fecaf1522.patch
@@ -0,0 +1,27 @@
+From f8c1d77efa988974026189bf8214ef0fecaf1522 Mon Sep 17 00:00:00 2001
+From: Vincent Petry <PVince81@yahoo.fr>
+Date: Tue, 1 Jul 2014 13:14:38 +0200
+Subject: [PATCH] Fix escaping of column name for specific alter table case
+
+When changing the length of a field, the column name needs to be escaped
+properly.
+---
+ lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php b/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
+index 916e857..c3015b5 100644
+--- a/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
++++ b/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
+@@ -467,7 +467,7 @@
+ }
+
+ if ($columnDiff->hasChanged('length')) {
+- $query = 'ALTER ' . $column->getName() . ' TYPE ' . $column->getType()->getSqlDeclaration($column->toArray(), $this);
++ $query = 'ALTER ' . $oldColumnName . ' TYPE ' . $column->getType()->getSqlDeclaration($column->toArray(), $this);
+ $sql[] = 'ALTER TABLE ' . $diff->name . ' ' . $query;
+ }
+ }
+--
+2.0.3
+