From 41bd529cf84c1a6658bcf2830735aba53eb568e9 Mon Sep 17 00:00:00 2001 From: Callum Birks Date: Tue, 15 Oct 2024 15:57:17 +0100 Subject: [PATCH] Address PR comment. --- LiteCore/Storage/SQLiteKeyStore.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/LiteCore/Storage/SQLiteKeyStore.cc b/LiteCore/Storage/SQLiteKeyStore.cc index d42c5a617..57c800045 100644 --- a/LiteCore/Storage/SQLiteKeyStore.cc +++ b/LiteCore/Storage/SQLiteKeyStore.cc @@ -525,11 +525,11 @@ namespace litecore { db().withFileLock([=]() { if ( mayHaveExpiration() ) return; db()._logVerbose("Adding the `expiration` column & index to kv_%s", name().c_str()); - db().execWithLock(subst("ALTER TABLE kv_@ ADD COLUMN expiration INTEGER; " - "CREATE INDEX \"kv_@_expiration\" ON kv_@ (expiration) WHERE expiration not null")); + db().exec(subst("ALTER TABLE kv_@ ADD COLUMN expiration INTEGER; " + "CREATE INDEX \"kv_@_expiration\" ON kv_@ (expiration) WHERE expiration not null")); + _uncommittedExpirationColumn = true; }); - _hasExpirationColumn = true; - _uncommittedExpirationColumn = true; + _hasExpirationColumn = true; } bool SQLiteKeyStore::setExpiration(slice key, expiration_t expTime) {