add migration task to fix scopes