Fix migrations dependencies.