From c658e375d5d6e68bf4bbfdc44c93514d57389781 Mon Sep 17 00:00:00 2001 From: zhongwuzw Date: Thu, 19 Apr 2018 22:03:44 +0800 Subject: [PATCH] Transform manifest table to without rowid table --- YYCache/YYKVStorage.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YYCache/YYKVStorage.m b/YYCache/YYKVStorage.m index 501dfdd..18e4b6f 100644 --- a/YYCache/YYKVStorage.m +++ b/YYCache/YYKVStorage.m @@ -162,7 +162,7 @@ - (BOOL)_dbCheck { } - (BOOL)_dbInitialize { - NSString *sql = @"pragma journal_mode = wal; pragma synchronous = normal; create table if not exists manifest (key text, filename text, size integer, inline_data blob, modification_time integer, last_access_time integer, extended_data blob, primary key(key)); create index if not exists last_access_time_idx on manifest(last_access_time);"; + NSString *sql = [NSString stringWithFormat:@"pragma journal_mode = wal; pragma synchronous = normal; create table if not exists manifest (key text, filename text, size integer, inline_data blob, modification_time integer, last_access_time integer, extended_data blob, primary key(key))%@; create index if not exists last_access_time_idx on manifest(last_access_time);", (SQLITE_VERSION_NUMBER >= 3008002) ? @" without rowid" : @""]; return [self _dbExecute:sql]; }