mirror of
https://github.com/nextcloud/server.git
synced 2026-04-22 14:50:17 -04:00
fix some sqlite2 upgrade issues
This commit is contained in:
parent
5c179e6255
commit
469a80ac09
1 changed files with 4 additions and 2 deletions
6
3rdparty/MDB2/Driver/Manager/sqlite.php
vendored
6
3rdparty/MDB2/Driver/Manager/sqlite.php
vendored
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue