aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel')
-rw-r--r--lib/arel/table.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/arel/table.rb b/lib/arel/table.rb
index ceb81705b3..a68705fedf 100644
--- a/lib/arel/table.rb
+++ b/lib/arel/table.rb
@@ -27,6 +27,12 @@ module Arel
end
def primary_key
+ if $VERBOSE
+ warn <<-eowarn
+primary_key (#{caller.first}) is deprecated and will be removed in ARel 3.0.0. Please
+switch to `compile_insert`
+ eowarn
+ end
@primary_key ||= begin
primary_key_name = @engine.connection.primary_key(name)
# some tables might be without primary key