class Minder::DatabaseMigrator

Attributes

database[R]

Public Class Methods

new(database: nil) click to toggle source
# File lib/minder/database/database_migrator.rb, line 5
def initialize(database: nil)
  @database = database
end

Public Instance Methods

run() click to toggle source
# File lib/minder/database/database_migrator.rb, line 9
def run
  ROM::SQL::Migration::Migrator.new(
    ROM.env.gateways[:default].connection,
    path: File.expand_path(File.dirname(__FILE__) + '/../../../db/migrate')
  ).run
end