2022-07-13 14:54:19 +02:00
|
|
|
CREATE TYPE "NewsStatus" AS ENUM (
|
|
|
|
'Pending',
|
|
|
|
'Published',
|
|
|
|
'Hidden'
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE news
|
|
|
|
(
|
|
|
|
id serial unique not null primary key,
|
|
|
|
title text not null unique,
|
|
|
|
body text not null,
|
|
|
|
status "NewsStatus" not null default 'Pending',
|
|
|
|
published_at timestamp not null default now(),
|
|
|
|
created_at timestamp not null default now()
|
|
|
|
);
|