-- [STATUS] create type link_status as enum ('OPEN', 'CLOSED', 'ACTIVE'); create table status ( id varchar(32) primary key references _link(id) , l_status link_status , setting numeric , check (l_status is not null or setting is not null) );