You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: migration_service.rb
    path of file: ./repos/Portus/app/services/teams
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Teams
  class MigrationService < ::BaseService
    attr_accessor :error
    
    def migrate_namespaces!(team, new_team)
      updated = team.namespaces.update_all(team_id: new_team.id)
      create_activity!(team, new_team) if updated

      return true if updated

      full_messages = !team.errors.empty? && team.errors.full_messages
      @error = full_messages || "Could not migrate namespaces"
      false
    end