change quoting for hash and adding ENGINE to DATABASES