summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-10-31 11:12:41 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-10-31 11:12:41 +0200
commitff48e1eeb73de6a98ba92c6f1b7bbddda17edcd0 (patch)
tree0fbbd961e9df95d305b3c845e6b4f24421522b0f /db
parent5a699090cde818294fca93d2793dd6195c0a7c2d (diff)
downloadgitlab-ce-ff48e1eeb73de6a98ba92c6f1b7bbddda17edcd0.tar.gz
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.rb2
-rw-r--r--db/migrate/20141006143943_move_slack_service_to_webhook.rb2
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