diff --git a/data/sql/dbmigrate-28_to_29.sql b/data/sql/dbmigrate-28_to_29.sql new file mode 100644 index 000000000..6c2a3e55b --- /dev/null +++ b/data/sql/dbmigrate-28_to_29.sql @@ -0,0 +1,11 @@ +-- Script to migate from db version 28 to 29. +-- +-- The resulthint field used to store both servent://, file:// and all other urls +-- but all non-servent:// and file:// urls were filtered out. since we now are actually +-- using http:// resulthints, we need to weed out the 'bad ones' + +-- So remoev all non-file:// or servent:// resulthints + +UPDATE playlist_item SET result_hint = "" WHERE playlist_item.guid IN (SELECT guid FROM playlist_item WHERE result_hint NOT LIKE "file://%" AND result_hint NOT LIKE "servent://%"); + +UPDATE settings SET v = '29' WHERE k == 'schema_version'; diff --git a/resources.qrc b/resources.qrc index 88a39b0d9..61c7e9d5e 100644 --- a/resources.qrc +++ b/resources.qrc @@ -115,6 +115,8 @@ <file>data/sql/dbmigrate-24_to_25.sql</file> <file>data/sql/dbmigrate-25_to_26.sql</file> <file>data/sql/dbmigrate-26_to_27.sql</file> + <file>data/sql/dbmigrate-27_to_28.sql</file> + <file>data/sql/dbmigrate-28_to_29.sql</file> <file>data/js/tomahawk.js</file> <file>data/images/avatar_frame.png</file> <file>data/images/drop-all-songs.png</file> @@ -139,7 +141,6 @@ <file>data/images/spotifycore-logo.png</file> <file>data/images/playlist-header-tiled.png</file> <file>data/images/share.png</file> - <file>data/sql/dbmigrate-27_to_28.sql</file> <file>data/images/process-stop.png</file> <file>data/icons/tomahawk-icon-128x128-grayscale.png</file> <file>data/images/collection.png</file> diff --git a/src/libtomahawk/database/DatabaseImpl.cpp b/src/libtomahawk/database/DatabaseImpl.cpp index 44f73e539..31e6d745a 100644 --- a/src/libtomahawk/database/DatabaseImpl.cpp +++ b/src/libtomahawk/database/DatabaseImpl.cpp @@ -40,7 +40,7 @@ */ #include "Schema.sql.h" -#define CURRENT_SCHEMA_VERSION 28 +#define CURRENT_SCHEMA_VERSION 29 DatabaseImpl::DatabaseImpl( const QString& dbname ) {