diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2016-12-06 07:39:47 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2016-12-06 07:39:47 +0900 |
commit | fd65d1525203eaee77e3de55e7cb5ad13b5a21f5 (patch) | |
tree | ee76f283896f82ce0e1394b6c96d560e69ba82b4 /activerecord/lib | |
parent | 9e352e38bdd52a06c06d2de88c155b84b9f18ca1 (diff) | |
download | rails-fd65d1525203eaee77e3de55e7cb5ad13b5a21f5.tar.gz rails-fd65d1525203eaee77e3de55e7cb5ad13b5a21f5.tar.bz2 rails-fd65d1525203eaee77e3de55e7cb5ad13b5a21f5.zip |
Should inherit `StatementInvalid` rather than `WrappedDatabaseException`
Because defunct wrapper class is kept for compatibility.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/errors.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |