Class: Hanami::Commands::DB::Migrate

Inherits:
Command
  • Object
show all
Defined in:
lib/hanami/commands/db/migrate.rb

Instance Method Summary collapse

Methods inherited from Command

inherited

Constructor Details

#initialize(options, version) ⇒ Migrate

Returns a new instance of Migrate


9
10
11
12
# File 'lib/hanami/commands/db/migrate.rb', line 9

def initialize(options, version)
  super(options)
  @version = version
end

Instance Method Details

#startObject


14
15
16
17
# File 'lib/hanami/commands/db/migrate.rb', line 14

def start
  require 'hanami/model/migrator'
  Hanami::Model::Migrator.migrate(version: version)
end