summaryrefslogtreecommitdiff
path: root/migrations
diff options
context:
space:
mode:
authorAndrew Guschin <saintruler@gmail.com>2021-04-18 16:25:48 +0400
committerAndrew Guschin <saintruler@gmail.com>2021-04-18 16:25:48 +0400
commit0ad35b9b50dfaa1083f3f5acc633ec769bc10e37 (patch)
tree4acfde7b0b09fb258002055a8d0e2d5e1a9c5c3e /migrations
Initial commit
Diffstat (limited to 'migrations')
-rw-r--r--migrations/.gitkeep0
-rw-r--r--migrations/2021-04-18-102936_create_posts/down.sql2
-rw-r--r--migrations/2021-04-18-102936_create_posts/up.sql7
3 files changed, 9 insertions, 0 deletions
diff --git a/migrations/.gitkeep b/migrations/.gitkeep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/migrations/.gitkeep
diff --git a/migrations/2021-04-18-102936_create_posts/down.sql b/migrations/2021-04-18-102936_create_posts/down.sql
new file mode 100644
index 0000000..a8c711c
--- /dev/null
+++ b/migrations/2021-04-18-102936_create_posts/down.sql
@@ -0,0 +1,2 @@
+-- This file should undo anything in `up.sql`
+DROP TABLE posts
diff --git a/migrations/2021-04-18-102936_create_posts/up.sql b/migrations/2021-04-18-102936_create_posts/up.sql
new file mode 100644
index 0000000..ac26995
--- /dev/null
+++ b/migrations/2021-04-18-102936_create_posts/up.sql
@@ -0,0 +1,7 @@
+-- Your SQL goes here
+CREATE TABLE posts (
+ id INTEGER PRIMARY KEY NOT NULL,
+ title VARCHAR NOT NULL,
+ body TEXT NOT NULL,
+ published BOOLEAN NOT NULL DEFAULT 'f'
+)