Foreigner was a Ruby gem that allowed management of foreign key constraints in migrations. It has been superseded by native functionality since Rails 4.2 was released, and is no longer developed.
Foreigner adds two methods to migrations.
add_foreign_key(from_table, to_table, options)
remove_foreign_key(from_table, to_table, options)