From e3ae53f92ca4b5349b7ca54e814063299de03bf0 Mon Sep 17 00:00:00 2001 From: bogdanvlviv Date: Sun, 12 Aug 2018 14:56:23 +0300 Subject: [PATCH] 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 --- guides/source/active_record_migrations.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/guides/source/active_record_migrations.md b/guides/source/active_record_migrations.md index e2359a35f1..9446441b20 100644 --- a/guides/source/active_record_migrations.md +++ b/guides/source/active_record_migrations.md @@ -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: