class DisableFileTypes < ActiveRecord::Migration
  def self.up
    Radiant::Config['assets.skip_filetype_validation'] = true
    puts "-- Setting default content types in Radiant::Config"
    if defined? SettingsExtension && Radiant::Config.column_names.include?('description')
      Config.find(:all).each do |c|
       description = case c.key
         when 'assets.skip_filetype_validations'
           'When set to true, disables the filetype validations. Set to false to enable them.'
         else
           c.description
       end
       c.update_attribute :description, description
      end
    end
  end

  def self.down
  end
end

class DisableFileTypes < ActiveRecord::Migration
  def self.up
    Radiant::Config['assets.skip_filetype_validation'] = true
    puts "-- Setting default content types in Radiant::Config"
    if defined? SettingsExtension && Radiant::Config.column_names.include?('description')
      Radiant::Config.find(:all).each do |c|
       description = case c.key
         when 'assets.skip_filetype_validations'
           'When set to true, disables the filetype validations. Set to false to enable them.'
         else
           c.description
       end
       c.update_attribute :description, description
      end
    end
  end

  def self.down
  end
end

Fix migration by prefixing the Config module with Radiant
Fix migration by prefixing the Config module with Radiant

Signed-off-by: Keith BIngman <keith@keithbingman.com>

Signed-off-by: Aissac SRL <ef29f82a68bbcac28aaf4f4f019e2bfc7b150e76@aissac.ro>