-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop existing Ampache sessions on the v1.9.0 update
The schema of the sessions table has changed.
- Loading branch information
Showing
1 changed file
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
* later. See the COPYING file. | ||
* | ||
* @author Pauli Järvinen <[email protected]> | ||
* @copyright Pauli Järvinen 2017 | ||
* @copyright Pauli Järvinen 2017 - 2023 | ||
*/ | ||
|
||
namespace OCA\Music\Migration; | ||
|
@@ -51,10 +51,6 @@ public function run(IOutput $output) { | |
// fulfill the new schema. | ||
$tablesToErase = []; | ||
|
||
if (\version_compare($installedVersion, '0.3.12', '<')) { | ||
$tablesToErase[] = 'music_ampache_sessions'; | ||
} | ||
|
||
if (\version_compare($installedVersion, '0.3.16.1', '<')) { | ||
$tablesToErase[] = 'music_artists'; | ||
$tablesToErase[] = 'music_albums'; | ||
|
@@ -66,6 +62,10 @@ public function run(IOutput $output) { | |
$tablesToErase[] = 'music_bookmarks'; | ||
} | ||
|
||
if (\version_compare($installedVersion, '1.9.0', '<')) { | ||
$tablesToErase[] = 'music_ampache_sessions'; | ||
} | ||
|
||
// Invalidate the cache on each update (if there is one). | ||
// This might not be strictly necessary on all migrations, but it will do no harm. | ||
$tablesToErase[] = 'music_cache'; | ||
|