lib/rom/sql/migration/migrator.rb in rom-sql-3.1.0 vs lib/rom/sql/migration/migrator.rb in rom-sql-3.2.0

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + require 'pathname' require 'rom/types' require 'rom/initializer' @@ -63,15 +65,15 @@ def migration_file_content File.read(Pathname(__FILE__).dirname.join('template.rb').realpath) end # @api private - def auto_migrate!(gateway, schemas, options = EMPTY_HASH, &block) + def auto_migrate!(gateway, schemas, options = EMPTY_HASH) diff_finder = SchemaDiff.new(gateway.database_type) changes = schemas.map { |target| empty = SQL::Schema.define(target.name) - current = target.with(inferrer.(empty, gateway)) + current = target.with(**inferrer.(empty, gateway)) diff_finder.(current, target) }.reject(&:empty?) runner = migration_runner(options)