Athou / commafeed

Google Reader inspired self-hosted personal RSS reader.
https://www.commafeed.com
Apache License 2.0
2.8k stars 377 forks source link

v5.1 database migrations fail on MariaDB #1544

Closed tari closed 2 months ago

tari commented 2 months ago

After upgrading from 5.0.2 to 5.1.0 using MariaDB, the server crashes on startup due to an SQL error in migrations:

(main) Reading from commafeed.DATABASECHANGELOG                                                                                                                   changelog-5.1.xml::add-unread-count-settings::athou
(main) Error: 1366-22007: Incorrect integer value: 'false' for column `commafeed`.`USERSETTINGS`.`unreadCountTitle` at row 1

I think "false" is being passed to the database as a string, and that's not a valid integer (because MySQL/MariaDB treat bools as integers).

Athou commented 2 months ago

I can't seem to reproduce using mariadb:10.11 but I can probably make a fix for this. What version of MariaDB are you using?

tari commented 2 months ago

Hm, interesting. I've got 10.11.8-MariaDB as shipped by NixOS, so it might be related to database options.

Athou commented 2 months ago

Can you please try with the packages from https://github.com/Athou/commafeed/actions/runs/10735097320 (or the master-mariadb docker tag if using docker) to see if it fixes the issue? I'll release 5.1.1 if it does. Thanks!

tari commented 2 months ago

That change does seem to fix it, after I manually drop the new columns that got left behind in the failed migration (understandably so, since this database doesn't have transactional DDL).

Athou commented 2 months ago

Thanks, 5.1.1 is being released https://github.com/Athou/commafeed/actions/runs/10736199856.