aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-02-01 20:11:40 +0900
committerJeremy Daer <jeremydaer@gmail.com>2017-02-12 19:46:47 -0700
commitbb45fa05d1681230764af023058af65142c75cff (patch)
tree9cee7e74529090bef26c580a665bbf1fdf3a3ce8 /activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
parent416d85b65e4f49f7e86f24c56bc1ec7441e90f2c (diff)
downloadrails-bb45fa05d1681230764af023058af65142c75cff.tar.gz
rails-bb45fa05d1681230764af023058af65142c75cff.tar.bz2
rails-bb45fa05d1681230764af023058af65142c75cff.zip
Deprecate `supports_primary_key?`
`supports_primary_key?` was added to determine if `primary_key` is implemented in the adapter in f060221. But we already use `primary_key` without `supports_primary_key?` (207f266, 5f3cf42) and using `supports_primary_key?` has been removed in #1318. This means that `supports_primary_key?` is no longer used in the internal and Active Record doesn't work without `primary_key` is implemented (all adapters must implement `primary_key`). Closes #27977
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract_adapter.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
index ae24ce7236..808de5daca 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
@@ -236,11 +236,10 @@ module ActiveRecord
false
end
- # Can this adapter determine the primary key for tables not attached
- # to an Active Record class, such as join tables?
- def supports_primary_key?
- false
+ def supports_primary_key? # :nodoc:
+ true
end
+ deprecate :supports_primary_key?
# Does this adapter support DDL rollbacks in transactions? That is, would
# CREATE TABLE or ALTER TABLE get rolled back by a transaction?