method

remove_foreign_key

remove_foreign_key(from_table, to_table = nil, **options)
public

No documentation available.

# File activerecord/lib/active_record/connection_adapters/sqlite3/schema_statements.rb, line 65
        def remove_foreign_key(from_table, to_table = nil, **options)
          return if options.delete(:if_exists) && !foreign_key_exists?(from_table, to_table, **options.slice(:column))

          to_table ||= options[:to_table]
          options = options.except(:name, :to_table, :validate)
          fkey = foreign_key_for!(from_table, to_table: to_table, **options)

          foreign_keys = foreign_keys(from_table)
          foreign_keys.delete(fkey)
          alter_table(from_table, foreign_keys)
        end