From ff81576e21f5b89cbf47856c520df3e5e0c9adbe Mon Sep 17 00:00:00 2001
From: Thibaut Horel <thibaut.horel@gmail.com>
Date: Sun, 18 Jun 2017 18:18:36 -0400
Subject: Import listens from lastfm

---
 migrations/20170617130303_import.sql | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 migrations/20170617130303_import.sql

(limited to 'migrations/20170617130303_import.sql')

diff --git a/migrations/20170617130303_import.sql b/migrations/20170617130303_import.sql
new file mode 100644
index 0000000..d897366
--- /dev/null
+++ b/migrations/20170617130303_import.sql
@@ -0,0 +1,19 @@
+
+-- +goose Up
+-- SQL in section 'Up' is executed when this migration is applied
+
+CREATE TABLE IF NOT EXISTS scrobble_import (
+	lfm_name text,
+	"from" timestamptz,
+	"to" timestamptz,
+	last_fetch timestamptz,
+	done bool,
+	PRIMARY KEY (lfm_name, "from", "to")
+);
+
+CREATE INDEX scrobbles_time ON scrobbles(time DESC);
+
+-- +goose Down
+-- SQL section 'Down' is executed when this migration is rolled back
+DROP TABLE scrobble_import;
+DROP INDEX scrobbles_time;
-- 
cgit v1.2.3-70-g09d2

