ALTER TABLE processos
    ADD CONSTRAINT processos_uso_campos CHECK ( ( ( fluxo_uso = 4
                                                    AND container_id IS NOT NULL )
                                                  OR ( fluxo_uso <> 4 ) ) );

ALTER TABLE processos ADD CONSTRAINT processos_pk PRIMARY KEY ( id );

ALTER TABLE processos ADD CONSTRAINT processos_id_fluxo_id UNIQUE ( id,
                                                                    fluxo_id );