aboutsummaryrefslogtreecommitdiffstats
path: root/migrations
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2018-01-18 21:30:24 +0100
committerHarald Eilertsen <haraldei@anduin.net>2018-01-18 22:01:46 +0100
commitd2eea77842189c6964b51bc75ca5a62172b77dcd (patch)
tree33af33ee496a3c99ea84024065d9edef1ae8e201 /migrations
parentd83df803c9008dba1a34b5c23ac431efc1e0a456 (diff)
downloadrocket-blog-d2eea77842189c6964b51bc75ca5a62172b77dcd.tar.gz
rocket-blog-d2eea77842189c6964b51bc75ca5a62172b77dcd.tar.bz2
rocket-blog-d2eea77842189c6964b51bc75ca5a62172b77dcd.zip
Add users table to schema.
Diffstat (limited to 'migrations')
-rw-r--r--migrations/2018-01-18-202058_create_users/down.sql2
-rw-r--r--migrations/2018-01-18-202058_create_users/up.sql8
2 files changed, 10 insertions, 0 deletions
diff --git a/migrations/2018-01-18-202058_create_users/down.sql b/migrations/2018-01-18-202058_create_users/down.sql
new file mode 100644
index 0000000..dc3714b
--- /dev/null
+++ b/migrations/2018-01-18-202058_create_users/down.sql
@@ -0,0 +1,2 @@
+-- This file should undo anything in `up.sql`
+DROP TABLE users;
diff --git a/migrations/2018-01-18-202058_create_users/up.sql b/migrations/2018-01-18-202058_create_users/up.sql
new file mode 100644
index 0000000..fee1340
--- /dev/null
+++ b/migrations/2018-01-18-202058_create_users/up.sql
@@ -0,0 +1,8 @@
+-- Create users table
+CREATE TABLE users (
+ id SERIAL PRIMARY KEY,
+ username VARCHAR NOT NULL,
+ realname VARCHAR,
+ email VARCHAR,
+ password VARCHAR NOT NULL
+)