Add more log messages

This commit is contained in:
voodoorai2000
2019-04-16 18:23:55 +02:00
parent aa04757e16
commit e47a8be2a2

View File

@@ -2,14 +2,20 @@ namespace :spending_proposals do
desc "Check if there are any spending proposals in DB" desc "Check if there are any spending proposals in DB"
task check: :environment do task check: :environment do
if Rails.env.production? && SpendingProposal.any? if !Rails.env.production?
puts "WARNING" puts "Please run this rake task in your production environment."
puts "You have spending proposals in your database." else
puts "This model has been deprecated in favor of budget investments." if SpendingProposal.any?
puts "In the next CONSUL release spending proposals will be deleted." puts "WARNING"
puts "If you do not need to keep this data, you don't have to do anything else." puts "You have spending proposals in your database."
print "If you would like to migrate the data from spending proposals to budget investments " puts "This model has been deprecated in favor of budget investments."
puts "please check this PR https://github.com/consul/consul/pull/3431." puts "In the next CONSUL release spending proposals will be deleted."
puts "If you do not need to keep this data, you don't have to do anything else."
print "If you would like to migrate the data from spending proposals to budget investments "
puts "please check this PR https://github.com/consul/consul/pull/3431."
else
puts "All good!"
end
end end
end end