Skip to content

Commit

Permalink
Load seeds in migration; remove contact pages when rolling back the m…
Browse files Browse the repository at this point in the history
…igration
  • Loading branch information
awagener committed Dec 16, 2010
1 parent 06f2142 commit d0085bf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions db/migrate/create_inquiries.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@ def self.up
t.datetime "created_at"
t.datetime "updated_at"
end unless ::InquirySetting.table_exists?

load(Rails.root.join('db', 'seeds', 'pages_for_inquiries.rb').to_s)
end

def self.down
remove_table ::Inquiry.table_name
# todo: remove at 1.0
remove_table ::InquirySetting.table_name
Page.delete_all({:link_url => ("/contact" || "/contact/thank_you")})
end
end

0 comments on commit d0085bf

Please sign in to comment.