CREATE DOMAIN BOOLEAN_CHAR AS BOOLEAN DEFAULT FALSE;

ALTER TABLE IDENTIFIED_PROTEINS ADD COLUMN IS_PRIMARY BOOLEAN_CHAR NOT NULL;

UPDATE IDENTIFIED_PROTEINS SET IS_PRIMARY = 'T' WHERE ID = ANY(SELECT MIN(ID) FROM IDENTIFIED_PROTEINS GROUP BY PROT_ID);
