From e4ff84bb79f640464ccd98ff8eacdfef4f33e5b5 Mon Sep 17 00:00:00 2001 From: Cody Cutrer Date: Tue, 9 Feb 2016 13:34:58 -0700 Subject: [PATCH] fix external tool placements migrations for qualified names refs CNVS-26480 Change-Id: Ia80d7ca0d87762a996f4b53af6ea768c08c74105 Reviewed-on: https://gerrit.instructure.com/71853 Tested-by: Jenkins Reviewed-by: Simon Williams Product-Review: Cody Cutrer QA-Review: Cody Cutrer --- .../20140806161233_create_context_external_tool_placements.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/db/migrate/20140806161233_create_context_external_tool_placements.rb b/db/migrate/20140806161233_create_context_external_tool_placements.rb index 1089136c6d5..bf276c26213 100644 --- a/db/migrate/20140806161233_create_context_external_tool_placements.rb +++ b/db/migrate/20140806161233_create_context_external_tool_placements.rb @@ -30,6 +30,7 @@ class CreateContextExternalToolPlacements < ActiveRecord::Migration VALUES ('#{type}', NEW.id) SQL_ACTIONS end + connection.set_search_path_on_function("tool_after_insert_#{type}_is_true__tr") create_trigger("tool_after_update_#{type}_is_true__tr", :generated => true). on("context_external_tools"). @@ -43,6 +44,8 @@ class CreateContextExternalToolPlacements < ActiveRecord::Migration ) SQL_ACTIONS end + connection.set_search_path_on_function("tool_after_update_#{type}_is_true__tr") + create_trigger("tool_after_update_#{type}_is_false__tr", :generated => true). on("context_external_tools"). @@ -52,6 +55,7 @@ class CreateContextExternalToolPlacements < ActiveRecord::Migration DELETE FROM context_external_tool_placements WHERE placement_type = '#{type}' AND context_external_tool_id = NEW.id SQL_ACTIONS end + connection.set_search_path_on_function("tool_after_update_#{type}_is_false__tr") end end