Groovy script for some database fixings