mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-20 18:06:14 -05:00
[db] Recreate v20 files table, so that new constraints take effect if upgrading
The constraints on songalbumid and songartistid where changed with v20, so we need to make sure they take effect when upgrading. This commit tries to do the table recreation like sqlite recommends and without manually crafted copy queries that are probably prone to errors. Since we are recreating anyway, this commit also reorders the columns slightly. It also includes auto-drop/recreation of triggers (should really have been its own commit) during upgrade, like is already done with indices.
This commit is contained in:
@@ -31,6 +31,9 @@
|
||||
int
|
||||
db_init_indices(sqlite3 *hdl);
|
||||
|
||||
int
|
||||
db_init_triggers(sqlite3 *hdl);
|
||||
|
||||
int
|
||||
db_init_tables(sqlite3 *hdl);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user