From c6e2ede29b730b4f8a3920eabac20fc6f783e767 Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 1 May 2020 16:02:15 -0500 Subject: [PATCH] houdini_upgrade:run will install and run the houdini_upgrade db migrations --- .../lib/tasks/houdini_upgrade_tasks.rake | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/gems/houdini_upgrade/lib/tasks/houdini_upgrade_tasks.rake b/gems/houdini_upgrade/lib/tasks/houdini_upgrade_tasks.rake index 4b74c0a4..c8bdbaed 100644 --- a/gems/houdini_upgrade/lib/tasks/houdini_upgrade_tasks.rake +++ b/gems/houdini_upgrade/lib/tasks/houdini_upgrade_tasks.rake @@ -1,7 +1,15 @@ # frozen_string_literal: true # License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later -# desc "Explaining what the task does" -# task :houdini_upgrade do -# # Task goes here -# end + namespace :houdini_upgrade do + Rake::Task["install:migrations"].clear_comments + desc "Run houdini upgrade to v2" + task :run => :environment do + Rake::Task["houdini_upgrade:install:migrations"].invoke + Rake::Task["houdini_upgrade:run_db_migration"].invoke + end + + task :run_db_migration do + sh 'rails db:migrate' + end +end