Sha256: d8fc35e90f34d90af6ef74013bd398cf51dcc75e93eab3778ba8767f740ae207
Contents?: true
Size: 1001 Bytes
Versions: 2
Compression:
Stored size: 1001 Bytes
Contents
require 'alchemy/upgrader' require 'alchemy/version' namespace :alchemy do desc "Upgrades database content to Alchemy CMS v#{Alchemy::VERSION} (Set UPGRADE env variable to only run a specific task)." task upgrade: :environment do Alchemy::Upgrader.run! end namespace :upgrade do desc "List all available upgrade tasks." task list: [:environment] do puts "\nAvailable upgrade tasks" puts "-----------------------\n" methods = Alchemy::Upgrader.all_upgrade_tasks if methods.any? methods.each { |method| puts method } puts "\nUsage:" puts "------" puts "Run one or more tasks with `bundle exec rake alchemy:upgrade UPGRADE=task_name1,task_name2`\n" else puts "No upgrades available." end end task fix_picture_format: [:environment] do Alchemy::Picture.find_each do |picture| picture.update_column(:image_file_format, picture.image_file_format.to_s.chomp) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
alchemy_cms-3.4.2 | lib/tasks/alchemy/upgrade.rake |
alchemy_cms-3.4.1 | lib/tasks/alchemy/upgrade.rake |