foreigner
foreigner copied to clipboard
Adds foreign key helpers to migrations and correctly dumps foreign keys to schema.rb
when i uncomment the foreigner gem from gemfile this error occur and I think error in this class: /usr/local/bundle/bundler/gems/foreigner-0496762a6c0a/lib/foreigner/schema_dumper.rb:6:in `block in '
Trying to use the mysql2_makara adapter with Foreigner as in a rake task i was getting the error: [exec] "Database adapter mysql2_makara not supported. Use:\nForeigner::Adapter.register 'mysql2_makara', 'path/to/adapter'" Thanks.
This PR solves two problems which are highly relevant if you are either using explicit schema names in add_foreign_key instructions, and/or you are using the Apartment gem. 1. Incorrect behaviour...
Trying to run db:schema:load runs the first time, but on subsequent tries it fails trying to drop any tables that have foreign keys defined on them. This is happening in...
in ': undefined method `alias_method_chain' for ActiveRecord::ConnectionAdapters::Table:Class (NoMethodError) alias_method_chain :references, :foreign_keys ^^^^^^^^^^^^^^^^^^