Fix database model