Skip to content

Commit

Permalink
'#1977 Fix a problem where the messages are being repeated, the mid
Browse files Browse the repository at this point in the history
field is not a primary key in the messages table, the primary key is
composed by the mid and the uid;
  • Loading branch information
hauck-jvsh authored and lfcnassif committed Apr 3, 2024
1 parent 2c1b876 commit 6caec7f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ private String findTableVersion(String table, int maxVersion) throws SQLExceptio

private String getAndroidExtractMessagesSQL() throws SQLException {
return "SELECT m.*,md.data as mediaData FROM " + findTableVersion("messages", 5) + " m left join "
+ findTableVersion("media", 5) + " md on md.mid=m.mid where m.uid=? order by date";
+ findTableVersion("media", 5) + " md on (md.mid=m.mid and m.uid=md.uid ) where m.uid=? order by date";
}

private static final String EXTRACT_USERACCOUNT_SQL_IOS = "SELECT t0.value FROM T0 where key=2";
Expand Down

0 comments on commit 6caec7f

Please sign in to comment.