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 <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
Cody Cutrer 2016-02-09 13:34:58 -07:00
parent 51e5d1dbdd
commit e4ff84bb79
1 changed files with 4 additions and 0 deletions

View File

@ -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