Fix chicken-and-egg problem between migration and model