Skip to content

Commit

Permalink
Bugfix: correct column name in migration
Browse files Browse the repository at this point in the history
  • Loading branch information
benilovj committed Mar 6, 2014
1 parent 8685615 commit 9720c04
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class MoveAllUserSpecifiedLinksForLongFormFeedback < ActiveRecord::Migration
def up
ActiveRecord::Base.connection.execute("UPDATE anonymous_contacts
SET user_specified_link = url
SET user_specified_url = url
WHERE type = 'Support::Requests::Anonymous::LongFormContact'
AND url IS NOT NULL")
ActiveRecord::Base.connection.execute("UPDATE anonymous_contacts
Expand All @@ -14,9 +14,9 @@ def down
SET url = NULL
WHERE type = 'Support::Requests::Anonymous::LongFormContact'")
ActiveRecord::Base.connection.execute("UPDATE anonymous_contacts
SET url = user_specified_link
SET url = user_specified_url
WHERE type = 'Support::Requests::Anonymous::LongFormContact'
AND user_specified_link IS NOT NULL")
AND user_specified_url IS NOT NULL")

end
end

0 comments on commit 9720c04

Please sign in to comment.