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

98 lines
2.4 KiB
MySQL
Raw Normal View History

2018-02-27 18:06:05 +01:00
CREATE TABLE device_%deviceid_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
);
CREATE TABLE device_%deviceid_subdirectories (
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
);
CREATE TABLE device_%deviceid_songs (
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,
originalyear INTEGER NOT NULL DEFAULT -1,
2022-07-10 01:56:39 +02:00
genre TEXT,
2020-04-13 23:24:35 +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,
2018-02-27 18:06:05 +01: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:04:05 +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:04:05 +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:04:05 +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:04:05 +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-10-02 00:38:52 +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,
ebur128_integrated_loudness_lufs REAL,
ebur128_loudness_range_lu REAL
2018-02-27 18:06:05 +01:00
);
CREATE INDEX idx_device_%deviceid_songs_album ON device_%deviceid_songs (album);
CREATE INDEX idx_device_%deviceid_songs_comp_artist ON device_%deviceid_songs (compilation_effective, artist);
UPDATE devices SET schema_version=5 WHERE ROWID=%deviceid;