Page 1 of 1

Upgrading database

PostPosted: Mon Feb 25, 2013 2:50 pm
by kermit22
I recently attempted to upgrade my musiccabinet to version .7.22 and I ended up getting some .jsp not found errors so I reverted back to .7.20. After I reverted back I went into the settings and I was going to do a full scan and it said that I needed to finish my MusicCabinet configuration. So I went to the MusicCabinet page in settings and there is a button that says upgrade database, but when I click the button nothing happens. Any idea how to resolve this?

I'm going to upgrade to .7.22 when I get more time to troubleshoot what is happening, but in the mean time I would like to get my .7.20 working properly.

Thanks.

Re: Upgrading database

PostPosted: Mon Feb 25, 2013 3:53 pm
by hakko
The 0.7.20 release assumes a certain database layout, and the 0.7.22 release assumes a slightly different layout.

Every release contains code to upgrade the database to the latest database layout. Update scripts are found here: https://github.com/hakko/musiccabinet/t ... /sql/setup
However the code doesn't know how to downgrade the database layout (0.7.20 doesn't know what changes 0.7.22 will add)

What you're doing here is running the 0.7.20 code against a 0.7.22 database layout. You can either try and downgrade the database layout back to 0.7.20 by revoking the changes found in 1035.sql and 1036.sql but that's probably pretty complicated. The only other way I can think of is actually to stop the service, remove the whole database and then start again. The code will then upgrade the database to 0.7.20.

You can use PostgreSQL tools to make backups of the database (both the whole database and specific tables) to avoid having to re-fetch last.fm information.

Re: Upgrading database

PostPosted: Mon Feb 25, 2013 6:58 pm
by kermit22
That makes sense. Thanks for the info. I think I will make another attempt to upgrade to .7.22 before I recreate the database for .7.20.