diff --git a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp --- a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp +++ b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp @@ -197,7 +197,8 @@ "roles TEXT NOT NULL, " "current_user TEXT NOT NULL, " "source_message_id TEXT, " - "replies_count INTEGER NOT NULL);"; + "replies_count INTEGER NOT NULL, " + "pinned_count INTEGER NOT NULL);"; return create_table(db, query, "threads"); } @@ -357,7 +358,8 @@ " roles TEXT NOT NULL," " current_user TEXT NOT NULL," " source_message_id TEXT," - " replies_count INTEGER NOT NULL" + " replies_count INTEGER NOT NULL," + " pinned_count INTEGER NOT NULL" ");" "CREATE TABLE IF NOT EXISTS metadata (" @@ -800,7 +802,8 @@ make_column("roles", &Thread::roles), make_column("current_user", &Thread::current_user), make_column("source_message_id", &Thread::source_message_id), - make_column("replies_count", &Thread::replies_count)), + make_column("replies_count", &Thread::replies_count), + make_column("pinned_count", &Thread::pinned_count)), make_table( "metadata", make_column("name", &Metadata::name, unique(), primary_key()), diff --git a/native/cpp/CommonCpp/DatabaseManagers/entities/Thread.h b/native/cpp/CommonCpp/DatabaseManagers/entities/Thread.h --- a/native/cpp/CommonCpp/DatabaseManagers/entities/Thread.h +++ b/native/cpp/CommonCpp/DatabaseManagers/entities/Thread.h @@ -20,6 +20,7 @@ std::string current_user; std::unique_ptr source_message_id; int replies_count; + int pinned_count; }; } // namespace comm