1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Clarify note that SQLite3 adapter doesn't support add_foreign_key [ci skip]

Context https://github.com/rails/rails/pull/33563#discussion_r208891486.

Follow up #33563
This commit is contained in:
bogdanvlviv 2018-08-12 14:56:23 +03:00
parent bddab1fc86
commit e3ae53f92c
No known key found for this signature in database
GPG key ID: E4ACD76A6DB6DFDD

View file

@ -491,9 +491,8 @@ 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.
NOTE: The SQLite3 adapter doesn't support `add_foreign_key` since SQLite supports
only [a limited subset of ALTER TABLE](https://www.sqlite.org/lang_altertable.html).
Removing a foreign key is easy as well: