def execute_save
      if @database.nil? then
        raise MigrationError.new("Migrator cannot save records since the database option was not specified.")
      end
      @database.open do |db|
        migrate do |tgt, rec|
          # Save the target object.
          save(tgt, db)
          # Ensure that each migrated object is created if necessary.
          @migrated.each { |obj| create(obj, db) unless db.exists?(obj) }
          yield(tgt, rec) if block_given?
          db.clear
        end
      end
    end
def execute_save
      if @database.nil? then
        raise MigrationError.new("Migrator cannot save records since the database option was not specified.")
      end
      @database.open do |db|
        migrate do |tgt, rec|
          # Save the target object.
          save(tgt, db)
          # Ensure that each migrated object is created if necessary.
          @migrated.each { |obj| create(obj, db) unless db.exists?(obj) }
          yield(tgt, rec) if block_given?
          db.clear
        end
      end
    end
{#migrate} with a {#save} block on the migration target. Each migrated object
 is created, if necessary, after the target save.