Fix database attributes name and type