Skip to content

Commit

Permalink
rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
martonarbocz committed Jan 8, 2024
1 parent 83ad649 commit 0061ca6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/sequel_data/migrate/migrator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 0061ca6

Please sign in to comment.