16 lines
612 B
SQL
16 lines
612 B
SQL
CREATE TABLE public.node_history (
|
|
id serial4 NOT NULL,
|
|
user_id int4 NOT NULL,
|
|
uuid bpchar(36) NOT NULL,
|
|
parents varchar[] NULL,
|
|
created timestamptz NOT NULL,
|
|
updated timestamptz NOT NULL,
|
|
name varchar(256) NOT NULL,
|
|
"content" text NOT NULL,
|
|
content_encrypted text NOT NULL,
|
|
markdown bool DEFAULT false NOT NULL,
|
|
client bpchar(36) DEFAULT ''::bpchar NOT NULL,
|
|
CONSTRAINT node_history_pk PRIMARY KEY (id),
|
|
CONSTRAINT node_history_user_fk FOREIGN KEY (user_id) REFERENCES public."user"(id) ON DELETE RESTRICT ON UPDATE RESTRICT
|
|
);
|
|
CREATE INDEX node_history_uuid_idx ON public.node USING btree (uuid);
|