solved problem with enums in postgresql