diff --git a/lib/tasks/migrations/migrations.rake b/lib/tasks/migrations/migrations.rake index 8d9dd6c7c954cb40320da3414623e115636782fc..8ab761e250d2bbb82aed17c736ee449645326212 100644 --- a/lib/tasks/migrations/migrations.rake +++ b/lib/tasks/migrations/migrations.rake @@ -39,12 +39,13 @@ namespace :migrations do case response when Net::HTTPCreated puts green "Succesfully migrated Role:" - puts cyan " ID: #{r.id}" - puts cyan " Name: #{params[:role][:name]}" + puts cyan "ID: #{r.id}" + puts cyan "Name: #{params[:role][:name]}" else puts red "Unable to migrate Role:" - puts yellow " ID: #{r.id}" - puts yellow " Name: #{params[:role][:name]}" + puts yellow "ID: #{r.id}" + puts yellow "Name: #{params[:role][:name]}" + puts red "Errors: #{JSON.parse(response.body.to_s)['errors']}" has_encountred_issue = 1 # At least one of the migrations failed. end end @@ -76,8 +77,9 @@ namespace :migrations do puts cyan " Name: #{params[:user][:name]}" else puts red "Unable to migrate User:" - puts yellow " UID: #{u.uid}" - puts yellow " Name: #{params[:user][:name]}" + puts yellow "UID: #{u.uid}" + puts yellow "Name: #{params[:user][:name]}" + puts red "Errors: #{JSON.parse(response.body.to_s)['errors']}" has_encountred_issue = 1 # At least one of the migrations failed. end end @@ -136,12 +138,13 @@ namespace :migrations do case response when Net::HTTPCreated puts green "Succesfully migrated Room:" - puts cyan " UID: #{r.uid}" - puts cyan " Name: #{r.name}" + puts cyan "UID: #{r.uid}" + puts cyan "Name: #{r.name}" else puts red "Unable to migrate Room:" - puts yellow " UID: #{r.uid}" - puts yellow " Name: #{r.name}" + puts yellow "UID: #{r.uid}" + puts yellow "Name: #{r.name}" + puts red "Errors: #{JSON.parse(response.body.to_s)['errors']}" has_encountred_issue = 1 # At least one of the migrations failed. end end @@ -192,6 +195,7 @@ namespace :migrations do puts green "Successfully migrated Settings" else puts red "Unable to migrate Settings" + puts red "Errors: #{JSON.parse(response.body.to_s)['errors']}" has_encountred_issue = 1 # At least one of the migrations failed. end