owntone-server/contrib/sqlite.sql

45 lines
1.3 KiB
MySQL
Raw Normal View History

2005-02-28 23:19:27 -05:00
DROP TABLE songs;
DROP TABLE config;
CREATE TABLE songs (
id INTEGER PRIMARY KEY NOT NULL,
path VARCHAR(4096) NOT NULL,
fname VARCHAR(255) NOT NULL,
title VARCHAR(1024) DEFAULT NULL,
artist VARCHAR(1024) DEFAULT NULL,
album VARCHAR(1024) DEFAULT NULL,
genre VARCHAR(255) DEFAULT NULL,
comment VARCHAR(4096) DEFAULT NULL,
type VARCHAR(255) DEFAULT NULL,
composer VARCHAR(1024) DEFAULT NULL,
orchestra VARCHAR(1024) DEFAULT NULL,
conductor VARCHAR(1024) DEFAULT NULL,
grouping VARCHAR(1024) DEFAULT NULL,
url VARCHAR(1024) DEFAULT NULL,
bitrate INTEGER DEFAULT NULL,
samplerate INTEGER DEFAULT NULL,
song_length INTEGER DEFAULT NULL,
file_size INTEGER DEFAULT NULL,
year INTEGER DEFAULT NULL,
track INTEGER DEFAULT NULL,
total_tracks INTEGER DEFAULT NULL,
disc INTEGER DEFAULT NULL,
total_discs INTEGER DEFAULT NULL,
time_added INTEGER DEFAULT NULL,
time_modified INTEGER DEFAULT NULL,
time_played INTEGER DEFAULT NULL,
db_timestamp INTEGER DEFAULT NULL,
bpm INTEGER DEFAULT NULL,
compilation INTEGER DEFAULT NULL
);
CREATE TABLE config (
term VARCHAR(255) NOT NULL,
value VARCHAR(1024) NOT NULL
);
CREATE INDEX idx_id ON songs(id);
CREATE INDEX idx_path on songs(path);
INSERT INTO config (term, value) VALUES ('version','8');