Skip to content

Instantly share code, notes, and snippets.

@mmulich
Last active August 29, 2015 14:09
Show Gist options
  • Select an option

  • Save mmulich/d0603f911dd9fe1b7f85 to your computer and use it in GitHub Desktop.

Select an option

Save mmulich/d0603f911dd9fe1b7f85 to your computer and use it in GitHub Desktop.
authoring roles and acceptances database tables
create table roles(
id integer unique sequence,
document_id uuid,
role_type role_types, -- e.g. author, illustrator
user_id text, -- username as it appears in accounts
profile json, -- a copy of the user's profile json
has_accepted boolean,
requester text,
assignment_data timestamp with timezone default current_timestamp,
primary key (document_id, role_type, user_id),
foreign key (document_id) references document (id)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment