aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapter_test.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2019-02-10 22:49:08 +0900
committerRyuta Kamizono <kamipo@gmail.com>2019-02-11 14:15:16 +0900
commitda5843436b416f5c730f552273e1d09002beb4e0 (patch)
treeb96c0b39eef34cd4c3a572cfc0b56b2797e50399 /activerecord/test/cases/adapter_test.rb
parentd87afbf46f87a7fb8e9fef5c1b8422cdf386f4cb (diff)
downloadrails-da5843436b416f5c730f552273e1d09002beb4e0.tar.gz
rails-da5843436b416f5c730f552273e1d09002beb4e0.tar.bz2
rails-da5843436b416f5c730f552273e1d09002beb4e0.zip
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.
Diffstat (limited to 'activerecord/test/cases/adapter_test.rb')
-rw-r--r--activerecord/test/cases/adapter_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapter_test.rb b/activerecord/test/cases/adapter_test.rb
index 05d8aa59c4..2baf3db49a 100644
--- a/activerecord/test/cases/adapter_test.rb
+++ b/activerecord/test/cases/adapter_test.rb
@@ -348,6 +348,10 @@ module ActiveRecord
assert_equal "special_db_type", @connection.type_to_sql(:special_db_type)
end
+ def test_supports_foreign_keys_in_create_is_deprecated
+ assert_deprecated { @connection.supports_foreign_keys_in_create? }
+ end
+
def test_supports_multi_insert_is_deprecated
assert_deprecated { @connection.supports_multi_insert? }
end