Make the existing code work with the new database.