From 0061ca6309ff3b065d76a02350305129948f909c Mon Sep 17 00:00:00 2001 From: marton Date: Mon, 8 Jan 2024 11:13:14 +0100 Subject: [PATCH] rename function --- lib/sequel_data/migrate/migrator.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)