Fix foreign key issue with Rails 6 and Sqlite3 (#695)
Rails 6 has dropped name from ActiveRecord::ConnectionAdapters::ForeignKeyDefinition
for Sqlite3 adapter:
https://github.com/rails/rails/blob/f2df77709f7e536aaf4d6f984ff21a49d44d34c1/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb\#L305-L311
This has caused issues with getting foreign key info and blowing up
when trying to annotate models with foreign keys. This commit
adds one additional check for name presence and uses column
attribute from options instead.
Closes #620.
Showing
Please
register
or
sign in
to comment