Commit d4fcd5b6 authored by Gabriel Mazetto's avatar Gabriel Mazetto Committed by Robert Speicher

Updates existing SystemHooks associated with GeoNodes to use new hook.

parent 253d7451
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class UpdateGeoNodesSystemHooks < ActiveRecord::Migration
# Set this constant to true if this migration requires downtime.
DOWNTIME = false
def up
attrs = {
push_events: false,
tag_push_events: false,
repository_update_events: true
}
SystemHook.joins('INNER JOIN "geo_nodes" ON "geo_nodes".system_hook_id = "web_hooks".id').update_all(attrs)
end
def down
attrs = {
push_events: true,
tag_push_events: true,
repository_update_events: false
}
SystemHook.joins('INNER JOIN "geo_nodes" ON "geo_nodes".system_hook_id = "web_hooks".id').update_all(attrs)
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment