create table exception_type_check ( id serial not null, user_id int not null, type_id integer[] ); create unique index exception_type_check_id_uindex on exception_type_check (id); alter table exception_type_check add constraint exception_type_check_pk primary key (id);