Fix source query in relation migration.