aboutsummaryrefslogtreecommitdiffstats
path: root/migrations/20170625150613_token.sql
diff options
context:
space:
mode:
authorGuillaume Horel <guillaume.horel@gmail.com>2017-06-25 18:42:33 -0400
committerGuillaume Horel <guillaume.horel@gmail.com>2017-06-25 18:42:33 -0400
commit682bba726dca2e33317876c459f6334ddf5f060a (patch)
treef60d5e5ba56f8d835d0ada9f4ad04b3610d850bb /migrations/20170625150613_token.sql
parent696c3dce5b184ae8c6effec4e7024cf56bf1b1ae (diff)
downloadlastfm-api-682bba726dca2e33317876c459f6334ddf5f060a.tar.gz
add tokens table
Diffstat (limited to 'migrations/20170625150613_token.sql')
-rw-r--r--migrations/20170625150613_token.sql14
1 files changed, 14 insertions, 0 deletions
diff --git a/migrations/20170625150613_token.sql b/migrations/20170625150613_token.sql
new file mode 100644
index 0000000..fa56fa2
--- /dev/null
+++ b/migrations/20170625150613_token.sql
@@ -0,0 +1,14 @@
+
+-- +goose Up
+-- SQL in section 'Up' is executed when this migration is applied
+
+CREATE TABLE tokens(
+ token text PRIMARY KEY,
+ created timestamp WITH time zone DEFAULT now(),
+ user_id integer REFERENCES users(user_id)
+);
+
+
+-- +goose Down
+-- SQL section 'Down' is executed when this migration is rolled back
+DROP TABLE tokens;