summaryrefslogtreecommitdiffstats
path: root/3rdparty
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-01-14 18:11:21 +0100
committerRobin Appelman <icewind@owncloud.com>2012-01-14 18:11:32 +0100
commit469a80ac09d3dac7674c0dae9a7bb3d2e6aed0b6 (patch)
tree52c6c41ec93244a63cc33386eeabb35230542915 /3rdparty
parent5c179e6255141f33eae6a1520651bec0131127fb (diff)
downloadnextcloud-server-469a80ac09d3dac7674c0dae9a7bb3d2e6aed0b6.tar.gz
nextcloud-server-469a80ac09d3dac7674c0dae9a7bb3d2e6aed0b6.zip
fix some sqlite2 upgrade issues
Diffstat (limited to '3rdparty')
-rw-r--r--3rdparty/MDB2/Driver/Manager/sqlite.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/3rdparty/MDB2/Driver/Manager/sqlite.php b/3rdparty/MDB2/Driver/Manager/sqlite.php
index 650910174e7..1b7239876f1 100644
--- a/3rdparty/MDB2/Driver/Manager/sqlite.php
+++ b/3rdparty/MDB2/Driver/Manager/sqlite.php
@@ -600,7 +600,7 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
}
$constraints = array_flip($constraints);
foreach ($constraints as $constraint => $value) {
- if (!empty($definition['primary'])) {
+ if (!empty($definition['primary'])) {
if (!array_key_exists('primary', $options)) {
$options['primary'] = $definition['fields'];
//remove from the $constraint array, it's already handled by createTable()
@@ -682,7 +682,9 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
}
foreach ($constraints as $constraint => $definition) {
- $this->createConstraint($name_new, $constraint, $definition);
+ if(empty($definition['primary']) and empty($definition['foreign'])){
+ $this->createConstraint($name_new, $constraint, $definition);
+ }
}
if (!empty($select_fields) && !empty($data)) {