Commit 3d01bf96440df5af78c62a18c46336bc656c9e54
1 parent
12761a56
Exists in
master
and in
22 other branches
Save without validation during db:migrate to avoid upgrade errors
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
db/migrate/20110714213405_symbolize_environment_settings_keys.rb
| @@ -3,7 +3,7 @@ class SymbolizeEnvironmentSettingsKeys < ActiveRecord::Migration | @@ -3,7 +3,7 @@ class SymbolizeEnvironmentSettingsKeys < ActiveRecord::Migration | ||
| 3 | select_all("select id from environments").each do |environment| | 3 | select_all("select id from environments").each do |environment| |
| 4 | env = Environment.find(environment['id']) | 4 | env = Environment.find(environment['id']) |
| 5 | env.settings.symbolize_keys! | 5 | env.settings.symbolize_keys! |
| 6 | - env.save | 6 | + env.save_without_validation |
| 7 | end | 7 | end |
| 8 | end | 8 | end |
| 9 | 9 |
db/migrate/20110728173905_add_more_trusted_sites_for_environments.rb
| @@ -4,7 +4,7 @@ class AddMoreTrustedSitesForEnvironments < ActiveRecord::Migration | @@ -4,7 +4,7 @@ class AddMoreTrustedSitesForEnvironments < ActiveRecord::Migration | ||
| 4 | Environment.all.each do |env| | 4 | Environment.all.each do |env| |
| 5 | env.trusted_sites_for_iframe += default_sites | 5 | env.trusted_sites_for_iframe += default_sites |
| 6 | env.trusted_sites_for_iframe.uniq! | 6 | env.trusted_sites_for_iframe.uniq! |
| 7 | - env.save! | 7 | + env.save_without_validation |
| 8 | end | 8 | end |
| 9 | end | 9 | end |
| 10 | 10 |