nekrochan/migrations/20231217111814_create_news.sql
2023-12-18 21:22:29 +01:00

8 řádky
241 B
SQL

CREATE TABLE news (
id SERIAL NOT NULL PRIMARY KEY,
title VARCHAR(256) NOT NULL,
content TEXT NOT NULL,
author VARCHAR(32) NOT NULL REFERENCES accounts(username),
created TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP
);