diff --git a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp index 6ce861518f..0a5cd60517 100644 --- a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp +++ b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp @@ -384,6 +384,15 @@ bool create_reports_table(sqlite3 *db) { return create_table(db, query, "reports"); } +bool create_persist_storage_table(sqlite3 *db) { + std::string query = + "CREATE TABLE IF NOT EXISTS persist_storage (" + " key TEXT UNIQUE PRIMARY KEY NOT NULL," + " item TEXT NOT NULL" + ");"; + return create_table(db, query, "persist_storage"); +} + bool create_schema(sqlite3 *db) { char *error; sqlite3_exec( @@ -459,6 +468,11 @@ bool create_schema(sqlite3 *db) { " report TEXT NOT NULL" ");" + "CREATE TABLE IF NOT EXISTS persist_storage (" + " key TEXT UNIQUE PRIMARY KEY NOT NULL," + " item TEXT NOT NULL" + ");" + "CREATE INDEX IF NOT EXISTS media_idx_container" " ON media (container);" @@ -697,7 +711,8 @@ std::vector> migrations{ {26, {add_avatar_column_to_threads_table, true}}, {27, {add_pinned_count_column_to_threads, true}}, {28, {create_message_store_threads_table, true}}, - {29, {create_reports_table, true}}}}; + {29, {create_reports_table, true}}, + {30, {create_persist_storage_table, true}}}}; enum class MigrationResult { SUCCESS, FAILURE, NOT_APPLIED };