2023-04-01 22:31:57 +02:00
|
|
|
create type "InvitationStateMapping" AS ENUM (
|
2020-04-21 08:35:08 +02:00
|
|
|
'sent',
|
|
|
|
'accepted',
|
|
|
|
'revoked'
|
|
|
|
);
|
|
|
|
|
|
|
|
create table invitations (
|
|
|
|
id serial primary key not null,
|
|
|
|
name text not null,
|
|
|
|
email text not null,
|
2023-04-01 22:31:57 +02:00
|
|
|
state "InvitationStateMapping" not null default 'sent',
|
2020-04-21 08:35:08 +02:00
|
|
|
project_id integer not null references projects (id),
|
|
|
|
invited_by_id integer not null references users (id),
|
|
|
|
created_at timestamp not null default now(),
|
|
|
|
updated_at timestamp not null default now()
|
|
|
|
);
|