Skip to content

Commit

Permalink
better indexes
Browse files Browse the repository at this point in the history
Signed-off-by: Maxence Lange <[email protected]>
  • Loading branch information
ArtificialOwl committed Jan 18, 2024
1 parent 2bb0e5c commit 3cd94e9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 7 additions & 9 deletions core/Migrations/Version29000Date20231126110901.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,19 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
}

$table = $schema->getTable('appconfig');
if ($table->hasColumn('lazy')) {
return null;
if (!$table->hasColumn('lazy')) {
// type=2 means value is typed as MIXED
$table->addColumn('type', Types::INTEGER, ['notnull' => true, 'default' => 2]);
$table->addColumn('lazy', Types::BOOLEAN, ['notnull' => false, 'default' => false]);
}

// type=2 means value is typed as MIXED
$table->addColumn('type', Types::INTEGER, ['notnull' => true, 'default' => 2]);
$table->addColumn('lazy', Types::BOOLEAN, ['notnull' => false, 'default' => false]);

if ($table->hasIndex('appconfig_config_key_index')) {
$table->dropIndex('appconfig_config_key_index');
}

$table->addIndex(['lazy'], 'ac_lazy_i');
$table->addIndex(['appid', 'lazy'], 'ac_app_lazy_i');
$table->addIndex(['appid', 'lazy', 'configkey'], 'ac_app_lazy_key_i');
if (!$table->hasIndex('ac_lazy_i')) {
$table->addIndex(['lazy'], 'ac_lazy_i');
}

return $schema;
}
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
// between betas, final and RCs. This is _not_ the public version number. Reset minor/patch level
// when updating major/minor version number.

$OC_Version = [29, 0, 0, 4];
$OC_Version = [29, 0, 0, 5];

// The human-readable string
$OC_VersionString = '29.0.0 dev';
Expand Down

0 comments on commit 3cd94e9

Please sign in to comment.