d-d-d-d-drop that bitch
This commit is contained in:
parent
ef142f2ff0
commit
15e6e99269
1 changed files with 6 additions and 1 deletions
7
js/db.js
7
js/db.js
|
|
@ -1,7 +1,7 @@
|
|||
export class MusicDatabase {
|
||||
constructor() {
|
||||
this.dbName = 'MonochromeDB';
|
||||
this.version = 9;
|
||||
this.version = 11;
|
||||
this.db = null;
|
||||
}
|
||||
|
||||
|
|
@ -24,6 +24,11 @@ export class MusicDatabase {
|
|||
request.onupgradeneeded = (event) => {
|
||||
const db = event.target.result;
|
||||
|
||||
// v10 introduced track_ratings (bad PR) — remove it
|
||||
if (db.objectStoreNames.contains('track_ratings')) {
|
||||
db.deleteObjectStore('track_ratings');
|
||||
}
|
||||
|
||||
// Favorites stores
|
||||
if (!db.objectStoreNames.contains('favorites_tracks')) {
|
||||
const store = db.createObjectStore('favorites_tracks', { keyPath: 'id' });
|
||||
|
|
|
|||
Loading…
Reference in a new issue