Skip to content

Commit

Permalink
Add migration to clean up malformed requirements fields from yaml/syc…
Browse files Browse the repository at this point in the history
…k issues.
  • Loading branch information
cmeiklejohn committed Sep 23, 2011
1 parent 2b153e4 commit be0e016
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions db/migrate/20110805014415_remove_improperly_embedded_yaml_data.rb
@@ -0,0 +1,12 @@
class RemoveImproperlyEmbeddedYamlData < ActiveRecord::Migration
def self.up
Dependency.where("requirements like '%YAML::Syck::DefaultKey%'").each do |d|
d.requirements = d.clean_requirements
d.save(:validate => false)
end
end

def self.down
# Do nothing.
end
end

0 comments on commit be0e016

Please sign in to comment.