lib/schema_plus/foreign_keys/active_record/connection_adapters/abstract_adapter.rb
# Remove a foreign key constraint
#
# Arguments are the same as for add_foreign_key, or by name:
#
#    remove_foreign_key table_name, to_table, options
#    remove_foreign_key table_name, name: constraint_name
#
# (NOTE: Sqlite3 does not support altering a table to remove
# foreign-key constraints.  If you're using Sqlite3, this method will
# raise an error.)
Remove a foreign key constraint
Arguments are the same as for add_foreign_key, or by name.



Sqlite3 does not support altering a table to remove
foreign-key constraints.  If you're using Sqlite3, this method will
raise an error.)
Remove a foreign key constraint Arguments are the same as for add_foreign_key or by name . Sqlite3 does not support altering a table to remove foreign - key constraints . If you ' re using Sqlite3 this method will raise an error . )
def remove_foreign_key(from_table, to_table = nil, **options)
          options[:column] ||= foreign_key_column_for(to_table)
          if sql = remove_foreign_key_sql(from_table, to_table, options)
            execute "ALTER TABLE #{quote_table_name(from_table)} #{sql}"
          end
        end
def remove_foreign_key ( from_table , to_table = nil , ** options ) options [ :column ] ||= foreign_key_column_for ( to_table ) if sql = remove_foreign_key_sql ( from_table , to_table , options ) execute "ALTER TABLE #{quote_table_name(from_table)} #{sql}" end end
Remove a foreign key constraint
Arguments are the same as for add_foreign_key, or by name:
Remove a foreign key constraint Arguments are the same as for add_foreign_key or by name :
from_table
to_table
options