diff options
Diffstat (limited to 'migrations/20170619201706_like.sql')
| -rw-r--r-- | migrations/20170619201706_like.sql | 25 |
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; |
