summaryrefslogtreecommitdiffstats
path: root/3rdparty
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-05-30 23:55:27 +0200
committerRobin Appelman <icewind@owncloud.com>2012-05-31 00:01:49 +0200
commitd98a0a1bb9c52f18c716267682644e2d2b43659d (patch)
tree6dc6bf96ca8204fb1485d798277c8eb672783cb5 /3rdparty
parent8b4e16ec77f69c47d7bb29c340539f96f7944017 (diff)
downloadnextcloud-server-d98a0a1bb9c52f18c716267682644e2d2b43659d.tar.gz
nextcloud-server-d98a0a1bb9c52f18c716267682644e2d2b43659d.zip
fix for pgsql database migration
Diffstat (limited to '3rdparty')
-rw-r--r--3rdparty/MDB2/Driver/Manager/pgsql.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/3rdparty/MDB2/Driver/Manager/pgsql.php b/3rdparty/MDB2/Driver/Manager/pgsql.php
index a7b776cc1b7..f2c2137dc8b 100644
--- a/3rdparty/MDB2/Driver/Manager/pgsql.php
+++ b/3rdparty/MDB2/Driver/Manager/pgsql.php
@@ -410,6 +410,9 @@ class MDB2_Driver_Manager_pgsql extends MDB2_Driver_Manager_Common
}
$db->loadModule('Datatype', null, true);
$type = $db->datatype->getTypeDeclaration($field['definition']);
+ if($type=='SERIAL PRIMARY KEY'){//not correct when altering a table, since serials arent a real type
+ $type='INTEGER';//use integer instead
+ }
$query = "ALTER $field_name TYPE $type USING CAST($field_name AS $type)";
$result = $db->exec("ALTER TABLE $name $query");
if (PEAR::isError($result)) {