Fixed event foreign key setup

This commit is contained in:
neviyn 2021-04-18 21:37:48 +01:00
parent 83e4e07f50
commit a646186324

View File

@ -62,17 +62,26 @@ create table if not exists projectplanner.team
create table if not exists projectplanner.event create table if not exists projectplanner.event
( (
id bigserial not null id
constraint event_pk bigserial
primary key not
constraint event_project_fk null
references projectplanner.project, constraint
title varchar(255) not null, event_pk
primary
key,
title
varchar
(
255
) not null,
description text, description text,
project_id bigserial not null, project_id bigserial not null
constraint event_project_fk
references projectplanner.project,
start_time timestamp not null, start_time timestamp not null,
end_time timestamp not null end_time timestamp not null
); );
create unique index if not exists event_id_uindex create unique index if not exists event_id_uindex
on projectplanner.event (id); on projectplanner.event (id);