Merge pull request #33563 from lzap/foreign-key-note-doc

ActiveRecord Guide - sqlite3 foreign keys note
This commit is contained in:
Richard Schneeman 2018-08-11 14:49:59 -05:00 committed by GitHub
commit 141f50ef9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -491,6 +491,10 @@ NOTE: Active Record only supports single column foreign keys. `execute` and
`structure.sql` are required to use composite foreign keys. See
[Schema Dumping and You](#schema-dumping-and-you).
NOTE: At this time, only the mysql, mysql2 and postgresql adapters support
foreign keys. Implementation for sqlite3 is partial, keys are created for new
tables but not for existing tables via `ALTER TABLE` statement.
Removing a foreign key is easy as well:
```ruby