ocsms icon indicating copy to clipboard operation
ocsms copied to clipboard

Database cleanup

Open floss4good opened this issue 2 years ago • 0 comments

While working on pull request #340 I noticed that:

  1. The ocsms_sendmessage_queue tables is not used. Based on the table name and the description of the Android client:

    Sending SMS from a Nextcloud instance will be coming in a future release.

    I can assume that this table was added in advance, but the functionality for sending SMS was not implemented until now. Under these circumstances I think it would be better to remove the table for now in order to avoid creating useless migrations.

  2. The ocsms_user_datas table is only used within the ConversationStateMapper::migrate() method that is only called by FixConversationReadStates repair step class. Checking the implementation of this method and the git history I’ve found out that the table was used before ocsms_conversation_read_states table was added back in November 2016 (see commit 26df3a5) and the repair step is actually migrating the data to the new table. Again, I think it is now safe enough to drop this table, the repair step and related legacy code.

At the time of writing the most recent Phone Sync (ocsms) version is 2.2.0 (released on Dec 16, 2020) and the above remarks are also valid for current master codebase.

floss4good avatar Sep 27 '21 22:09 floss4good