Class: Shred::Commands::Db
Instance Attribute Summary
Attributes inherited from Base
#command_config, #command_name, #console
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Shred::Commands::Base
Instance Method Details
#init ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/shred/commands/db.rb', line 10 def init run_shell_command(ShellCommand.new( command_lines: 'bin/rake db:create db:structure:load', success_msg: 'Database initialized', error_msg: 'Database could not be initialized' )) end |
#migrate ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/shred/commands/db.rb', line 19 def migrate run_shell_command(ShellCommand.new( command_lines: 'bin/rake db:migrate', success_msg: 'Migrations applied', error_msg: 'Migrations could not be applied' )) end |