Skip to content

Instantly share code, notes, and snippets.

@richdownie
Created April 1, 2010 18:23
Show Gist options
  • Save richdownie/352182 to your computer and use it in GitHub Desktop.
Save richdownie/352182 to your computer and use it in GitHub Desktop.
db:rollback
[mongrel@qaapp1-t current]$ pwd
/var/www/railsapps/auto/current
[mongrel@qaapp1-t current]$ RAILS_ENV=qa rake db:rollback
(in /var/www/railsapps/auto/releases/20100401170533)
== ChangeAnswerCommentFieldToText: reverting =================================
-- change_column(:answers, :comment, :string)
-> 0.8816s
== ChangeAnswerCommentFieldToText: reverted (0.8821s) ========================
Answer to Question in Web Form:
>> a = Answer.last
=> #<Answer id: 8514, value: "123456789012345678901234567890123456789012345678901...", question_id: 2030, visible_in_profile: nil, editable_in_profile: nil, created_at: "2010-04-01 18:06:35", updated_at: "2010-04-01 18:06:35", form_response_id: 3685, comment: "", date_value: nil, boolean_value: nil, integer_value: nil, tabular_data_id: 0, float_value: nil, type: nil>
>> a.value
=> "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
>>
Ran Migration...
[mongrel@qaapp1-t current]$ RAILS_ENV=qa rake db:migrate
(in /var/www/railsapps/auto/releases/20100401170533)
== ChangeAnswerCommentFieldToText: migrating =================================
-- change_column(:answers, :comment, :text)
-> 0.2611s
== ChangeAnswerCommentFieldToText: migrated (0.2614s) ========================
Checked DB
>> a = Answer.last
=> #<Answer id: 8514, value: "123456789012345678901234567890123456789012345678901...", question_id: 2030, visible_in_profile: nil, editable_in_profile: nil, created_at: "2010-04-01 18:06:35", updated_at: "2010-04-01 18:06:35", form_response_id: 3685, comment: "", date_value: nil, boolean_value: nil, integer_value: nil, tabular_data_id: 0, float_value: nil, type: nil>
>> a.value
=> "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment