gpodder2go icon indicating copy to clipboard operation
gpodder2go copied to clipboard

Synchronizing devices fails

Open gilcu3 opened this issue 9 months ago • 3 comments

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?

gilcu3 avatar May 09 '24 18:05 gilcu3

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!

oxtyped avatar May 10 '24 00:05 oxtyped

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

gilcu3 avatar May 10 '24 05:05 gilcu3

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:

oxtyped avatar May 11 '24 06:05 oxtyped

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

gilcu3 avatar May 19 '24 10:05 gilcu3