Allow use of native migrations in 1.7 — Take 2

For #1559 take 2. Replaces #1653.

(The branch name was obviously causing GitHub some confusion...)

Merges against 2.4.0 branch (since it's a small breaking change).
OK — I'll rework all of this later on.