lib/hanami/rake_tasks.rb in hanami-2.1.0 vs lib/hanami/rake_tasks.rb in hanami-2.2.0.beta1
- old
+ new
@@ -30,17 +30,18 @@
#
# This is the preferred way to run Hanami command line tasks.
# Please use them when you're in control of your deployment environment.
#
# If you're not in control and your deployment requires these "standard"
- # Rake tasks, they are here to solve this only specific problem.
- #
- # namespace :db do
- # task :migrate do
- # # TODO(@jodosha): Enable when we'll integrate with ROM
- # # run_hanami_command("db migrate")
- # end
- # end
+ # Rake tasks, they are here only to solve this specific problem.
+
+ if Hanami.bundled?("hanami-db")
+ namespace :db do
+ task :migrate do
+ Hanami::CLI::Commands::App::DB::Migrate.new.call
+ end
+ end
+ end
if Hanami.bundled?("hanami-assets")
namespace :assets do
task :precompile do
Hanami::CLI::Commands::App::Assets::Compile.new.call