blog/backend/migrations/2023-02-06-134456_init/up.sql
2023-02-08 22:13:11 +01:00

15 lines
No EOL
322 B
SQL

CREATE TABLE tags(
id SERIAL PRIMARY KEY,
name TEXT UNIQUE NOT NULL
);
CREATE TABLE posts(
id SERIAL PRIMARY KEY,
name TEXT NOT NULL,
slug TEXT UNIQUE NOT NULL,
description TEXT NOT NULL,
content TEXT NOT NULL,
published_at DATE NOT NULL,
edited_at DATE,
active BOOLEAN NOT NULL
);