Commit 6f6473f7 authored by Toon Claes's avatar Toon Claes

Use plain SQL in the migration

parent 8be2e7c0
......@@ -5,7 +5,13 @@ class RemoveSystemHookFromGeoNodes < ActiveRecord::Migration
DOWNTIME = false
def up
SystemHook.destroy_all(id: GeoNode.select(:system_hook_id))
execute <<-EOF.strip_heredoc
DELETE FROM web_hooks
WHERE id IN (
SELECT system_hook_id
FROM geo_nodes
);
EOF
remove_reference :geo_nodes, :system_hook
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