update database if model changes