2010-11-27 17:14:09 +01:00
|
|
|
/* Schema should be kept identical to the "songs" table, even though most of
|
|
|
|
it isn't used by jamendo */
|
|
|
|
CREATE TABLE jamendo.songs (
|
|
|
|
title TEXT,
|
|
|
|
album TEXT,
|
|
|
|
artist TEXT,
|
|
|
|
albumartist TEXT,
|
|
|
|
composer TEXT,
|
|
|
|
track INTEGER,
|
|
|
|
disc INTEGER,
|
|
|
|
bpm REAL,
|
|
|
|
year INTEGER,
|
|
|
|
genre TEXT,
|
|
|
|
comment TEXT,
|
|
|
|
compilation INTEGER,
|
|
|
|
|
|
|
|
length INTEGER,
|
|
|
|
bitrate INTEGER,
|
|
|
|
samplerate INTEGER,
|
|
|
|
|
|
|
|
directory INTEGER NOT NULL,
|
|
|
|
filename TEXT NOT NULL,
|
|
|
|
mtime INTEGER NOT NULL,
|
|
|
|
ctime INTEGER NOT NULL,
|
|
|
|
filesize INTEGER NOT NULL,
|
|
|
|
|
|
|
|
sampler INTEGER NOT NULL DEFAULT 0,
|
|
|
|
art_automatic TEXT,
|
|
|
|
art_manual TEXT,
|
|
|
|
filetype INTEGER NOT NULL DEFAULT 0,
|
|
|
|
playcount INTEGER NOT NULL DEFAULT 0,
|
|
|
|
lastplayed INTEGER,
|
|
|
|
rating INTEGER,
|
|
|
|
forced_compilation_on INTEGER NOT NULL DEFAULT 0,
|
|
|
|
forced_compilation_off INTEGER NOT NULL DEFAULT 0,
|
|
|
|
effective_compilation NOT NULL DEFAULT 0,
|
|
|
|
skipcount NOT NULL DEFAULT 0,
|
2010-12-28 16:36:01 +01:00
|
|
|
score NOT NULL DEFAULT 0,
|
2011-01-15 19:46:23 +01:00
|
|
|
beginning NOT NULL DEFAULT 0,
|
|
|
|
|
2011-05-14 15:43:57 +02:00
|
|
|
cue_path TEXT,
|
2011-12-10 15:52:23 +01:00
|
|
|
unavailable INTEGER DEFAULT 0,
|
|
|
|
|
2012-08-30 00:18:30 +02:00
|
|
|
effective_albumartist TEXT,
|
2013-03-03 13:00:24 +01:00
|
|
|
etag TEXT,
|
|
|
|
|
|
|
|
performer TEXT,
|
2015-04-17 15:11:16 +02:00
|
|
|
grouping TEXT,
|
2015-06-30 18:34:34 +02:00
|
|
|
lyrics TEXT,
|
|
|
|
|
|
|
|
originalyear INTEGER,
|
|
|
|
effective_originalyear INTEGER
|
2010-11-27 17:14:09 +01:00
|
|
|
);
|
|
|
|
|
|
|
|
CREATE VIRTUAL TABLE jamendo.songs_fts USING fts3(
|
2020-06-05 08:54:14 +02:00
|
|
|
ftstitle, ftsalbum, ftsartist, ftsalbumartist, ftscomposer, ftsperformer, ftsgrouping, ftsgenre, ftscomment, ftsyear,
|
2010-11-27 17:14:09 +01:00
|
|
|
tokenize=unicode
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE INDEX jamendo.idx_jamendo_comp_artist ON songs (effective_compilation, artist);
|
|
|
|
|
|
|
|
CREATE TABLE jamendo.track_ids (
|
|
|
|
songs_row_id INTEGER PRIMARY KEY,
|
|
|
|
track_id INTEGER
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE INDEX jamendo.idx_jamendo_track_id ON track_ids(track_id);
|
|
|
|
|