strawberry-audio-player-win.../data/schema/schema.sql

907 lines
20 KiB
MySQL
Raw Normal View History

2018-08-09 18:10:03 +02:00
CREATE TABLE IF NOT EXISTS schema_version (
2018-02-27 18:06:05 +01:00
version INTEGER NOT NULL
);
2018-08-15 01:28:37 +02:00
2018-08-09 18:10:03 +02:00
DELETE FROM schema_version;
2018-08-15 01:28:37 +02:00
2023-05-14 11:34:55 +02:00
INSERT INTO schema_version (version) VALUES (17);
2018-02-27 18:06:05 +01:00
2018-08-09 18:10:03 +02:00
CREATE TABLE IF NOT EXISTS directories (
2022-07-10 01:56:39 +02:00
path TEXT NOT NULL,
2018-02-27 18:06:05 +01:00
subdirs INTEGER NOT NULL
);
2018-08-09 18:10:03 +02:00
CREATE TABLE IF NOT EXISTS subdirectories (
2018-02-27 18:06:05 +01:00
directory_id INTEGER NOT NULL,
2022-07-10 01:56:39 +02:00
path TEXT NOT NULL,
2018-02-27 18:06:05 +01:00
mtime INTEGER NOT NULL
);
2018-08-09 18:10:03 +02:00
CREATE TABLE IF NOT EXISTS songs (
2018-02-27 18:06:05 +01:00
2022-07-10 01:56:39 +02:00
title TEXT,
album TEXT,
artist TEXT,
albumartist TEXT,
2018-02-27 18:06:05 +01:00
track INTEGER NOT NULL DEFAULT -1,
disc INTEGER NOT NULL DEFAULT -1,
year INTEGER NOT NULL DEFAULT -1,
2020-08-10 18:06:20 +02:00
originalyear INTEGER NOT NULL DEFAULT -1,
2022-07-10 01:56:39 +02:00
genre TEXT,
2020-04-13 03:39:51 +02:00
compilation INTEGER NOT NULL DEFAULT 0,
2022-07-10 01:56:39 +02:00
composer TEXT,
performer TEXT,
grouping TEXT,
comment TEXT,
lyrics TEXT,
2020-04-13 03:39:51 +02:00
2022-07-10 01:56:39 +02:00
artist_id TEXT,
album_id TEXT,
song_id TEXT,
2018-02-27 18:06:05 +01:00
beginning INTEGER NOT NULL DEFAULT 0,
length INTEGER NOT NULL DEFAULT 0,
2019-07-10 20:02:21 +02:00
bitrate INTEGER NOT NULL DEFAULT -1,
samplerate INTEGER NOT NULL DEFAULT -1,
bitdepth INTEGER NOT NULL DEFAULT -1,
2018-02-27 18:06:05 +01:00
2018-09-08 12:38:02 +02:00
source INTEGER NOT NULL DEFAULT 0,
2019-07-10 20:02:21 +02:00
directory_id INTEGER NOT NULL DEFAULT -1,
2022-07-10 01:56:39 +02:00
url TEXT NOT NULL,
2018-02-27 18:06:05 +01:00
filetype INTEGER NOT NULL DEFAULT 0,
2019-07-10 20:02:21 +02:00
filesize INTEGER NOT NULL DEFAULT -1,
mtime INTEGER NOT NULL DEFAULT -1,
ctime INTEGER NOT NULL DEFAULT -1,
unavailable INTEGER DEFAULT 0,
2022-07-10 01:56:39 +02:00
fingerprint TEXT,
playcount INTEGER NOT NULL DEFAULT 0,
skipcount INTEGER NOT NULL DEFAULT 0,
2019-07-10 20:02:21 +02:00
lastplayed INTEGER NOT NULL DEFAULT -1,
lastseen INTEGER NOT NULL DEFAULT -1,
compilation_detected INTEGER DEFAULT 0,
compilation_on INTEGER NOT NULL DEFAULT 0,
compilation_off INTEGER NOT NULL DEFAULT 0,
compilation_effective INTEGER NOT NULL DEFAULT 0,
2023-05-14 11:34:55 +02:00
art_embedded INTEGER DEFAULT 0,
2022-07-10 01:56:39 +02:00
art_automatic TEXT,
art_manual TEXT,
2023-05-14 11:34:55 +02:00
art_unset INTEGER DEFAULT 0,
2022-07-10 01:56:39 +02:00
effective_albumartist TEXT,
effective_originalyear INTEGER NOT NULL DEFAULT 0,
2022-07-10 01:56:39 +02:00
cue_path TEXT,
rating INTEGER DEFAULT -1,
2023-03-24 22:48:22 +01:00
acoustid_id TEXT,
acoustid_fingerprint TEXT,
musicbrainz_album_artist_id TEXT,
musicbrainz_artist_id TEXT,
musicbrainz_original_artist_id TEXT,
musicbrainz_album_id TEXT,
musicbrainz_original_album_id TEXT,
musicbrainz_recording_id TEXT,
musicbrainz_track_id TEXT,
musicbrainz_disc_id TEXT,
musicbrainz_release_group_id TEXT,
musicbrainz_work_id TEXT
);
CREATE TABLE IF NOT EXISTS subsonic_songs (
2022-07-10 01:56:39 +02:00
title TEXT,
album TEXT,
artist TEXT,
albumartist TEXT,
track INTEGER NOT NULL DEFAULT -1,
disc INTEGER NOT NULL DEFAULT -1,
year INTEGER NOT NULL DEFAULT -1,
originalyear INTEGER NOT NULL DEFAULT -1,
2022-07-10 01:56:39 +02:00
genre TEXT,
compilation INTEGER NOT NULL DEFAULT 0,
2022-07-10 01:56:39 +02:00
composer TEXT,
performer TEXT,
grouping TEXT,
comment TEXT,
lyrics TEXT,
2022-07-10 01:56:39 +02:00
artist_id TEXT,
album_id TEXT,
song_id TEXT,
beginning INTEGER NOT NULL DEFAULT 0,
length INTEGER NOT NULL DEFAULT 0,
bitrate INTEGER NOT NULL DEFAULT -1,
samplerate INTEGER NOT NULL DEFAULT -1,
bitdepth INTEGER NOT NULL DEFAULT -1,
source INTEGER NOT NULL DEFAULT 0,
directory_id INTEGER NOT NULL DEFAULT -1,
2022-07-10 01:56:39 +02:00
url TEXT NOT NULL,
filetype INTEGER NOT NULL DEFAULT 0,
filesize INTEGER NOT NULL DEFAULT -1,
mtime INTEGER NOT NULL DEFAULT -1,
ctime INTEGER NOT NULL DEFAULT -1,
unavailable INTEGER DEFAULT 0,
2022-07-10 01:56:39 +02:00
fingerprint TEXT,
playcount INTEGER NOT NULL DEFAULT 0,
skipcount INTEGER NOT NULL DEFAULT 0,
lastplayed INTEGER NOT NULL DEFAULT -1,
lastseen INTEGER NOT NULL DEFAULT -1,
compilation_detected INTEGER DEFAULT 0,
compilation_on INTEGER NOT NULL DEFAULT 0,
compilation_off INTEGER NOT NULL DEFAULT 0,
compilation_effective INTEGER NOT NULL DEFAULT 0,
2023-05-14 11:34:55 +02:00
art_embedded INTEGER DEFAULT 0,
2022-07-10 01:56:39 +02:00
art_automatic TEXT,
art_manual TEXT,
2023-05-14 11:34:55 +02:00
art_unset INTEGER DEFAULT 0,
2022-07-10 01:56:39 +02:00
effective_albumartist TEXT,
effective_originalyear INTEGER NOT NULL DEFAULT 0,
2022-07-10 01:56:39 +02:00
cue_path TEXT,
rating INTEGER DEFAULT -1,
2023-03-24 22:48:22 +01:00
acoustid_id TEXT,
acoustid_fingerprint TEXT,
musicbrainz_album_artist_id TEXT,
musicbrainz_artist_id TEXT,
musicbrainz_original_artist_id TEXT,
musicbrainz_album_id TEXT,
musicbrainz_original_album_id TEXT,
musicbrainz_recording_id TEXT,
musicbrainz_track_id TEXT,
musicbrainz_disc_id TEXT,
musicbrainz_release_group_id TEXT,
musicbrainz_work_id TEXT
);
2020-04-13 19:04:06 +02:00
CREATE TABLE IF NOT EXISTS tidal_artists_songs (
2022-07-10 01:56:39 +02:00
title TEXT,
album TEXT,
artist TEXT,
albumartist TEXT,
2020-04-13 19:04:06 +02:00
track INTEGER NOT NULL DEFAULT -1,
disc INTEGER NOT NULL DEFAULT -1,
year INTEGER NOT NULL DEFAULT -1,
2020-08-10 18:06:20 +02:00
originalyear INTEGER NOT NULL DEFAULT -1,
2022-07-10 01:56:39 +02:00
genre TEXT,
2020-04-13 19:04:06 +02:00
compilation INTEGER NOT NULL DEFAULT 0,
2022-07-10 01:56:39 +02:00
composer TEXT,
performer TEXT,
grouping TEXT,
comment TEXT,
lyrics TEXT,
2020-04-13 19:04:06 +02:00
2022-07-10 01:56:39 +02:00
artist_id TEXT,
album_id TEXT,
song_id TEXT,
2020-04-13 19:04:06 +02:00
beginning INTEGER NOT NULL DEFAULT 0,
length INTEGER NOT NULL DEFAULT 0,
bitrate INTEGER NOT NULL DEFAULT -1,
samplerate INTEGER NOT NULL DEFAULT -1,
bitdepth INTEGER NOT NULL DEFAULT -1,
source INTEGER NOT NULL DEFAULT 0,
directory_id INTEGER NOT NULL DEFAULT -1,
2022-07-10 01:56:39 +02:00
url TEXT NOT NULL,
2020-04-13 19:04:06 +02:00
filetype INTEGER NOT NULL DEFAULT 0,
filesize INTEGER NOT NULL DEFAULT -1,
mtime INTEGER NOT NULL DEFAULT -1,
ctime INTEGER NOT NULL DEFAULT -1,
unavailable INTEGER DEFAULT 0,
2022-07-10 01:56:39 +02:00
fingerprint TEXT,
2020-04-13 19:04:06 +02:00
playcount INTEGER NOT NULL DEFAULT 0,
skipcount INTEGER NOT NULL DEFAULT 0,
lastplayed INTEGER NOT NULL DEFAULT -1,
lastseen INTEGER NOT NULL DEFAULT -1,
2020-04-13 19:04:06 +02:00
compilation_detected INTEGER DEFAULT 0,
compilation_on INTEGER NOT NULL DEFAULT 0,
compilation_off INTEGER NOT NULL DEFAULT 0,
compilation_effective INTEGER NOT NULL DEFAULT 0,
2023-05-14 11:34:55 +02:00
art_embedded INTEGER DEFAULT 0,
2022-07-10 01:56:39 +02:00
art_automatic TEXT,
art_manual TEXT,
2023-05-14 11:34:55 +02:00
art_unset INTEGER DEFAULT 0,
2020-04-13 19:04:06 +02:00
2022-07-10 01:56:39 +02:00
effective_albumartist TEXT,
2020-04-13 19:04:06 +02:00
effective_originalyear INTEGER NOT NULL DEFAULT 0,
2022-07-10 01:56:39 +02:00
cue_path TEXT,
rating INTEGER DEFAULT -1,
2023-03-24 22:48:22 +01:00
acoustid_id TEXT,
acoustid_fingerprint TEXT,
musicbrainz_album_artist_id TEXT,
musicbrainz_artist_id TEXT,
musicbrainz_original_artist_id TEXT,
musicbrainz_album_id TEXT,
musicbrainz_original_album_id TEXT,
musicbrainz_recording_id TEXT,
musicbrainz_track_id TEXT,
musicbrainz_disc_id TEXT,
musicbrainz_release_group_id TEXT,
musicbrainz_work_id TEXT
2020-04-13 19:04:06 +02:00
);
CREATE TABLE IF NOT EXISTS tidal_albums_songs (
2022-07-10 01:56:39 +02:00
title TEXT,
album TEXT,
artist TEXT,
albumartist TEXT,
2020-04-13 19:04:06 +02:00
track INTEGER NOT NULL DEFAULT -1,
disc INTEGER NOT NULL DEFAULT -1,
year INTEGER NOT NULL DEFAULT -1,
2020-08-10 18:06:20 +02:00
originalyear INTEGER NOT NULL DEFAULT -1,
2022-07-10 01:56:39 +02:00
genre TEXT,
2020-04-13 19:04:06 +02:00
compilation INTEGER NOT NULL DEFAULT 0,
2022-07-10 01:56:39 +02:00
composer TEXT,
performer TEXT,
grouping TEXT,
comment TEXT,
lyrics TEXT,
2020-04-13 19:04:06 +02:00
2022-07-10 01:56:39 +02:00
artist_id TEXT,
album_id TEXT,
song_id TEXT,
2020-04-13 19:04:06 +02:00
beginning INTEGER NOT NULL DEFAULT 0,
length INTEGER NOT NULL DEFAULT 0,
bitrate INTEGER NOT NULL DEFAULT -1,
samplerate INTEGER NOT NULL DEFAULT -1,
bitdepth INTEGER NOT NULL DEFAULT -1,
source INTEGER NOT NULL DEFAULT 0,
directory_id INTEGER NOT NULL DEFAULT -1,
2022-07-10 01:56:39 +02:00
url TEXT NOT NULL,
2020-04-13 19:04:06 +02:00
filetype INTEGER NOT NULL DEFAULT 0,
filesize INTEGER NOT NULL DEFAULT -1,
mtime INTEGER NOT NULL DEFAULT -1,
ctime INTEGER NOT NULL DEFAULT -1,
unavailable INTEGER DEFAULT 0,
2022-07-10 01:56:39 +02:00
fingerprint TEXT,
2020-04-13 19:04:06 +02:00
playcount INTEGER NOT NULL DEFAULT 0,
skipcount INTEGER NOT NULL DEFAULT 0,
lastplayed INTEGER NOT NULL DEFAULT -1,
lastseen INTEGER NOT NULL DEFAULT -1,
2020-04-13 19:04:06 +02:00
compilation_detected INTEGER DEFAULT 0,
compilation_on INTEGER NOT NULL DEFAULT 0,
compilation_off INTEGER NOT NULL DEFAULT 0,
compilation_effective INTEGER NOT NULL DEFAULT 0,
2023-05-14 11:34:55 +02:00
art_embedded INTEGER DEFAULT 0,
2022-07-10 01:56:39 +02:00
art_automatic TEXT,
art_manual TEXT,
2023-05-14 11:34:55 +02:00
art_unset INTEGER DEFAULT 0,
2020-04-13 19:04:06 +02:00
2022-07-10 01:56:39 +02:00
effective_albumartist TEXT,
2020-04-13 19:04:06 +02:00
effective_originalyear INTEGER NOT NULL DEFAULT 0,
2022-07-10 01:56:39 +02:00
cue_path TEXT,
rating INTEGER DEFAULT -1,
2023-03-24 22:48:22 +01:00
acoustid_id TEXT,
acoustid_fingerprint TEXT,
musicbrainz_album_artist_id TEXT,
musicbrainz_artist_id TEXT,
musicbrainz_original_artist_id TEXT,
musicbrainz_album_id TEXT,
musicbrainz_original_album_id TEXT,
musicbrainz_recording_id TEXT,
musicbrainz_track_id TEXT,
musicbrainz_disc_id TEXT,
musicbrainz_release_group_id TEXT,
musicbrainz_work_id TEXT
2020-04-13 19:04:06 +02:00
);
CREATE TABLE IF NOT EXISTS tidal_songs (
2022-07-10 01:56:39 +02:00
title TEXT,
album TEXT,
artist TEXT,
albumartist TEXT,
2020-04-13 19:04:06 +02:00
track INTEGER NOT NULL DEFAULT -1,
disc INTEGER NOT NULL DEFAULT -1,
year INTEGER NOT NULL DEFAULT -1,
2020-08-10 18:06:20 +02:00
originalyear INTEGER NOT NULL DEFAULT -1,
2022-07-10 01:56:39 +02:00
genre TEXT,
2020-04-13 19:04:06 +02:00
compilation INTEGER NOT NULL DEFAULT 0,
2022-07-10 01:56:39 +02:00
composer TEXT,
performer TEXT,
grouping TEXT,
comment TEXT,
lyrics TEXT,
2020-04-13 19:04:06 +02:00
2022-07-10 01:56:39 +02:00
artist_id TEXT,
album_id TEXT,
song_id TEXT,
2020-04-13 19:04:06 +02:00
beginning INTEGER NOT NULL DEFAULT 0,
length INTEGER NOT NULL DEFAULT 0,
bitrate INTEGER NOT NULL DEFAULT -1,
samplerate INTEGER NOT NULL DEFAULT -1,
bitdepth INTEGER NOT NULL DEFAULT -1,
source INTEGER NOT NULL DEFAULT 0,
directory_id INTEGER NOT NULL DEFAULT -1,
2022-07-10 01:56:39 +02:00
url TEXT NOT NULL,
2020-04-13 19:04:06 +02:00
filetype INTEGER NOT NULL DEFAULT 0,
filesize INTEGER NOT NULL DEFAULT -1,
mtime INTEGER NOT NULL DEFAULT -1,
ctime INTEGER NOT NULL DEFAULT -1,
unavailable INTEGER DEFAULT 0,
2022-07-10 01:56:39 +02:00
fingerprint TEXT,
2020-04-13 19:04:06 +02:00
playcount INTEGER NOT NULL DEFAULT 0,
skipcount INTEGER NOT NULL DEFAULT 0,
lastplayed INTEGER NOT NULL DEFAULT -1,
lastseen INTEGER NOT NULL DEFAULT -1,
2020-04-13 19:04:06 +02:00
compilation_detected INTEGER DEFAULT 0,
compilation_on INTEGER NOT NULL DEFAULT 0,
compilation_off INTEGER NOT NULL DEFAULT 0,
compilation_effective INTEGER NOT NULL DEFAULT 0,
2023-05-14 11:34:55 +02:00
art_embedded INTEGER DEFAULT 0,
2022-07-10 01:56:39 +02:00
art_automatic TEXT,
art_manual TEXT,
2023-05-14 11:34:55 +02:00
art_unset INTEGER DEFAULT 0,
2020-04-13 19:04:06 +02:00
2022-07-10 01:56:39 +02:00
effective_albumartist TEXT,
2020-04-13 19:04:06 +02:00
effective_originalyear INTEGER NOT NULL DEFAULT 0,
2022-07-10 01:56:39 +02:00
cue_path TEXT,
rating INTEGER DEFAULT -1,
2023-03-24 22:48:22 +01:00
acoustid_id TEXT,
acoustid_fingerprint TEXT,
musicbrainz_album_artist_id TEXT,
musicbrainz_artist_id TEXT,
musicbrainz_original_artist_id TEXT,
musicbrainz_album_id TEXT,
musicbrainz_original_album_id TEXT,
musicbrainz_recording_id TEXT,
musicbrainz_track_id TEXT,
musicbrainz_disc_id TEXT,
musicbrainz_release_group_id TEXT,
musicbrainz_work_id TEXT
2020-04-13 19:04:06 +02:00
);
CREATE TABLE IF NOT EXISTS qobuz_artists_songs (
2019-06-17 23:54:24 +02:00
2022-07-10 01:56:39 +02:00
title TEXT,
album TEXT,
artist TEXT,
albumartist TEXT,
2019-06-17 23:54:24 +02:00
track INTEGER NOT NULL DEFAULT -1,
disc INTEGER NOT NULL DEFAULT -1,
year INTEGER NOT NULL DEFAULT -1,
2020-08-10 18:06:20 +02:00
originalyear INTEGER NOT NULL DEFAULT -1,
2022-07-10 01:56:39 +02:00
genre TEXT,
2020-04-13 03:39:51 +02:00
compilation INTEGER NOT NULL DEFAULT 0,
2022-07-10 01:56:39 +02:00
composer TEXT,
performer TEXT,
grouping TEXT,
comment TEXT,
lyrics TEXT,
2020-04-13 03:39:51 +02:00
2022-07-10 01:56:39 +02:00
artist_id TEXT,
album_id TEXT,
song_id TEXT,
2019-06-17 23:54:24 +02:00
beginning INTEGER NOT NULL DEFAULT 0,
length INTEGER NOT NULL DEFAULT 0,
2019-07-10 20:02:21 +02:00
bitrate INTEGER NOT NULL DEFAULT -1,
samplerate INTEGER NOT NULL DEFAULT -1,
bitdepth INTEGER NOT NULL DEFAULT -1,
source INTEGER NOT NULL DEFAULT 0,
2019-07-10 20:02:21 +02:00
directory_id INTEGER NOT NULL DEFAULT -1,
2022-07-10 01:56:39 +02:00
url TEXT NOT NULL,
filetype INTEGER NOT NULL DEFAULT 0,
2019-07-10 20:02:21 +02:00
filesize INTEGER NOT NULL DEFAULT -1,
mtime INTEGER NOT NULL DEFAULT -1,
ctime INTEGER NOT NULL DEFAULT -1,
2018-02-27 18:06:05 +01:00
unavailable INTEGER DEFAULT 0,
2022-07-10 01:56:39 +02:00
fingerprint TEXT,
2018-02-27 18:06:05 +01:00
playcount INTEGER NOT NULL DEFAULT 0,
skipcount INTEGER NOT NULL DEFAULT 0,
2019-07-10 20:02:21 +02:00
lastplayed INTEGER NOT NULL DEFAULT -1,
lastseen INTEGER NOT NULL DEFAULT -1,
2018-02-27 18:06:05 +01:00
compilation_detected INTEGER DEFAULT 0,
compilation_on INTEGER NOT NULL DEFAULT 0,
compilation_off INTEGER NOT NULL DEFAULT 0,
compilation_effective INTEGER NOT NULL DEFAULT 0,
2023-05-14 11:34:55 +02:00
art_embedded INTEGER DEFAULT 0,
2022-07-10 01:56:39 +02:00
art_automatic TEXT,
art_manual TEXT,
2023-05-14 11:34:55 +02:00
art_unset INTEGER DEFAULT 0,
2018-02-27 18:06:05 +01:00
2022-07-10 01:56:39 +02:00
effective_albumartist TEXT,
2018-02-27 18:06:05 +01:00
effective_originalyear INTEGER NOT NULL DEFAULT 0,
2018-08-09 18:10:03 +02:00
2022-07-10 01:56:39 +02:00
cue_path TEXT,
rating INTEGER DEFAULT -1,
2023-03-24 22:48:22 +01:00
acoustid_id TEXT,
acoustid_fingerprint TEXT,
musicbrainz_album_artist_id TEXT,
musicbrainz_artist_id TEXT,
musicbrainz_original_artist_id TEXT,
musicbrainz_album_id TEXT,
musicbrainz_original_album_id TEXT,
musicbrainz_recording_id TEXT,
musicbrainz_track_id TEXT,
musicbrainz_disc_id TEXT,
musicbrainz_release_group_id TEXT,
musicbrainz_work_id TEXT
);
CREATE TABLE IF NOT EXISTS qobuz_albums_songs (
2022-07-10 01:56:39 +02:00
title TEXT,
album TEXT,
artist TEXT,
albumartist TEXT,
track INTEGER NOT NULL DEFAULT -1,
disc INTEGER NOT NULL DEFAULT -1,
year INTEGER NOT NULL DEFAULT -1,
originalyear INTEGER NOT NULL DEFAULT -1,
2022-07-10 01:56:39 +02:00
genre TEXT,
compilation INTEGER NOT NULL DEFAULT 0,
2022-07-10 01:56:39 +02:00
composer TEXT,
performer TEXT,
grouping TEXT,
comment TEXT,
lyrics TEXT,
2022-07-10 01:56:39 +02:00
artist_id TEXT,
album_id TEXT,
song_id TEXT,
beginning INTEGER NOT NULL DEFAULT 0,
length INTEGER NOT NULL DEFAULT 0,
bitrate INTEGER NOT NULL DEFAULT -1,
samplerate INTEGER NOT NULL DEFAULT -1,
bitdepth INTEGER NOT NULL DEFAULT -1,
source INTEGER NOT NULL DEFAULT 0,
directory_id INTEGER NOT NULL DEFAULT -1,
2022-07-10 01:56:39 +02:00
url TEXT NOT NULL,
filetype INTEGER NOT NULL DEFAULT 0,
filesize INTEGER NOT NULL DEFAULT -1,
mtime INTEGER NOT NULL DEFAULT -1,
ctime INTEGER NOT NULL DEFAULT -1,
unavailable INTEGER DEFAULT 0,
2022-07-10 01:56:39 +02:00
fingerprint TEXT,
playcount INTEGER NOT NULL DEFAULT 0,
skipcount INTEGER NOT NULL DEFAULT 0,
lastplayed INTEGER NOT NULL DEFAULT -1,
lastseen INTEGER NOT NULL DEFAULT -1,
compilation_detected INTEGER DEFAULT 0,
compilation_on INTEGER NOT NULL DEFAULT 0,
compilation_off INTEGER NOT NULL DEFAULT 0,
compilation_effective INTEGER NOT NULL DEFAULT 0,
2023-05-14 11:34:55 +02:00
art_embedded INTEGER DEFAULT 0,
2022-07-10 01:56:39 +02:00
art_automatic TEXT,
art_manual TEXT,
2023-05-14 11:34:55 +02:00
art_unset INTEGER DEFAULT 0,
2022-07-10 01:56:39 +02:00
effective_albumartist TEXT,
effective_originalyear INTEGER NOT NULL DEFAULT 0,
2022-07-10 01:56:39 +02:00
cue_path TEXT,
rating INTEGER DEFAULT -1,
2023-03-24 22:48:22 +01:00
acoustid_id TEXT,
acoustid_fingerprint TEXT,
musicbrainz_album_artist_id TEXT,
musicbrainz_artist_id TEXT,
musicbrainz_original_artist_id TEXT,
musicbrainz_album_id TEXT,
musicbrainz_original_album_id TEXT,
musicbrainz_recording_id TEXT,
musicbrainz_track_id TEXT,
musicbrainz_disc_id TEXT,
musicbrainz_release_group_id TEXT,
musicbrainz_work_id TEXT
);
CREATE TABLE IF NOT EXISTS qobuz_songs (
2022-07-10 01:56:39 +02:00
title TEXT,
album TEXT,
artist TEXT,
albumartist TEXT,
track INTEGER NOT NULL DEFAULT -1,
disc INTEGER NOT NULL DEFAULT -1,
year INTEGER NOT NULL DEFAULT -1,
originalyear INTEGER NOT NULL DEFAULT -1,
2022-07-10 01:56:39 +02:00
genre TEXT,
compilation INTEGER NOT NULL DEFAULT 0,
2022-07-10 01:56:39 +02:00
composer TEXT,
performer TEXT,
grouping TEXT,
comment TEXT,
lyrics TEXT,
2022-07-10 01:56:39 +02:00
artist_id TEXT,
album_id TEXT,
song_id TEXT,
beginning INTEGER NOT NULL DEFAULT 0,
length INTEGER NOT NULL DEFAULT 0,
bitrate INTEGER NOT NULL DEFAULT -1,
samplerate INTEGER NOT NULL DEFAULT -1,
bitdepth INTEGER NOT NULL DEFAULT -1,
source INTEGER NOT NULL DEFAULT 0,
directory_id INTEGER NOT NULL DEFAULT -1,
2022-07-10 01:56:39 +02:00
url TEXT NOT NULL,
filetype INTEGER NOT NULL DEFAULT 0,
filesize INTEGER NOT NULL DEFAULT -1,
mtime INTEGER NOT NULL DEFAULT -1,
ctime INTEGER NOT NULL DEFAULT -1,
unavailable INTEGER DEFAULT 0,
2022-07-10 01:56:39 +02:00
fingerprint TEXT,
playcount INTEGER NOT NULL DEFAULT 0,
skipcount INTEGER NOT NULL DEFAULT 0,
lastplayed INTEGER NOT NULL DEFAULT -1,
lastseen INTEGER NOT NULL DEFAULT -1,
compilation_detected INTEGER DEFAULT 0,
compilation_on INTEGER NOT NULL DEFAULT 0,
compilation_off INTEGER NOT NULL DEFAULT 0,
compilation_effective INTEGER NOT NULL DEFAULT 0,
2023-05-14 11:34:55 +02:00
art_embedded INTEGER DEFAULT 0,
2022-07-10 01:56:39 +02:00
art_automatic TEXT,
art_manual TEXT,
2023-05-14 11:34:55 +02:00
art_unset INTEGER DEFAULT 0,
2022-07-10 01:56:39 +02:00
effective_albumartist TEXT,
effective_originalyear INTEGER NOT NULL DEFAULT 0,
2022-07-10 01:56:39 +02:00
cue_path TEXT,
rating INTEGER DEFAULT -1,
2023-03-24 22:48:22 +01:00
acoustid_id TEXT,
acoustid_fingerprint TEXT,
musicbrainz_album_artist_id TEXT,
musicbrainz_artist_id TEXT,
musicbrainz_original_artist_id TEXT,
musicbrainz_album_id TEXT,
musicbrainz_original_album_id TEXT,
musicbrainz_recording_id TEXT,
musicbrainz_track_id TEXT,
musicbrainz_disc_id TEXT,
musicbrainz_release_group_id TEXT,
musicbrainz_work_id TEXT
2018-02-27 18:06:05 +01:00
);
2018-08-09 18:10:03 +02:00
CREATE TABLE IF NOT EXISTS playlists (
2018-02-27 18:06:05 +01:00
2022-07-10 01:56:39 +02:00
name TEXT NOT NULL,
2018-02-27 18:06:05 +01:00
last_played INTEGER NOT NULL DEFAULT -1,
ui_order INTEGER NOT NULL DEFAULT 0,
2022-07-10 01:56:39 +02:00
special_type TEXT,
ui_path TEXT,
is_favorite INTEGER NOT NULL DEFAULT 0,
dynamic_playlist_type INTEGER,
2022-07-10 01:56:39 +02:00
dynamic_playlist_backend TEXT,
dynamic_playlist_data BLOB
2018-02-27 18:06:05 +01:00
);
2018-08-09 18:10:03 +02:00
CREATE TABLE IF NOT EXISTS playlist_items (
2018-02-27 18:06:05 +01:00
playlist INTEGER NOT NULL,
2018-09-08 12:38:02 +02:00
type INTEGER NOT NULL DEFAULT 0,
2018-02-27 18:06:05 +01:00
collection_id INTEGER,
2022-07-10 01:56:39 +02:00
playlist_url TEXT,
2018-02-27 18:06:05 +01:00
2022-07-10 01:56:39 +02:00
title TEXT,
album TEXT,
artist TEXT,
albumartist TEXT,
2020-04-13 03:39:51 +02:00
track INTEGER,
disc INTEGER,
year INTEGER,
originalyear INTEGER,
2022-07-10 01:56:39 +02:00
genre TEXT,
2020-04-13 03:39:51 +02:00
compilation INTEGER DEFAULT 0,
2022-07-10 01:56:39 +02:00
composer TEXT,
performer TEXT,
grouping TEXT,
comment TEXT,
lyrics TEXT,
2020-04-13 03:39:51 +02:00
2022-07-10 01:56:39 +02:00
artist_id TEXT,
album_id TEXT,
song_id TEXT,
2020-04-13 03:39:51 +02:00
beginning INTEGER,
length INTEGER,
bitrate INTEGER,
samplerate INTEGER,
bitdepth INTEGER,
source INTEGER,
2018-02-27 18:06:05 +01:00
directory_id INTEGER,
2022-07-10 01:56:39 +02:00
url TEXT NOT NULL,
2020-04-13 03:39:51 +02:00
filetype INTEGER,
2018-02-27 18:06:05 +01:00
filesize INTEGER,
mtime INTEGER,
ctime INTEGER,
unavailable INTEGER DEFAULT 0,
2022-07-10 01:56:39 +02:00
fingerprint TEXT,
2020-04-13 03:39:51 +02:00
playcount INTEGER DEFAULT 0,
skipcount INTEGER DEFAULT 0,
lastplayed INTEGER DEFAULT -1,
lastseen INTEGER DEFAULT -1,
2018-02-27 18:06:05 +01:00
compilation_detected INTEGER DEFAULT 0,
2020-04-13 03:39:51 +02:00
compilation_on INTEGER DEFAULT 0,
compilation_off INTEGER DEFAULT 0,
compilation_effective INTEGER DEFAULT 0,
2018-02-27 18:06:05 +01:00
2023-05-14 11:34:55 +02:00
art_embedded INTEGER DEFAULT 0,
2022-07-10 01:56:39 +02:00
art_automatic TEXT,
art_manual TEXT,
2023-05-14 11:34:55 +02:00
art_unset INTEGER DEFAULT 0,
2018-02-27 18:06:05 +01:00
2022-07-10 01:56:39 +02:00
effective_albumartist TEXT,
2020-04-13 03:39:51 +02:00
effective_originalyear INTEGER,
2018-02-27 18:06:05 +01:00
2022-07-10 01:56:39 +02:00
cue_path TEXT,
rating INTEGER DEFAULT -1,
2023-03-24 22:48:22 +01:00
acoustid_id TEXT,
acoustid_fingerprint TEXT,
musicbrainz_album_artist_id TEXT,
musicbrainz_artist_id TEXT,
musicbrainz_original_artist_id TEXT,
musicbrainz_album_id TEXT,
musicbrainz_original_album_id TEXT,
musicbrainz_recording_id TEXT,
musicbrainz_track_id TEXT,
musicbrainz_disc_id TEXT,
musicbrainz_release_group_id TEXT,
musicbrainz_work_id TEXT
2018-02-27 18:06:05 +01:00
);
2018-08-09 18:10:03 +02:00
CREATE TABLE IF NOT EXISTS devices (
2022-07-10 01:56:39 +02:00
unique_id TEXT NOT NULL,
friendly_name TEXT,
2018-02-27 18:06:05 +01:00
size INTEGER,
2022-07-10 01:56:39 +02:00
icon TEXT,
2018-02-27 18:06:05 +01:00
schema_version INTEGER NOT NULL DEFAULT 0,
transcode_mode NOT NULL DEFAULT 3,
transcode_format NOT NULL DEFAULT 5
);
2021-07-11 01:02:53 +02:00
CREATE TABLE IF NOT EXISTS radio_channels (
source INTEGER NOT NULL DEFAULT 0,
2022-07-10 01:56:39 +02:00
name TEXT,
url TEXT NOT NULL,
thumbnail_url TEXT
2021-07-11 01:02:53 +02:00
);
CREATE INDEX IF NOT EXISTS idx_url ON songs (url);
2018-02-27 18:06:05 +01:00
2018-08-09 18:10:03 +02:00
CREATE INDEX IF NOT EXISTS idx_comp_artist ON songs (compilation_effective, artist);
2018-02-27 18:06:05 +01:00
CREATE INDEX IF NOT EXISTS idx_albumartist ON songs (albumartist);
CREATE INDEX IF NOT EXISTS idx_artist ON songs (artist);
2018-08-09 18:10:03 +02:00
CREATE INDEX IF NOT EXISTS idx_album ON songs (album);
2018-02-27 18:06:05 +01:00
2018-08-09 18:10:03 +02:00
CREATE INDEX IF NOT EXISTS idx_title ON songs (title);
2018-02-27 18:06:05 +01:00
2018-08-09 18:10:03 +02:00
CREATE VIEW IF NOT EXISTS duplicated_songs as select artist dup_artist, album dup_album, title dup_title from songs as inner_songs where artist != '' and album != '' and title != '' and unavailable = 0 group by artist, album , title having count(*) > 1;
2018-02-27 18:06:05 +01:00
CREATE VIRTUAL TABLE IF NOT EXISTS songs_fts USING fts5(
2018-02-27 18:06:05 +01:00
ftstitle,
ftsalbum,
ftsartist,
ftsalbumartist,
ftscomposer,
ftsperformer,
ftsgrouping,
ftsgenre,
ftscomment,
2020-08-05 23:31:52 +02:00
tokenize = "unicode61 remove_diacritics 1"
);
CREATE VIRTUAL TABLE IF NOT EXISTS subsonic_songs_fts USING fts5(
ftstitle,
ftsalbum,
ftsartist,
ftsalbumartist,
ftscomposer,
ftsperformer,
ftsgrouping,
ftsgenre,
ftscomment,
tokenize = "unicode61 remove_diacritics 1"
);
2020-04-13 19:04:06 +02:00
CREATE VIRTUAL TABLE IF NOT EXISTS tidal_artists_songs_fts USING fts5(
ftstitle,
ftsalbum,
ftsartist,
ftsalbumartist,
ftscomposer,
ftsperformer,
ftsgrouping,
ftsgenre,
ftscomment,
2020-08-05 23:31:52 +02:00
tokenize = "unicode61 remove_diacritics 1"
2020-04-13 19:04:06 +02:00
);
CREATE VIRTUAL TABLE IF NOT EXISTS tidal_albums_songs_fts USING fts5(
ftstitle,
ftsalbum,
ftsartist,
ftsalbumartist,
ftscomposer,
ftsperformer,
ftsgrouping,
ftsgenre,
ftscomment,
2020-08-05 23:31:52 +02:00
tokenize = "unicode61 remove_diacritics 1"
2020-04-13 19:04:06 +02:00
);
CREATE VIRTUAL TABLE IF NOT EXISTS tidal_songs_fts USING fts5(
ftstitle,
ftsalbum,
ftsartist,
ftsalbumartist,
ftscomposer,
ftsperformer,
ftsgrouping,
ftsgenre,
ftscomment,
2020-08-05 23:31:52 +02:00
tokenize = "unicode61 remove_diacritics 1"
2020-04-13 19:04:06 +02:00
);
CREATE VIRTUAL TABLE IF NOT EXISTS qobuz_artists_songs_fts USING fts5(
ftstitle,
ftsalbum,
ftsartist,
ftsalbumartist,
ftscomposer,
ftsperformer,
ftsgrouping,
ftsgenre,
ftscomment,
tokenize = "unicode61 remove_diacritics 1"
);
CREATE VIRTUAL TABLE IF NOT EXISTS qobuz_albums_songs_fts USING fts5(
2019-06-18 14:41:48 +02:00
ftstitle,
ftsalbum,
ftsartist,
ftsalbumartist,
ftscomposer,
ftsperformer,
2018-02-27 18:06:05 +01:00
ftsgrouping,
ftsgenre,
ftscomment,
2020-08-05 23:31:52 +02:00
tokenize = "unicode61 remove_diacritics 1"
2018-02-27 18:06:05 +01:00
);
CREATE VIRTUAL TABLE IF NOT EXISTS qobuz_songs_fts USING fts5(
2018-02-27 18:06:05 +01:00
ftstitle,
ftsalbum,
ftsartist,
ftsalbumartist,
ftscomposer,
ftsperformer,
ftsgrouping,
ftsgenre,
ftscomment,
2020-08-05 23:31:52 +02:00
tokenize = "unicode61 remove_diacritics 1"
2018-02-27 18:06:05 +01:00
);
CREATE VIRTUAL TABLE IF NOT EXISTS %allsongstables_fts USING fts5(
2018-02-27 18:06:05 +01:00
ftstitle,
ftsalbum,
ftsartist,
ftsalbumartist,
ftscomposer,
ftsperformer,
ftsgrouping,
ftsgenre,
ftscomment,
2020-08-05 23:31:52 +02:00
tokenize = "unicode61 remove_diacritics 1"
2018-02-27 18:06:05 +01:00
);