From fd65d1525203eaee77e3de55e7cb5ad13b5a21f5 Mon Sep 17 00:00:00 2001
From: Ryuta Kamizono <kamipo@gmail.com>
Date: Tue, 6 Dec 2016 07:39:47 +0900
Subject: Should inherit `StatementInvalid` rather than
 `WrappedDatabaseException`

Because defunct wrapper class is kept for compatibility.
---
 activerecord/lib/active_record/errors.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'activerecord/lib')

diff --git a/activerecord/lib/active_record/errors.rb b/activerecord/lib/active_record/errors.rb
index 7c8be37326..78ff2756f9 100644
--- a/activerecord/lib/active_record/errors.rb
+++ b/activerecord/lib/active_record/errors.rb
@@ -124,7 +124,7 @@ module ActiveRecord
   end
 
   # Raised when a foreign key constraint cannot be added because the column type does not match the referenced column type.
-  class MismatchedForeignKey < WrappedDatabaseException
+  class MismatchedForeignKey < StatementInvalid
     def initialize(adapter = nil, message: nil, table: nil, foreign_key: nil, target_table: nil, primary_key: nil)
       @adapter = adapter
       if table
-- 
cgit v1.2.3