Skip to content

Instantly share code, notes, and snippets.

@brendanmckenzie
Created April 10, 2017 03:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brendanmckenzie/7fc8d763f19ad69041b205f7eaea06c9 to your computer and use it in GitHub Desktop.
Save brendanmckenzie/7fc8d763f19ad69041b205f7eaea06c9 to your computer and use it in GitHub Desktop.
create table node (
id uuid primary key not null,
parent_id uuid references node ( id ),
type varchar(512) not null,
alias varchar(512) not null,
display_name text,
published_version_id integer,
id_taxonomy uuid[] not null,
alias_taxonomy varchar(512)[] not null,
created_at timestamp default now() not null,
modified_at timestamp default now() not null
);
create table node_content (
id uuid not null references node ( id ),
version integer not null,
content jsonb,
created_at timestamp default now() not null,
primary key ( id, version )
);
create table "user" (
id uuid primary key not null,
username varchar(512) not null,
password text not null,
name text,
email text,
created_at timestamp default now() not null,
modified_at timestamp default now() not null,
last_login_at timestamp default now() not null
);
create table media (
id uuid primary key not null,
file_name text,
content_type text,
created_at timestamp default now() not null,
modified_at timestamp default now() not null
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment