android.database.sqlite.SQLiteException: near "ON": syntax error (code 1 SQLITE_ERROR): , while compiling: INSERT INTO User(qualified_id, name, handle, email, phone, accent_id, team, connection_status, preview_asset_id, complete_asset_id, user_type, bot_service, deleted, incomplete_metadata, expires_at, supported_protocols, active_one_on_one_conversation_id)
VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
ON CONFLICT(qualified_id) DO UPDATE SET
name = excluded.name,
handle = excluded.handle,
email =
The root cause is that the CONFLICT DO UPDATE SET syntax is incompatible with older database versions.
The INSERT ... ON CONFLICT DO UPDATE statement requires SQLite ≥ 3.24.0
The codebase uses this syntax in multiple places. How can we uniformly fix this issue to ensure compatibility with older versions?
Looking forward to your reply.