Actions
Refactor #14094
closedReplace DB migration foreign_keys calls with foreign_key_exists?
Description
In Rail 4.2 and higher, where native foreign key support replaces Foreigner, the "foreign_keys" call inside a DB migration should be avoided as it will throw an exception on databases (SQLite) that don't support FKs.
In Foreigner, it returned []
on SQLite. In #13244 (Rails 4.2) I'll add a compatibility layer with a deprecation warning, but our migrations that use this to check whether a key exists should just use the foreign_key_exists?
method for better compatibility.
Updated by Dominic Cleal almost 9 years ago
- Blocks Feature #13244: Upgrade Ruby on Rails to 4.2 added
Updated by The Foreman Bot almost 9 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/3290 added
Updated by Dominic Cleal almost 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset d273d9cfdec2192cf7f22f1f3a69d51c413b9647.
Updated by Dominic Cleal almost 9 years ago
- Translation missing: en.field_release set to 136
Actions