add if exists check to migration script