diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-05-30 23:55:27 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-05-31 00:01:03 +0200 |
commit | f4577bf00cf24698d63be7312f1330194f98daa5 (patch) | |
tree | e2a8eb294d478a2f7edb39a085a93af0769cfb73 /3rdparty/MDB2 | |
parent | 449b9b92f026b967f261b6c46a99647bfb2b11bd (diff) | |
download | nextcloud-server-f4577bf00cf24698d63be7312f1330194f98daa5.tar.gz nextcloud-server-f4577bf00cf24698d63be7312f1330194f98daa5.zip |
fix for pgsql database migration
Diffstat (limited to '3rdparty/MDB2')
-rw-r--r-- | 3rdparty/MDB2/Driver/Manager/pgsql.php | 3 |
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)) { |