updated db migration script to handle existing models