NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.05k stars 14.09k forks source link

tt-rss: `Schema version is wrong, please upgrade the database.` after upgrade from 20.09 to 21.05 #126374

Open makefu opened 3 years ago

makefu commented 3 years ago

Describe the bug After upgrading the system to 21.05 the tt-rss update service does not work correctly anymore, it shows Schema version is wrong, please upgrade the database

To Reproduce Steps to reproduce the behavior:

  1. configure tt-rss with nixpkgs 20.09 as module
  2. perform system upgrade to 21.05
  3. systemctl status tt-rss

Expected behavior the tt-rss update daemon should work without manual intervention after upgrade. alternatively a workaround is described in the manual on how to perform the upgrade.

Screenshots image

Additional context

Notify maintainers @symphorien @flokli

Metadata

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
- services.tt-rss
makefu commented 3 years ago

running sudo -u tt_rss /nix/store/hzawk0frm2s1gz1y1cfcni1kkp06hn9r-php-with-extensions-7.4.18/bin/php /var/lib/tt-rss/update.php --update-schema seems to have fixed this.

Some Context: before the update i had the line systemd.services.tt-rss.serviceConfig.ExecStart = lib.mkForce "${pkgs.php}/bin/php /var/lib/tt-rss/update_daemon2.php"; in my configuration as it seemed to be necesary before. disabling this override resulted in a similar error : image

symphorien commented 3 years ago

I had the same problem and used the same solution.

We can add this to the startup script but then it would be impossible to downgrade. I don't know what the best option is.

Unrelated, maybe you'd be interested in reviewing https://github.com/NixOS/nixpkgs/pull/122095

crabdancing commented 1 year ago

Yikes, we just ran into this on a brand-new install on 22.11. Suggestion: have an option under the services.tt-rss API to add it to the startup script, have that option disabled by default, and give a thorough explanation that existing installs may be impossible to downgrade if enabled?

danwdart commented 1 year ago

For any completely new systems this still should be enabled, however. So maybe some kind of script that goes in and checks "do we even have a database" and if not runs the script and adds it into the service for every upgrade, and if so prompts for the user to do this themselves?