From 847e6915268e1ff1a1aeb5c48c7d9af01e2ff383 Mon Sep 17 00:00:00 2001 From: Lukas Zapletal Date: Thu, 9 Aug 2018 11:14:56 +0200 Subject: ActiveRecord Guide - sqlite3 foreign keys note --- guides/source/active_record_migrations.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'guides/source/active_record_migrations.md') diff --git a/guides/source/active_record_migrations.md b/guides/source/active_record_migrations.md index cfa444fda0..be5af133ff 100644 --- a/guides/source/active_record_migrations.md +++ b/guides/source/active_record_migrations.md @@ -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 -- cgit v1.2.3