oxtyped / gpodder2go

gpodder2go is a simple self-hosted, golang, drop-in replacement for gpodder/mygpo server to handle podcast subscriptions management for gpodder clients
GNU Affero General Public License v3.0
98 stars 13 forks source link

Synchronizing devices fails #29

Closed gilcu3 closed 5 months ago

gilcu3 commented 5 months ago

I am trying to sync two devices, and getting this error:

gpodder2go[180592]: 2024/05/09 20:08:12 error selecting sync group id: &sqlite.Error{msg:"SQL logic error: no such column: device_sync_group_id (1)", code:1}

It seems https://github.com/oxtyped/gpodder2go/blob/19ae310fd6d0ad922fb70163c0f5b4ee9e4cacff/pkg/data/sqlite.go#L470 expects that device_sync_group_id is in the devices table, but this column does not exist. Am I missing something?

oxtyped commented 5 months ago

Hi @gilcu3,

It sounds like you might have missed out running a migration. This is my bad, I should have added this step into the last release.

You'll need to run the following

$ DB=g2g.db make migrate-up

or if you're using docker, this:

$ DB=g2g.db make migrate-up-docker

Note: If your database file is somewhere else, make sure to modify the DB= value to the right path.

Please let me know if this helps!

gilcu3 commented 5 months ago

I tried running the migrations already, but there were no changes. Which migration file should create that column?

oxtyped commented 5 months ago

Thanks @gilcu3, it looks like I have some missing code that should have been committed in the last release, but it didn't, and I had already cleared my git.

https://github.com/oxtyped/gpodder2go/commit/886ee3e3f2437ebee6e188915048acfd01d022ad

I had to rewrite the code a little and the migration.

Do let me know if you are having trouble migrating from the latest main branch :bow:

gilcu3 commented 5 months ago

Hi, sorry for the week delay. Just tested with the main branch and not it works as expected, thank you.