Make migration dependant on `cms`.

Backports to 1.x of #84