Class: Hanami::CLI::Commands::App::DB::Migrate Private
- Inherits:
-
Command
- Object
- Dry::CLI::Command
- Hanami::CLI::Command
- Command
- Hanami::CLI::Commands::App::DB::Migrate
- Defined in:
- lib/hanami/cli/commands/app/db/migrate.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Constant Summary
Constants inherited from Command
Instance Method Summary collapse
- #call(target: nil) ⇒ Object private
Methods inherited from Command
#app, #database, #database_config, inherited, #measure, #run_command
Methods inherited from Hanami::CLI::Command
Constructor Details
This class inherits a constructor from Hanami::CLI::Command
Instance Method Details
#call(target: nil) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/hanami/cli/commands/app/db/migrate.rb', line 18 def call(target: nil, **) return true if Dir[File.join(app.root, "db/migrate/*.rb")].empty? measure "database #{database.name} migrated" do if target run_migrations(target: Integer(target)) else run_migrations end true end end |