diff options
author | Michael McVady <femtonaut@gmail.com> | 2022-03-07 22:09:01 -0500 |
---|---|---|
committer | Michael McVady <femtonaut@gmail.com> | 2022-03-07 22:13:09 -0500 |
commit | 27384b1735cc558614ccfc3b9cac89bcd5869b4d (patch) | |
tree | 2301703e338240166401833837e39f5316edb496 /db/db.sql | |
parent | 3123f09ce08d3824671ca218bef66c28748bda07 (diff) |
Use UUIDs ...
Diffstat (limited to 'db/db.sql')
-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(), |