Registry / database / foreigner

foreigner

JSON →
library1.7.4rbrubygemsunverified

Adds helpers to ActiveRecord migrations for managing foreign keys and dumps them to schema.rb.

gem install foreigner
INSTALL
IMPORT
SIG · FOREIGNER
F
foreigner
databaserubyv1.7.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Foreigner
require 'foreigner'

Add a foreign key constraint in a migration.

require 'foreigner' class AddForeignKeyToPosts < ActiveRecord::Migration def change add_foreign_key :posts, :users end end
Debug
Known issues
gotchaForeigner is largely superseded by Rails' built-in foreign key support (since Rails 4.2).
fix
Use Rails' native `add_foreign_key` without the gem for Rails 4.2+.
affects: >= 0
Upgrade
Version history
1.7.4latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
foreigner — gem install foreigner · libregistry