datetime etc
This commit is contained in:
parent
0d7da2ea85
commit
59d660165f
7 changed files with 23 additions and 23 deletions
|
@ -11,10 +11,10 @@ CREATE TABLE blog.author
|
|||
|
||||
CREATE TABLE blog.post
|
||||
(
|
||||
id uuid PRIMARY KEY,
|
||||
content text NOT NULL,
|
||||
created_on timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
author_id uuid NOT NULL REFERENCES blog.author (id) on DELETE CASCADE
|
||||
id uuid PRIMARY KEY,
|
||||
content text NOT NULL,
|
||||
posted_on timestamptz NOT NULL DEFAULT now(),
|
||||
author_id uuid NOT NULL REFERENCES blog.author (id) on DELETE CASCADE
|
||||
);
|
||||
|
||||
CREATE TABLE blog.post_media
|
||||
|
@ -31,23 +31,23 @@ CREATE TABLE blog.outbox
|
|||
(
|
||||
|
||||
id uuid PRIMARY KEY,
|
||||
event_type text NOT NULL,
|
||||
aggregate_id uuid NOT NULL,
|
||||
payload jsonb NOT NULL,
|
||||
created_at timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
||||
event_type text NOT NULL,
|
||||
aggregate_id uuid NOT NULL,
|
||||
payload jsonb NOT NULL,
|
||||
created_at timestamp DEFAULT now() NOT NULL,
|
||||
processed_at timestamp,
|
||||
next_retry_at timestamp,
|
||||
retry_count int DEFAULT 0 NOT NULL,
|
||||
retry_count int DEFAULT 0 NOT NULL,
|
||||
last_error text,
|
||||
status outbox_status DEFAULT 'pending' NOT NULL
|
||||
status outbox_status DEFAULT 'pending' NOT NULL
|
||||
);
|
||||
|
||||
CREATE SCHEMA media;
|
||||
|
||||
CREATE TABLE media.saved_blob
|
||||
(
|
||||
id uuid PRIMARY KEY,
|
||||
created_on timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
||||
type varchar(64) NOT NULL,
|
||||
size int
|
||||
id uuid PRIMARY KEY,
|
||||
uploaded_on timestamp DEFAULT now() NOT NULL,
|
||||
type varchar(64) NOT NULL,
|
||||
size int
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue