pages: some fixups
This commit is contained in:
parent
68aa9c0e13
commit
295811411e
7 changed files with 64 additions and 39 deletions
|
|
@ -3,6 +3,10 @@ CREATE TYPE post_state AS ENUM (
|
|||
'published'
|
||||
);
|
||||
|
||||
CREATE TYPE post_format AS ENUM (
|
||||
'markdown'
|
||||
);
|
||||
|
||||
CREATE TYPE target_role AS ENUM (
|
||||
'production'
|
||||
);
|
||||
|
|
@ -49,16 +53,17 @@ CREATE TABLE post_types (
|
|||
);
|
||||
|
||||
CREATE TABLE posts (
|
||||
id BIGSERIAL NOT NULL PRIMARY KEY,
|
||||
site_id BIGINT NOT NULL,
|
||||
id BIGSERIAL NOT NULL PRIMARY KEY,
|
||||
site_id BIGINT NOT NULL,
|
||||
title TEXT,
|
||||
post_type_id BIGINT,
|
||||
body TEXT NOT NULL,
|
||||
state post_state NOT NULL,
|
||||
props JSON NOT NULL,
|
||||
format post_format NOT NULL DEFAULT 'markdown',
|
||||
body TEXT NOT NULL,
|
||||
state post_state NOT NULL,
|
||||
props JSON NOT NULL,
|
||||
publish_date TIMESTAMP WITH TIME ZONE,
|
||||
created_at TIMESTAMP NOT NULL,
|
||||
updated_at TIMESTAMP NOT NULL,
|
||||
created_at TIMESTAMP NOT NULL,
|
||||
updated_at TIMESTAMP NOT NULL,
|
||||
|
||||
FOREIGN KEY (post_type_id) REFERENCES post_types (id) ON DELETE CASCADE,
|
||||
FOREIGN KEY (site_id) REFERENCES sites (id) ON DELETE CASCADE
|
||||
|
|
@ -80,6 +85,7 @@ CREATE TABLE pages (
|
|||
bundle_id BIGINT NOT NULL,
|
||||
name TEXT NOT NULL,
|
||||
name_provenance page_name_provenance NOT NULL,
|
||||
format post_format NOT NULL DEFAULT 'markdown',
|
||||
title TEXT,
|
||||
post_type_id BIGINT,
|
||||
body TEXT NOT NULL,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue