Skip to content

Support for Nextcloud 21 #334

Open
Open

Description

@khartahk

Will you support Nextcloud 21?

Steps to reproduce

  1. Upgrade to Nextcloud 21.0.1
  2. Extension is missing

Expected behaviour

Support Nextcloud >= 21

Actual behaviour

Extension does not support Nextxloud >= 21

Server configuration

Nextcloud/ownCloud version:
21.0.1

Activity

  1. drdetergent commented on Apr 10, 2021

    @drdetergent

    I see also an error on the Nextcloud store for Ocsms that is showing the release 1.10.1 compatible for NC21 because of dependency required nextcloud version >= 9.0.0

    and release 1.10.1 is not available for download https://ftp.unix-experience.fr/owncloud-sms/v1.10.1.tar.gz error 404

    image

  2. roydenyates commented on May 17, 2021

    @roydenyates

    I see also an error on the Nextcloud store for Ocsms that is showing the release 1.10.1 compatible for NC21 because of dependency required nextcloud version >= 9.0.0

    and release 1.10.1 is not available for download https://ftp.unix-experience.fr/owncloud-sms/v1.10.1.tar.gz error 404

    image

    1.10.1 is in fact available at https://github.com/nextcloud/ocsms/archive/refs/tags/v1.10.1.zip

    But what's the point since is years old (11 Nov 2016). All very bizarre.

  3. drdetergent commented on May 17, 2021

    @drdetergent

    But what's the point since is years old (11 Nov 2016). All very bizarre.

    the problem is in incorrect definition of version 1.10.1 that will be forever compatible with all future versions as in Dependecies is set with
    Required Nextcloud versions >= 9.0.0

    = to be replaced by equals = only

  4. roydenyates commented on May 18, 2021

    @roydenyates

    Ok, thanks. The orig dev is active but not on this app, so I guess OCSMS is dormant, although someone did make commits in Dec 2020.

  5. e-alfred commented on May 19, 2021

    @e-alfred
    Collaborator

    The current problem with a new release of the app is that the database table had to be changed to make the app compatible with newer Nextcloud releases. This means that the data from the old tables has to be migrated in an upgrade step or the sync has to be set up again by the user. Any PR solving the issue is highly welcome!

  6. brzd commented on Jun 25, 2021

    @brzd

    Hello!

    What's the current status of this project? Is there version for 21 on the process? How can I get ocsms to work in nc21?

  7. floss4good commented on Jul 19, 2021

    @floss4good

    Hello @e-alfred. I would like to try making a PR for this migration, if not already in progress by someone else.

    Would you be kind and help me with some starting point context?
    From what I can see the old, deprecated, Database schema (i.e. database.xml) was already removed with 2.2.0 release and from your comment on issue 329 I can understand that some tables and indexes had to be renamed and this is what the required migration should handle.
    Since I already use Phone Sync 2.2.0 with Nextcloud 20.0.11 and I can see within the DB that the table names were not changed I assume that the current release still uses the old schema. And this can be confirmed by the fact there are some commits for fixing table / index names after 2.2.0 tag (therefore not included in the current release).

    Please correct me if I am wrong until now.

  8. e-alfred commented on Aug 14, 2021

    @e-alfred
    Collaborator

    Hello @floss4good, thanks for your offer!

    I am currently not able to keep up as fast with all apps due to other commitments, but the problem with this app is that we had to change to the new Database Migrations and had to shorten the table names to be still compatible with newer Nextcloud versions. This means we need a way to migrate the data from the old tables to the new tables.

    There are two options:

    1. Users have to set up sync once again which is not very user friendly after upgrading the app.

    2. Do a migration using the new DB Migrations (https://docs.nextcloud.com/server/latest/developer_manual/basics/storage/migrations.html#migration-1-schema-change). This would be ideal, but I am currently not able to put in the time to do this myself.

    The changed table names and indexes can be found in this PR: 94a7175

  9. argon3030 commented on Aug 29, 2021

    @argon3030

    I was already using ocsms 2.2.0 on NC 20. Working great. Not sure when I originally installed ocsms, it was probably around NC version 18? I can't remember, but in any case, it was already installed and configured and working great. Here's what I did prior to upgrading to NC 21:

    1. Log into the NC mysql database and rename the table 'ocsms_conversation_read_states' to 'ocsms_conv_r_states'. Big thanks to @e-alfred for providing these table names. Rename the table 'ocsms_sendmessage_queue' to 'ocsms_sendmess_queue'. Thank you to @floss4good for sharing the relevant commit. The remaining tables in that commit can be ignored as they're apparently not used.
    2. Edit the file apps/ocsms/db/conversationstatemapper.php and change all instances of 'ocsms_conversation_read_states' to 'ocsms_conv_r_states'.
    3. At this point, ocsms is in a compatible state for NC 21, but it will continue to work fine on NC 20, so there's no rush to upgrade.
    4. Perform the NC upgrade from 20 to 21. It will warn you that there's no compatible version of ocsms, and will disable the app during the upgrade. Once the upgrade is complete, you can re-enable the 'incompatible' ocsms app.

    Now after the upgrade to NC 21, ocsms 2.2.0 continues to work properly, and all existing sms data and phone sync connections were preserved, at least in my brief initial testing. Hope this is helpful to someone.

  10. floss4good commented on Aug 29, 2021

    @floss4good

    And what will happen when a new version – that should perform the tables/indexes name changes – is released?
    I just prepared myself a development environment so that I can start working on (and test) a migration for this purpose and now I realize that I should also consider this kind of scenario (when manual changes were made within the DB).

    PS: There a second table that should be renamed (and some indexes) – check commit 224382c; but after a quick check it seems to not be used at all.

  11. argon3030 commented on Aug 29, 2021

    @argon3030

    @floss4good Actually one of the tables in that commit is being used, or at least it is present in my database. The ocsms_sendmessage_queue. Thank you for sharing this. I've updated my post above to reflect this change. None of the other tables mentioned in that commit are present in my database, so it appears the rest are unused.

    It sounds like there are no plans for a new version that performs these db changes any time soon, so I'm not too concerned about it. Can always tweak it manually in the future if required. This at least gets it working today on NC 21.

  12. floss4good commented on Nov 13, 2021

    @floss4good

    Hello @e-alfred,
    Did you noticed my PR (#340) opened during September?

    Meanwhile I can see that master branch is gone...

  13. vlycop commented on Nov 30, 2021

    @vlycop

    Thankyou very much @floss4good
    I am very happy to see someone with the skill to fix this, and the will to do so.

    Could you point me to a quick guide about how to replace the store version of this app with your branch so i may finally leave v20 please ?
    Or this is only the migration but it doesn't unlock upgrade ?

  14. schniepp commented on Dec 19, 2021

    @schniepp

    I am not sure if this is helping anything, but I have been just testing the old app (v 2.2.0) on NC 21 and NC 22. I did this by continuously upgrading my older NC instance (basically have been using NC since back in the owncloud times). Then I had to do the "use untested app" thing to re-enable the app.
    It appears to be working as normal in both NC 21 and NC 22. I can browse all old messages, and I can sync my phone with NC to see the most recent messages. I don't recall doing any manual fiddling with the database.

  15. nickvergessen commented on Jan 10, 2022

    @nickvergessen
    Member

    Master has been restored with state of september: #345
    So now you can send a PR to bump the version in info.xml if that is enough and then the maintainer can rerelease it.

  16. nerzhul commented on Jan 10, 2022

    @nerzhul
    Collaborator

    i have a nextcloud 22 at home, i will install it and see if it's fine or not

  17. erdoukki commented on Apr 14, 2022

    @erdoukki

    Working in 23 with #329 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions