(GRAILS-9936) Fixed unique constraint