diff --git a/lib/sequel_data/migrate/migrator.rb b/lib/sequel_data/migrate/migrator.rb index ea2a737..7e253a7 100644 --- a/lib/sequel_data/migrate/migrator.rb +++ b/lib/sequel_data/migrate/migrator.rb @@ -15,7 +15,7 @@ def initialize(config) end def migrate - connect_database do |db| + connect_to_db do |db| dataset = ensure_table_exists(db) already_migrated = dataset.select_map(column).to_set @@ -32,7 +32,7 @@ def migrate end def rollback(step = 1) - connect_database do |db| + connect_to_db do |db| dataset = ensure_table_exists(db) already_migrated = dataset.select_map(column).to_set @@ -65,7 +65,7 @@ def table :data_migrations end - def connect_database(&block) + def connect_to_db(&block) raise ConfigurationError, "db_configuration is not set" if config.db_configuration.host.nil? Sequel.connect(config.db_configuration.host, &block)