diff options
| author | Thibaut Horel <thibaut.horel@gmail.com> | 2017-06-07 01:15:43 -0400 |
|---|---|---|
| committer | Thibaut Horel <thibaut.horel@gmail.com> | 2017-06-07 01:15:43 -0400 |
| commit | 3543fcb861a122fe3405bf42f83f6dbc56888b8c (patch) | |
| tree | 30ba1b2057e54754433b7ced0d90dc6993abf3f2 /schema.sql | |
| parent | b235490206f5aea8b1c618e7ffdae20ef052e78d (diff) | |
| download | lastfm-api-3543fcb861a122fe3405bf42f83f6dbc56888b8c.tar.gz | |
Get additional song metadata from last.fm
Diffstat (limited to 'schema.sql')
| -rw-r--r-- | schema.sql | 25 |
1 files changed, 16 insertions, 9 deletions
@@ -17,17 +17,29 @@ CREATE TABLE IF NOT EXISTS scrobbling_sessions ( protocol text, created timestamptz DEFAULT current_timestamp ); + +CREATE TABLE IF NOT EXISTS songs ( + song_id SERIAL PRIMARY KEY, + artist text, + album text, + name text, + track_number text, + duration text, + mbid text, + image text +); + CREATE TABLE IF NOT EXISTS scrobbles ( artist text, - albumartist text, - trackname text, + album_artist text, + track_name text, album text, - tracknumber int, + track_number int, duration int, time timestamptz, chosen bool, mbid text, - mbid_computed text, + song_id int REFERENCES songs, session_key text REFERENCES scrobbling_sessions, user_id int REFERENCES users ); @@ -37,8 +49,3 @@ CREATE TABLE IF NOT EXISTS user_sessions ( user_id integer REFERENCES users, created timestamptz DEFAULT current_timestamp ); - -CREATE TABLE IF NOT EXISTS songs ( - mbid text PRIMARY KEY, - image text -); |
