fixes #14094 - replace foreign_keys calls with foreign_key_exists?
foreign_keys throws an exception under SQLite in Rails 4.2, so prefer the _exists? call to check for presence of a key as it returns false on DBs without FK support.
Related issues
Refactor #14094: Replace DB migration foreign_keys calls with foreign_key_exists?
fixes #14094 - replace foreign_keys calls with foreign_key_exists?
foreign_keys throws an exception under SQLite in Rails 4.2, so prefer
the _exists? call to check for presence of a key as it returns false on
DBs without FK support.