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