-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aborting due to "no such table: legacy_available_messages_view" #51
Comments
whatsapp-viewer also failed due to this new table, here is issue detail. |
I got it working. It looks like Whatsapp have changed the schema of the db a lot. I had to recreate the view I found the original view here This is what I wrote: CREATE view legacy_available_messages_view
AS
SELECT messages.*,
chat._id AS chat_row_id,
expire_timestamp,
jid.raw_string AS key_remote_jid,
jid2.raw_string AS remote_resource,
messages.text_data AS data,
messages.from_me AS key_from_me
FROM message AS messages
JOIN chat
ON chat._id = messages.chat_row_id
JOIN jid AS jid
ON chat.jid_row_id = jid._id
LEFT JOIN jid AS jid2
ON messages.sender_jid_row_id = jid2._id
LEFT JOIN deleted_chat_job AS job
ON job.chat_row_id = chat._id
LEFT JOIN message_ephemeral AS message_ephemeral
ON messages._id = message_ephemeral.message_row_id
WHERE Ifnull(NOT( ( Ifnull(messages.starred, 0) = 0
AND messages._id <= Ifnull(job.deleted_message_row_id, 1)
)
OR ( Ifnull(messages.starred, 0) = 1
AND messages._id <=
Ifnull(job.deleted_starred_message_row_id,
1) )
OR ( ( job.deleted_message_categories IS NOT NULL )
AND ( ( Ifnull(messages.starred, 0) = 0
AND messages._id <=
Ifnull(job.deleted_categories_message_row_id,
1) )
OR ( Ifnull(messages.starred, 0) = 1
AND messages._id <=
Ifnull(job.deleted_categories_starred_message_row_id,
1) ) ) ) ), 0) This is me just hacking to get something to work. Some values are missing such as messages.media_wa_type from orig db (not sure what this should be). Someone will need to change watoi code to either create the view if missing or change this query:
|
Hey @davidvella , I tried the sql commands on my database but now I'm getting this error:
|
Fixed by replacing |
Thanks @officialasit. I originally made changes in both the sql and the code. Thanks for spotting the typo. Will update original comment |
@davidvella I have restored the messages, but all the messages seem to be blank. Like its showing the conversations, but no text in them. Any solutions? |
It looks like my mistake again. If you look at: Line 494 in 4ede6ff
The text column should be data in the view. I did hack the solution. Something else I must have changed. Updated the view again |
@davidvella Thanks a lot. It worked this time. :) |
@davidvella many thanks, manages to successfully restored using the hack you suggested 🙏 |
@davidvella can you please tell the steps to insert the legacy_available_messages_view into msgstore.db? |
nvm. i used https://sqlitebrowser.org/dl/ to open the db file and update the view |
Hi @residentsummer, thanks for this project.
I'm getting below error.
Many thanks,
VJ
The text was updated successfully, but these errors were encountered: