feat: media – Genres, FSK-Badges, TR-Filter, Film-Modal, Favoriten-Kalender
This commit is contained in:
@@ -545,6 +545,17 @@ if (!db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='mov
|
||||
`);
|
||||
}
|
||||
|
||||
// movie_favorites neue Spalten (Migration)
|
||||
{
|
||||
const cols = db.pragma('table_info(movie_favorites)').map(c => c.name);
|
||||
if (!cols.includes('release_date'))
|
||||
db.exec("ALTER TABLE movie_favorites ADD COLUMN release_date TEXT NOT NULL DEFAULT ''");
|
||||
if (!cols.includes('genres'))
|
||||
db.exec("ALTER TABLE movie_favorites ADD COLUMN genres TEXT NOT NULL DEFAULT '[]'");
|
||||
if (!cols.includes('fsk'))
|
||||
db.exec("ALTER TABLE movie_favorites ADD COLUMN fsk TEXT NOT NULL DEFAULT ''");
|
||||
}
|
||||
|
||||
// TMDb-Token Default
|
||||
if (!db.prepare("SELECT value FROM admin_settings WHERE key='tmdb_token'").get())
|
||||
db.prepare("INSERT INTO admin_settings (key,value) VALUES ('tmdb_token','')").run();
|
||||
|
||||
Reference in New Issue
Block a user