facundoolano / feedi

A personal news aggregator and Mastodon client
GNU Affero General Public License v3.0
888 stars 28 forks source link

Feedi migrations incompatible with Ubuntu 20.x (sqlite3 3.31) #36

Closed bfahrenfort closed 9 months ago

bfahrenfort commented 1 year ago

Just wanted to note that migrations cannot be performed with sqlite3 < 3.35. The DROP COLUMN syntax used by the sqlalchemy migrations was not present in sqlite3 before that version, and Ubuntu 20's final sqlite3 release was 3.31.

I solved this by installing a binary of sqlite3 manually and using it with make dbshell to manually perform the drops and alembic stamping the version with venv/bin/alembic stamp 0efddf242a41 && venv/bin/alembic upgrade head, repeat until it starts completing successfully.

Perhaps if I'd forced sqlalchemy to recompile by deleting its pyc files it would have used the new sqlite binary, for some reason it was still giving syntax errors after I'd used update-alternatives to make the new version the default.

Might want to make this clear in README and/or add a check in the Debian setup script.

Side note: thanks for the recent updates, the new parsers are great!

facundoolano commented 1 year ago

Yeah I noticed this a few days ago. I'm working around it by going back to python 3.9 in a development branch and using batch mode for alembic migrations (that way at least some of the alter table migrations are run in a sqlite < 3.35 compatible way). May need to go back and tweak some of the old migrations though

facundoolano commented 9 months ago

Closing this one since I won't be fixing this old migration.