another warning message in migration
This commit is contained in:
parent
30e86c9d6a
commit
1ad3dee0dc
1 changed files with 12 additions and 4 deletions
|
|
@ -1,18 +1,26 @@
|
||||||
namespace :migrations do
|
namespace :migrations do
|
||||||
desc 'make old registered services into the new class specific services'
|
desc 'make old registered services into the new class specific services'
|
||||||
|
|
||||||
task :service_reclassify do
|
task :service_reclassify do
|
||||||
|
require File.join(Rails.root,"config/environment")
|
||||||
|
#include ActiveSupport::Inflector
|
||||||
Service.all.each do |s|
|
Service.all.each do |s|
|
||||||
|
puts s.inspect
|
||||||
|
|
||||||
provider = s.provider
|
provider = s.provider
|
||||||
s._type = "Services::#{provider.camelize}"
|
if provider
|
||||||
s.save
|
s._type = "Services::#{provider.camelize}"
|
||||||
|
s.save
|
||||||
|
else
|
||||||
|
puts "no provider found for service #{s.id}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
puts "all done"
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'allow to upgrade old image urls to use rel path'
|
desc 'allow to upgrade old image urls to use rel path'
|
||||||
task :swtich_image_urls do
|
task :swtich_image_urls do
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'move all posts and photos to new schema'
|
desc 'move all posts and photos to new schema'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue