From da5843436b416f5c730f552273e1d09002beb4e0 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sun, 10 Feb 2019 22:49:08 +0900 Subject: SQLite3: Implement `add_foreign_key` and `remove_foreign_key` I implemented Foreign key create in `create_table` for SQLite3 at #24743. This follows #24743 to implement `add_foreign_key` and `remove_foreign_key`. Unfortunately SQLite3 has one limitation that `PRAGMA foreign_key_list(table-name)` doesn't have constraint name. So we couldn't implement find/remove foreign key by name for now. Fixes #35207. Closes #31343. --- actionmailbox/test/dummy/db/schema.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actionmailbox') diff --git a/actionmailbox/test/dummy/db/schema.rb b/actionmailbox/test/dummy/db/schema.rb index 10d4111a89..76c979bcec 100644 --- a/actionmailbox/test/dummy/db/schema.rb +++ b/actionmailbox/test/dummy/db/schema.rb @@ -42,4 +42,5 @@ ActiveRecord::Schema.define(version: 2018_02_12_164506) do t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true end + add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id" end -- cgit v1.2.3