Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32952158
D5290.1768273238.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D5290.1768273238.diff
View Options
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
@@ -93,7 +93,7 @@
bool create_persist_account_table(sqlite3 *db) {
std::string query =
- "CREATE TABLE olm_persist_account("
+ "CREATE TABLE IF NOT EXISTS olm_persist_account("
"id INTEGER UNIQUE PRIMARY KEY NOT NULL, "
"account_data TEXT NOT NULL);";
return create_table(db, query, "olm_persist_account");
@@ -101,7 +101,7 @@
bool create_persist_sessions_table(sqlite3 *db) {
std::string query =
- "CREATE TABLE olm_persist_sessions("
+ "CREATE TABLE IF NOT EXISTS olm_persist_sessions("
"target_user_id TEXT UNIQUE PRIMARY KEY NOT NULL, "
"session_data TEXT NOT NULL);";
return create_table(db, query, "olm_persist_sessions");
@@ -176,7 +176,7 @@
char *error;
sqlite3_exec(
db,
- "CREATE INDEX media_idx_container "
+ "CREATE INDEX IF NOT EXISTS media_idx_container "
"ON media (container);",
nullptr,
nullptr,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jan 13, 3:00 AM (9 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5925948
Default Alt Text
D5290.1768273238.diff (1 KB)
Attached To
Mode
D5290: [native/sqlite] add `IF NOT EXISTS` constraint to migrations
Attached
Detach File
Event Timeline
Log In to Comment