Return to Snippet

Revision: 4039
at October 18, 2007 15:36 by edwinjanmoss


Initial Code
add_column :users, :ssn_part, :string rescue nil

Initial URL

                                

Initial Description
Add "rescue nil" to migration commands that you want the migration to try but don't care if it fails. Helpful for debugging migrations and helpful when you want to modify a previous migration, let's say add a column, and you don't want the remove column in the drop block to choke your reverse migration.

Initial Title
Avoid duplicate column Error in Migration

Initial Tags

                                

Initial Language
Rails