From a2a69c3fd9f0149650f8c53d985049a38f36f238 Mon Sep 17 00:00:00 2001 From: Thibaut Horel Date: Mon, 19 Jun 2017 22:21:33 -0400 Subject: Lastfm loved tracks import --- migrations/20170619201706_like.sql | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 migrations/20170619201706_like.sql (limited to 'migrations/20170619201706_like.sql') diff --git a/migrations/20170619201706_like.sql b/migrations/20170619201706_like.sql new file mode 100644 index 0000000..88a1f59 --- /dev/null +++ b/migrations/20170619201706_like.sql @@ -0,0 +1,25 @@ + +-- +goose Up +-- SQL in section 'Up' is executed when this migration is applied + +CREATE TABLE love ( + id serial PRIMARY KEY, + time timestamptz, + artist text, + name text, + mbid text, + session text REFERENCES scrobbling_sessions(session_key), + "user" int REFERENCES users(user_id) +); + +CREATE TABLE love_import ( + lfm_name text, + time timestamptz DEFAULT NOW(), + "count" int +); + +-- +goose Down +-- SQL section 'Down' is executed when this migration is rolled back + +DROP TABLE love_import; +DROP TABLE love; -- cgit v1.2.3-70-g09d2