-
Notifications
You must be signed in to change notification settings - Fork 25
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
Nextcloud 22 and "The appinfo/database.xml file is not longer supported. Used in sensorlogger" error #103
Comments
@alexstocker many thanks for your plugin times and again. Given the changes between master and 0.1-nc-devel I have seen that appinfo/database.xml has already been removed from the sensorlogger code tree. Should this be solved by removing it manually or do you plan on providing a smooth upgrade path by removing this file in a pre-install step somehow, then I would wait for you to test this once it is released / committed ? Kind regards, |
According to the old Nextcloud 21 documentation https://docs.nextcloud.com/server/21/developer_manual/basics/storage/migrations.html#migrate-from-database-xml I should call the following to create the respective table layouts under lib/Migration. Unfortunately I am already past the upgrade to NC22. If you want I can try to roll back to NC21 to try it again. I just did the upgrade yesterday. php occ migrations:generate-from-schema sensorlogger 000009 |
In NC22 the migrations has been disabled and is only available in Debug mode, should I try to enable Debug mode for sensorlogger ? |
The appinfo/database.xml has to be removed and the app has to supply its lib/Migration/ scripts to upgrade the database schema between versions. See owncloud/music#865 for a sample in the music plugin and especially the commit owncloud/music@6982d91 According to nextcloud/server#27113 the migration command should only be used on developer env. @alexstocker could you supply the relevant lib/Migration/Version000104Date20210927083000.php or similar upgrade script to create / modify the schema ? |
@stefan123t Thanx for reporting. I'll do my best. But to be honest, will take a while. Any contributions are warmly welcome ;-) |
@alexstocker thanks for taking this up as an issue which apparently occurs only when upgrading from previous versions of sensorlogger in NC 22+. Pauli, who implemented the hange for the above owncloud/music plugin has replied with some explanation on the process to owncloud/music#865. This is the relvant commit message: Replace database.xml with a Migration script on Nextcloud All supported versions of Nextcloud can use the migration script but ownCloud Unfortunately I do not know the changes between previous (ie 0.0.9) and current (ie. 0.1.4) DB template of sensorlogger. But given the Migrationscript automatically generated and the other sanitized by paul it should be possible to migrate the schemas for sensorlogger too. Kind regards, |
Dear @alexstocker, I have taken a quick, first stab at the necessary changes to make it show some of the old data under my Nextcloud 22.1: sensorlogger-0.1.4_nc22_patch.zip Here is the list of changes I made:
I have tried to incorporate all the suggested changes from appinfo/Migrations/Version*.php and these in their original form.
The query returns something like if I am not mistaken, maybe the * can simply be omitted or instead it may be specified explicitly which fields are required:
I do not know why they were not in my sensorlogger-master.zip I downloaded to the server from GitHub. |
@alexstocker I am just checking your 0.1-nc-devel branch to find that some (if not most) of the above issues I faced already have been addressed by you:
Still have to figure out how to get the branch on my server for testing purposes. |
@stefan123t Thanx for your effort. I'll check your changes as soon as possible. If you have shell (ssh) access to your server and git available you can git clone and git checkout your sensorlogger branch within apps directory. |
@alexstocker thanks for adding the suggested changes to your 0.1.4 branch. I do not know if I am able to test / provoke this again e.g. by rolling back to 0.1.x and doing another upgrade. Hence I suggest to close this issue as resolved. I just checked and now even the graph seems to display fine. Thanks for this christmas present! |
Describe the bug
Upgraded to Nextcloud 22.1.4 with success.
Now sensorlogger has been disabled during upgrade
I have enabled it again but it displays error:
The appinfo/database.xml file is not longer supported. Used in sensorlogger
To Reproduce
Steps to reproduce the behavior:
The appinfo/database.xml file is not longer supported. Used in sensorlogger
Expected behavior
Should enable the sensorlogger again.
Screenshots
Desktop (please complete the following information):
Additional context
I have seen that according to the changes in #100 the nextcloud max version is set to 23.
MySQL / Maria DB Version is:
mysql --version
mysql Ver 15.1 Distrib 10.5.10-MariaDB, for Linux (x86_64) using readline 8.1
PHP is version 7.4
The text was updated successfully, but these errors were encountered: