diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-03-10 18:21:38 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-03-10 18:21:38 +0100 |
commit | 3004ad318aecab81d8d3fb451901efc4d485e9ab (patch) | |
tree | 501c24f663bb5102fc364e7e753f331629c1cd03 | |
parent | b29f5e637816aeca6f5cc7c9acb3f380469d1630 (diff) |
Fixed a migration. #231
-rw-r--r-- | db/migrate/20130309055700_change_perimeter_gs_parameters.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/db/migrate/20130309055700_change_perimeter_gs_parameters.rb b/db/migrate/20130309055700_change_perimeter_gs_parameters.rb index 6e29bd0..7973ee0 100644 --- a/db/migrate/20130309055700_change_perimeter_gs_parameters.rb +++ b/db/migrate/20130309055700_change_perimeter_gs_parameters.rb @@ -1,6 +1,6 @@ class ChangePerimeterGsParameters < ActiveRecord::Migration def up - GsParameter.where(:entity => 'perimeter', :section => 'bad_headers_register', :name => 'from_user').first.update_attributes(:value => '^%d+$', :class_type => 'String') + GsParameter.find_or_create_by_entity_and_section_and_name('perimeter', 'bad_headers_register', 'from_user').update_attributes(:value => '^%d+$', :class_type => 'String') GsParameter.where(:entity => 'perimeter', :section => 'bad_headers_register', :name => 'to_user').first.update_attributes(:value => '^%d+$', :class_type => 'String') GsParameter.where(:entity => 'perimeter', :section => 'checks_call', :name => 'check_bad_headers').first.update_attributes(:value => '20', :class_type => 'Integer') |