Class: PactBroker::DB::Migrate

Inherits:
Object
  • Object
show all
Defined in:
lib/pact_broker/db/migrate.rb

Class Method Summary collapse

Class Method Details

.call(database_connection, options = {}) ⇒ Object



9
10
11
12
13
# File 'lib/pact_broker/db/migrate.rb', line 9

def self.call database_connection, options = {}
  db_migrations_dir = PactBroker.project_root.join("db","migrations")
  PactBroker.logger.info "Running migrations in directory #{db_migrations_dir}, target=#{options.fetch(:target, 'end')}"
  Sequel::TimestampMigrator.new(database_connection, db_migrations_dir, options).run
end