2023/05/16分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Merge pull request #48037 from fatkodima/index-include-as-strings
activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
、
activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
の修正です。
PostgreSQL adapterのindexes
メソッドでINCLUDE
indexをSymbolのArrayとして返していたのを、StringのArrayとして返すよう修正しています。columns
はStringとして返すようになっており、挙動を合わせる為。
Merge pull request #48212 from Morozzzko/add-csp-unsafe-hashes
actionpack/lib/action_dispatch/http/content_security_policy.rb
の修正です。
CSPでunsafe_hashes
を指定出来るよう修正しています。
policy.script_src :strict_dynamic, :unsafe_hashes, "'sha256-rRMdkshZyJlCmDX27XnL7g3zXaxv7ei6Sg+yt4R3svU='"
Merge pull request #48210 from Shopify/jb-column-size-generator
railties/lib/rails/generators/generated_attribute.rb
の修正です。
migration generatorでcolumn sizeを指定出来るよう修正しています。
$ rails generate migration CreateAuthor name:text{medium}
class CreateAuthor < ActiveRecord::Migration[7.1] def change create_table :authors do |t| t.text :name, size: :medium end end end
[Tests only] Populate auto-generated UUID primary key
Active Recordのテストの修正です。
primary keyにUUIDを使用している場合に、値が自動で計算される事を確認するテストを追加しています。
Follow #47946 and apply to release notes
rails guideのRuby on Rails 6.1 Release Notes
の修正です。
where.not
実行時に生成されるSQLのexampleが実際の内容と異なっていたのを修正しています。っjk
Use RDoc syntax for :uuid argument (re #47949)
activerecord/lib/active_record/fixtures.rb
のdocの修正です。
fixtureのdocのフォーマットの修正を行っています。
Use double quotes for escaping yaml (re #47983)
railties/lib/rails/generators/rails/app/templates/config/locales/en.yml
の修正です。
yamlでStringで使用するのにsingle quoteを使用していたのをdouble quoteを使用するよう修正しています。framework全体としてdouble quoteを使用するようになっており、それに合わせる為。
Merge pull request #47960 from chris-hewitt/patch-1
rails guideのUpgrading Ruby on Rails
の修正です。
Rails 5がサポートしているRubyのバージョンの説明が2.2.2 or newerとなっていたのを、2.2.2から2.6.10までに修正しています。
call eq when begin and end are the same
activerecord/lib/arel/predications.rb
の修正です。
between
メソッドでbeginとendの値が同じ場合にeq
メソッドを使用するよう修正しています。これにより、where(id: 2..2)
としたような場合に、生成されるSQLがBETWEEN
からid
=2`になるようになっています。