Class: Helm::Commands::Database::Migrate
- Defined in:
- lib/helm/application.rb
Instance Attribute Summary collapse
-
#db_string ⇒ Object
Returns the value of attribute db_string.
-
#directory ⇒ Object
Returns the value of attribute directory.
Attributes inherited from Command
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(app_config, options) ⇒ Migrate
constructor
A new instance of Migrate.
Methods inherited from Command
Constructor Details
#initialize(app_config, options) ⇒ Migrate
Returns a new instance of Migrate.
45 46 47 48 |
# File 'lib/helm/application.rb', line 45 def initialize(app_config, ) @directory = "migrations" super end |
Instance Attribute Details
#db_string ⇒ Object
Returns the value of attribute db_string.
49 50 51 |
# File 'lib/helm/application.rb', line 49 def db_string @db_string end |
#directory ⇒ Object
Returns the value of attribute directory.
49 50 51 |
# File 'lib/helm/application.rb', line 49 def directory @directory end |
Instance Method Details
#execute ⇒ Object
51 52 53 54 55 56 57 |
# File 'lib/helm/application.rb', line 51 def execute require 'sequel/extensions/migration' Helm.log_at(Logger::DEBUG) do Sequel::Migrator.run(Helm.databases[app_config.connstring], directory) end end |