Feature/661

Add --before/after-upgrade for #661