-
Notifications
You must be signed in to change notification settings - Fork 190
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
Unknown column 'next_update_time' in 'field list' #3048
Comments
Do you have database migrations that still need to be performed? Because that's a new column |
No migrations are executed automatically when nextcloud updates the app. Only if you set nextxloud to debug mode you can execute some migration commands. I'm not really sure what the concept is for the situation that an update was executed but the migration was not executed successfully, every now and then people have issues like this, missing migrations in their database. It's not an issue with news though. |
You will need SQL access to your Database.
SELECT * from oc_migrations where app='news';
+------+--------------------------+
| app | version |
+------+--------------------------+
| news | 140200Date20200824201413 |
| news | 150004Date20201009183830 |
| news | 150005Date20201009192341 |
| news | 150200Date20210118190652 |
| news | 150203Date20210204203051 |
| news | 150302Date20210312231251 |
| news | 150400Date20210318215425 |
| news | 250000Date20240817095614 |
| news | 250200Date20241219085150 |
+------+--------------------------+ Version 250200Date20241219085150 is important here. Then you can try to apply the change manually: ALTER TABLE oc_news_feeds
ADD COLUMN IF NOT EXISTS next_update_time BIGINT(20) NULL;
COMMIT; But I have to say that it is experimental, it's not part of the concept for apps to run queries manually. |
Thank you for your explanation and the workaround! It seems that it worked! There is no error in the logs, and some feeds were updated after cron ran. # Access mariadb container
docker exec -it nextcloud-db bash
# Access MariaDB inside the container
mysql -u root -p
# Display database
SHOW DATABASES;
# select the nextcloud database
use nextcloud;
# check if the migrations table is at least up to date
SELECT * from oc_migrations where app='news';
# run the command to add the missing column
ALTER TABLE oc_news_feeds
-> ADD COLUMN IF NOT EXISTS next_update_time BIGINT(20) NULL;
Query OK, 0 rows affected (0.038 sec)
Records: 0 Duplicates: 0 Warnings: 0
# run commit
COMMIT;
Query OK, 0 rows affected (0.001 sec)
# exit MariaDB
exit;
# exit docker container
exit |
Just one addition, when I was running the nextcloud repair command docker exec --user www-data nextcloud-app php /var/www/html/occ maintenance:mode --on
docker exec --user www-data nextcloud-app php /var/www/html/occ maintenance:repair
docker exec --user www-data nextcloud-app php /var/www/html/occ maintenance:mode --off I saw in the result, that an update Job related to News got deleted. Perhaps this was the job that should have triggered the db migration?! Before I posted here, I also downgraded the news app and then triggered the news app update once more from the WebUI, but I got the same missing column error. |
That repair step is to remove an old no longer used update job, since those are not automatically removed by Nextcloud. You simply ran into the issue that Nextcloud updated the app and did all the steps except actually adjusting the DB schema, since Nextcloud recorded the migration already it will not try to run the migration again. DB Schemas and data stays when you delete an app at least that is the case for News. |
IMPORTANT
Read and tick the following checkbox after you have created the issue or place an x inside the brackets ;)
Explain the Problem
What problem did you encounter?
Since update to version 25.2.0, feeds are not pulled anymore and the following error message appears in the Nextcloud log:
System Information
The text was updated successfully, but these errors were encountered: