diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/db.sql | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -2,8 +2,10 @@ CREATE DATABASE clog; \connect clog +CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; + CREATE TABLE posts ( - id BIGINT NOT NULL, -- PRIMARY KEY UUID + id UUID PRIMARY KEY DEFAULT uuid_generate_v4(), title CHARACTER VARYING NOT NULL, body CHARACTER VARYING NOT NULL, created_at TIMESTAMP NOT NULL DEFAULT NOW(), |