Class: Geostats::Commands::Migrate
- Inherits:
-
Base
- Object
- Base
- Geostats::Commands::Migrate
show all
- Defined in:
- lib/geostats/commands/migrate.rb
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #invoke
Instance Method Details
#before ⇒ Object
12
13
14
|
# File 'lib/geostats/commands/migrate.rb', line 12
def before
connect_database
end
|
#parse_args ⇒ Object
8
9
10
|
# File 'lib/geostats/commands/migrate.rb', line 8
def parse_args
raise UsageError unless @args.length.zero?
end
|
#run ⇒ Object
16
17
18
|
# File 'lib/geostats/commands/migrate.rb', line 16
def run
ActiveRecord::Migrator.migrate(File.join(Geostats::ROOT, "migrations"))
end
|
#usage ⇒ Object
4
5
6
|
# File 'lib/geostats/commands/migrate.rb', line 4
def usage
STDERR.puts "Usage: geostats migrate"
end
|