update addDefinition to save unique constrain