aboutsummaryrefslogtreecommitdiffstats
path: root/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'migrations')
-rw-r--r--migrations/2017-11-03-164322_create_factoids/down.sql1
-rw-r--r--migrations/2017-11-03-164322_create_factoids/up.sql8
-rw-r--r--migrations/2018-02-25-154922_create_tells/down.sql1
-rw-r--r--migrations/2018-02-25-154922_create_tells/up.sql7
4 files changed, 17 insertions, 0 deletions
diff --git a/migrations/2017-11-03-164322_create_factoids/down.sql b/migrations/2017-11-03-164322_create_factoids/down.sql
new file mode 100644
index 0000000..58c2110
--- /dev/null
+++ b/migrations/2017-11-03-164322_create_factoids/down.sql
@@ -0,0 +1 @@
+DROP TABLE factoids
diff --git a/migrations/2017-11-03-164322_create_factoids/up.sql b/migrations/2017-11-03-164322_create_factoids/up.sql
new file mode 100644
index 0000000..784a3f4
--- /dev/null
+++ b/migrations/2017-11-03-164322_create_factoids/up.sql
@@ -0,0 +1,8 @@
+CREATE TABLE factoids (
+ name VARCHAR(32) NOT NULL,
+ idx INTEGER NOT NULL,
+ content TEXT NOT NULL,
+ author VARCHAR(32) NOT NULL,
+ created TIMESTAMP NOT NULL,
+ PRIMARY KEY (name, idx)
+)
diff --git a/migrations/2018-02-25-154922_create_tells/down.sql b/migrations/2018-02-25-154922_create_tells/down.sql
new file mode 100644
index 0000000..73c9b9b
--- /dev/null
+++ b/migrations/2018-02-25-154922_create_tells/down.sql
@@ -0,0 +1 @@
+DROP TABLE tells
diff --git a/migrations/2018-02-25-154922_create_tells/up.sql b/migrations/2018-02-25-154922_create_tells/up.sql
new file mode 100644
index 0000000..9de037c
--- /dev/null
+++ b/migrations/2018-02-25-154922_create_tells/up.sql
@@ -0,0 +1,7 @@
+CREATE TABLE tells (
+ id SERIAL PRIMARY KEY,
+ sender VARCHAR(32) NOT NULL,
+ receiver VARCHAR(32) NOT NULL,
+ time TIMESTAMP NOT NULL,
+ message VARCHAR(512) NOT NULL
+)