Convert database from v6 to v5

Hey. I have converted my database to work with v6. Unfortunatly i forgot to keep a backup. Is it possible to covert it back to work with v5. If so, how?

Downgrading is absolutely unsupported, but anyway, I give you some hints - because in this particular case, from 23 to 24, the changes are very few. To go back to 23 from 24:

In table “items”:

  • Delete colums level_peak, level_truepeak, level_r128 and options

In table “playlist”:

  • Delete columns starttime, startposition, stoptime

In table “config”:

  • Find the row with name=“schemaversion” and change value from 24 to 23

Note that SQLite does not have any drop column functionality in ALTER TABLE, so you will probably have to recreate the tables and copy over the data: https://stackoverflow.com/questions/8442147/how-to-delete-or-add-column-in-sqlite

Or find some GUI frontend that can do it (SQLitebrowser?).

I have no idea how to do this. Do you have the time to help me if i send the database file?

No, sorry. As I said, no official support for downgrades.

In theory if you just make that small change in ‘config’ table and make schemaversion to 23, will that be enough as the v5 mAirlist will ignore the new columns?

If so, Torben has given some good advice. Find SQLitebrowser and open a copy of the the database using that. (http://sqlitebrowser.org/)

MAKE A BACKUP COPY OF THE DATABASE, MAKE MULTIPLE COPIES
If you have an accident you don’t lose the database.

In theory, yes. (All INSERT statements use proper field lists.)

In practice, the day will come when you want to upgrade to v6 and try to run the schema upgrade, and that will fail because the new fields already exist.

The bottom line is, if you want to “hack” your database like this, be prepared to “hack” it again when doing the v24 ugprade.

Hey! I got it sorted. I dont not need to remove the colums mentioned. I only change 24 to 23 and it works fine!

Thanks Torben!