fix remove_foreign_key with if_exists and column
refs #LS-1201 Change-Id: I4240f4b642b1c99bb6dfe3ce88713b597797bea1 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242590 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Keith Garner <kgarner@instructure.com> Product-Review: Keith Garner <kgarner@instructure.com> Product-Review: James Williams <jamesw@instructure.com> QA-Review: James Williams <jamesw@instructure.com>
This commit is contained in:
parent
ab0db3ee94
commit
d3189e9f01
|
@ -1485,7 +1485,7 @@ ActiveRecord::ConnectionAdapters::SchemaStatements.class_eval do
|
|||
|
||||
# have to account for if options is a hash, if_exists will just get wrapped up
|
||||
# in it
|
||||
if options[:if_exists]
|
||||
if options.delete(:if_exists)
|
||||
fk_name_to_delete = foreign_key_for(from_table, options_or_to_table)&.name
|
||||
return if fk_name_to_delete.nil?
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue