From 3cd94e9ed5e87a187e8d3be13c2df209c78a4f3f Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Thu, 18 Jan 2024 00:40:38 -0100 Subject: [PATCH] better indexes Signed-off-by: Maxence Lange --- .../Version29000Date20231126110901.php | 16 +++++++--------- version.php | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/core/Migrations/Version29000Date20231126110901.php b/core/Migrations/Version29000Date20231126110901.php index 3867074e013c8..9a201727dcdec 100644 --- a/core/Migrations/Version29000Date20231126110901.php +++ b/core/Migrations/Version29000Date20231126110901.php @@ -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; } diff --git a/version.php b/version.php index 47ada5b87774c..a1855bfad5aa2 100644 --- a/version.php +++ b/version.php @@ -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';