aboutsummaryrefslogtreecommitdiff
path: root/db/db.sql
diff options
context:
space:
mode:
Diffstat (limited to 'db/db.sql')
-rw-r--r--db/db.sql26
1 files changed, 16 insertions, 10 deletions
diff --git a/db/db.sql b/db/db.sql
index 4df3345..69c9fcc 100644
--- a/db/db.sql
+++ b/db/db.sql
@@ -2,15 +2,15 @@ CREATE DATABASE clog;
\connect clog
-CREATE TABLE entries (
+CREATE TABLE posts (
id BIGINT NOT NULL, -- PRIMARY KEY UUID
title CHARACTER VARYING NOT NULL,
- body CHARACTER VARYING NOT NULL
- -- created_at TIMESTAMP NOT NULL,
- -- updated_at TIMESTAMP NOT NULL
+ body CHARACTER VARYING NOT NULL,
+ created_at TIMESTAMP NOT NULL DEFAULT NOW(),
+ updated_at TIMESTAMP NOT NULL DEFAULT NOW()
);
-INSERT INTO entries (
+INSERT INTO posts (
id,
title,
body
@@ -18,17 +18,23 @@ INSERT INTO entries (
VALUES
(
1,
- 'foo',
- 'bar'
+ 'First Post',
+ '# Heading
+
+Content
+
+## Sub heading
+
+More content ...'
),
(
2,
- 'baz',
- 'zoo'
+ 'Second Post',
+ 'Testing [a link](https://bunkergate.org)'
),
(
3,
'xxx',
- '**bold**'
+ '**testing bold**'
);