Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ module QueryMethods

private

# Copy of original from Rails master. This patch can be removed when adapter supports Rails 6.
# Copy of original from Rails master.
# This patch can be removed when adapter supports Rails version greater than 6.0.2.2
def table_name_matches?(from)
table_name = Regexp.escape(table.name)
quoted_table_name = Regexp.escape(connection.quote_table_name(table.name))
Expand Down
2 changes: 1 addition & 1 deletion lib/active_record/connection_adapters/sqlserver_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def initialize_type_map(m = type_map)
m.register_type 'timestamp', SQLServer::Type::Timestamp.new
end

def translate_exception(e, message)
def translate_exception(e, message:, sql:, binds:)
case message
when /(cannot insert duplicate key .* with unique index) | (violation of unique key constraint)/i
RecordNotUnique.new(message)
Expand Down