SET TERM ^ ;

CREATE OR ALTER trigger ttbmodelo_kit_a01u for tbmodelo_kit
active after update position 0
AS
begin
    IF(NEW.COR_ID <> OLD.COR_ID) THEN
    BEGIN
        DELETE FROM TBMODELO_COR WHERE MODELO_ID = NEW.MODELO_ID AND COR_ID = OLD.COR_ID;
    END
end
^

SET TERM ; ^

