trigger soft db update

This commit is contained in:
Adrian Ulrich 2018-01-28 13:01:29 +01:00
parent 0be6bbf853
commit 5555c69211
2 changed files with 8 additions and 2 deletions

View File

@ -35,7 +35,7 @@ public class MediaLibraryBackend extends SQLiteOpenHelper {
/**
* The database version we are using
*/
private static final int DATABASE_VERSION = 20170619;
private static final int DATABASE_VERSION = 20180128;
/**
* on-disk file to store the database
*/

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2017 Adrian Ulrich <adrian@blinkenlights.ch>
* Copyright (C) 2016-2018 Adrian Ulrich <adrian@blinkenlights.ch>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -320,6 +320,12 @@ public class MediaSchema {
dbh.execSQL(VIEW_CREATE_PLAYLIST_SONGS);
}
if (oldVersion >= 20170211 && oldVersion < 20180128) {
// Minor indexer changes - invalidate (but do not drop) all
// existing entries.
dbh.execSQL("UPDATE songs SET mtime=mtime-1 WHERE mtime > 0");
}
}
}