diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-10-31 12:12:41 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-10-31 12:12:41 +0300 |
commit | ff48e1eeb73de6a98ba92c6f1b7bbddda17edcd0 (patch) | |
tree | 0fbbd961e9df95d305b3c845e6b4f24421522b0f /db | |
parent | 5a699090cde818294fca93d2793dd6195c0a7c2d (diff) |
Save only valid record in service migrations
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20140907220153_serialize_service_properties.rb | 2 | ||||
-rw-r--r-- | db/migrate/20141006143943_move_slack_service_to_webhook.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/db/migrate/20140907220153_serialize_service_properties.rb b/db/migrate/20140907220153_serialize_service_properties.rb index 6293015fa07..bd75ab1eacb 100644 --- a/db/migrate/20140907220153_serialize_service_properties.rb +++ b/db/migrate/20140907220153_serialize_service_properties.rb @@ -23,7 +23,7 @@ class SerializeServiceProperties < ActiveRecord::Migration associations[service.type.to_sym].each do |attribute| service.send("#{attribute}=", service.attributes[attribute.to_s]) end - service.save(validate: false) + service.save end remove_column :services, :project_url, :string diff --git a/db/migrate/20141006143943_move_slack_service_to_webhook.rb b/db/migrate/20141006143943_move_slack_service_to_webhook.rb index 4b62b223cbf..a8e07033a5d 100644 --- a/db/migrate/20141006143943_move_slack_service_to_webhook.rb +++ b/db/migrate/20141006143943_move_slack_service_to_webhook.rb @@ -10,7 +10,7 @@ class MoveSlackServiceToWebhook < ActiveRecord::Migration slack_service.properties.delete('subdomain') # Room is configured on the Slack side slack_service.properties.delete('room') - slack_service.save! + slack_service.save end end end |