aboutsummaryrefslogtreecommitdiffstats
path: root/migrations
diff options
context:
space:
mode:
authorThibaut Horel <thibaut.horel@gmail.com>2017-06-19 22:21:33 -0400
committerThibaut Horel <thibaut.horel@gmail.com>2017-06-19 22:21:33 -0400
commita2a69c3fd9f0149650f8c53d985049a38f36f238 (patch)
treef6a696fdece1aa12537c2c343e4162f52a3f2840 /migrations
parent458294c8de2af24313d5d3e430482fb187128434 (diff)
downloadlastfm-api-a2a69c3fd9f0149650f8c53d985049a38f36f238.tar.gz
Lastfm loved tracks import
Diffstat (limited to 'migrations')
-rw-r--r--migrations/20170619201706_like.sql25
1 files changed, 25 insertions, 0 deletions
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;