Workaround. The original definition of the table was:
CREATE TABLE rights_history(
...,
action schemaname.enum_rights_actions,
...
);
I changed the definition of the table by removing the prepended schema name:
CREATE TABLE rights_history(
...,
action enum_rights_actions,
...
);
That helped. DDL SQL was generated using pgmodeler.