2023/09/25分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
- Allow SQLite3
busy_handler
to be configured with simple max number ofretries
- Performance tune the SQLite3 adapter connection configuration
activestorage/CHANGELOG.md
Merge pull request #49352 from fractaledmind/ar-sqlite-retries
activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
の修正です。
SQLite3でlockなどによりBusyエラーが発生した場合に、自動でリトライ出来るよう修正しています。リトライはdatabase.yml
のretries
が指定された場合に、指定された回数分実行されるようになっています。
参考: Register A Callback To Handle SQLITE_BUSY Errors
Performance tune the SQLite3 adapter connection configuration
activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
の修正です。
SQLite3 adapterでDBに接続する際に、journal_mode
やmmap_size
等の設定を行うよう修正しています。SQL実行時の性能改善のため、との事です。
参考: Enhancing your Rails app with SQLite
Update doc for include_hidden
form form file_field.
actionview/lib/action_view/helpers/form_helper.rb
のdocの修正です。
file_field
メソッドのdoc内の:include_hidden
オプションについて説明している箇所に、:include_hidden
オプションのデフォルト値はconfig.active_storage.multiple_file_field_include_hidden
に依存する旨説明を追加しています。
Update requires in LoggerThreadSafeLevel
activesupport/lib/active_support/logger_thread_safe_level.rb
の修正です。
使用していないrequireを削除しています。
Minor edits in the upgrading guide
rails guideのUpgrading Ruby on Rails
の修正です。
config.autoload_lib and config.autoload_lib_once
について説明している箇所のグラマーを修正しています。
Allow attaching File or Pathname to has_one_attached
activestorage/lib/active_storage/attached/changes/create_one.rb
の修正です。
has_one_attached
を指定しているattributeにFile
、及び、Pathname
のオブジェクトを指定してのattachの作成を出来るよう修正しています。 テストでデータの作成を簡易に出来るようにする為。
User.create!(avatar: File.open("image.jpg")) User.create!(avatar: file_fixture("image.jpg"))
Merge pull request #48462 from iamradioactive/remove_additional_query
activerecord/lib/active_record/encryption/extended_deterministic_uniqueness_validator.rb
の修正です。
Encrypted Attributeを使用しているattributeにuniqueness validationを指定している、かつ、uniqueness validationでエラーになった場合にエラーが2つ表示される(暗号化された値、復号化された値それぞれでvalidationチェックが行われてしまっていた)バグがあったのを修正しています。
Fix an incorrect assert_equal
argument order
activerecord/test/cases/encryption/uniqueness_validations_test.rb
の修正です。
assert_equal
の引数の順番が誤っていたのを修正しています。