Mercurial > hg > soundsoftware-site
changeset 26:20392d0e4249 cannam
* Work around db migrate failure
author | Chris Cannam |
---|---|
date | Wed, 29 Sep 2010 17:12:28 +0100 |
parents | ca82a3468d27 |
children | 23e2c7fc6f03 12420e46bed9 |
files | vendor/plugins/redmine_checkout/db/migrate/20100808185600_change_protocol_storage_from_hash_to_array.rb |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/vendor/plugins/redmine_checkout/db/migrate/20100808185600_change_protocol_storage_from_hash_to_array.rb Fri Sep 24 14:17:42 2010 +0100 +++ b/vendor/plugins/redmine_checkout/db/migrate/20100808185600_change_protocol_storage_from_hash_to_array.rb Wed Sep 29 17:12:28 2010 +0100 @@ -15,6 +15,7 @@ def self.up ## First migrate the individual repositories Repository.all.each do |r| + next unless r.checkout_settings next unless r.checkout_settings['checkout_protocols'].is_a? Hash r.checkout_settings['checkout_protocols'] = r.checkout_settings['checkout_protocols'].sort{|(ak,av),(bk,bv)|ak<=>bk}.collect{|id,protocol| protocol} r.save! @@ -54,4 +55,4 @@ raise ActiveRecord::IrreversibleMigration.new "Sorry, there is no down migration yet. If you really need one, please create an issue on http://dev.holgerjust.de/projects/redmine-checkout" end -end \ No newline at end of file +end