diff options
author | Eileen M. Uchitelle <eileencodes@users.noreply.github.com> | 2019-04-08 11:26:31 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-08 11:26:31 -0400 |
commit | 27c3ad0ac0ae6a493a6feed86dfa721a1783c17c (patch) | |
tree | 5215051929fa10803a6b76bcda948f7e06d545c1 /activerecord/lib/active_record | |
parent | 3f0a25ad830705b4d807d95af10189055e8c3791 (diff) | |
parent | 54dce6870de23110cdf251d8f71a8e1a57dea7bb (diff) | |
download | rails-27c3ad0ac0ae6a493a6feed86dfa721a1783c17c.tar.gz rails-27c3ad0ac0ae6a493a6feed86dfa721a1783c17c.tar.bz2 rails-27c3ad0ac0ae6a493a6feed86dfa721a1783c17c.zip |
Merge pull request #35892 from ryohashimoto/bulk_insert_logs
Improve log messages for #insert_all` / `#upsert_all` etc. methods
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/insert_all.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/insert_all.rb b/activerecord/lib/active_record/insert_all.rb index d7808919ee..ed7a37b255 100644 --- a/activerecord/lib/active_record/insert_all.rb +++ b/activerecord/lib/active_record/insert_all.rb @@ -21,7 +21,10 @@ module ActiveRecord end def execute - connection.exec_query to_sql, "Bulk Insert" + message = "#{model} " + message += "Bulk " if inserts.many? + message += (on_duplicate == :update ? "Upsert" : "Insert") + connection.exec_query to_sql, message end def updatable_columns |