Permalink
Browse files

add reverse migration to ConvertPageMetas

  • Loading branch information...
1 parent 252d410 commit 29dfce3af3204bc290af3925f44faf6f513d154d @saturnflyer saturnflyer committed Jan 31, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 db/migrate/20100805155020_convert_page_metas.rb
@@ -11,5 +11,10 @@ def self.up
def self.down
add_column :pages, :description, :string
add_column :pages, :keywords, :string
+ Page.all.each do |page|
+ page.description = page.field('description').content
+ page.keywords = page.field('keywords').content
+ page.save
+ end
end
end

0 comments on commit 29dfce3

Please sign in to comment.