なるようになるブログ

読書感想文かrailsについてかrubyについてか

rails commit log流し読み(2024/12/02)

2024/12/02分のコミットです。

CHANGELOGにのったコミットは以下の通りです。

activerecord/CHANGELOG.md


Fix add_unique_constraint/add_check_constraint/add_foreign_key to be revertible when given invalid options

Active Recordの修正です。

add_unique_constraintadd_check_constraintadd_foreign_keyを不正なオプションを指定した場合もreversibleになるよう修正しています。


Hide erb:authentication generator from help text

railties/lib/rails/generators/erb/authentication/authentication_generator.rbの修正です。

erb:authentication generatorがgeneratorのhelpに表示されないよう修正しています。単体で実行するgeneratorでは無いため。


Merge pull request #53790 from fatkodima/change-parallel-tests-dbs-suffix

activerecord/lib/active_record/test_databases.rbの修正です。

parallel tests用のdatabaseを作成する際に、サフィックスとして-Nを指定していたのを、_Nを指定するよう修正しています。ダッシュ(-)をdatabase名に指定出来ないRDBMSがある為。


Ensure enqueued count from adapter is an int

activejob/lib/active_job/log_subscriber.rbの修正です。

enqueue_allnilを返した場合に、ログ出力処理内のenqueued_countの設定処理でエラーになってしまうバグがあったのを修正しています。


Merge pull request #53792 from seanpdoyle/active-support-configurable-class-method-docs

activesupport/lib/active_support/configurable.rbのdocの修正です。

ActiveSupport::Configurableのclass methods(configconfigure)にdocを追加しています。


Merge pull request #53799 from byroot/mysql2-needless-affected-rows

activerecord/lib/active_record/connection_adapters/mysql2/database_statements.rbの修正です。

mysql2 gem v0.5.6以降に、#queryがGVLを解放している間に同じconnectionのprepared statementがGCされた場合、#affected_rowsMysql2::Errorをraiseする事がある、というバグがあり、それを避ける為に、#affected_rowsを使わないで済む場合は使用しないようワークアラウンドを追加しています。

参考:Save affected_rows on the wrapper when reading results