2014/12/28分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
- Support for any type primary key.
- Add bigint primary key support for MySQL.
- Provide a better error message for unsupported classes in
serialize
- Provide :touch option to save() to accommodate saving without updating timestamps. [#18202]
reduce duplication in ConnectionAdapters::Table
docs. [ci skip]
activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
のdocの修正です。
ConnectionAdapters::Table
クラスの各メソッドのdocに"See SchemaStatements#xxx"を追加しています
ConnectionAdapters::Table
クラスとSchemaStatements
クラスの各メソッドの処理が大分近しいので、詳細はSchemaStatements
の方のdocを見てとの事です。
add autoload for ForeignKeyDefinition
.
activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
の修正です。
ForeignKeyDefinition
クラスのautoloadを追加しています。
Support for any type primary key.
ActiveRecordのConnectionAdaptersの修正です。
primary keyに任意の型のカラムを指定出来るよう修正しています。
Add bigint primary key support for MySQL.
ActiveRecordのConnectionAdaptersの修正です。
primary keyにbigintを指定した場合のサポートを追加しています。これにより、以下のような書き方が出来るようになっています。
create_table :foos, id: :bigint do |t| end
Provide a better error message for unsupported classes in serialize
activerecord/lib/active_record/coders/yaml_column.rb
の修正です。
serialize
出来ないクラスがserialize
メソッドに指定された場合に、より明確なエラーメッセージが表示されるよう修正しています。
因みに、出力されるエラーメッセージは、"Cannot serialize #{object_class}. Classes passed to
serializemust have a 0 argument constructor."
です。
Provide :touch option to save() to accommodate saving without updating timestamps. [#18202]
ActiveRecordの修正です。
save
、save!
メソッドにtouch
オプションを追加しています。
デフォルトでtouch: true
になっていますが、timestampsを更新したく無い場合に、touch: false
を指定してあげると、timestampsの更新無しでデータの更新が行えます。
Fix warning: `*' interpreted as argument prefix
activerecord/lib/active_record/timestamp.rb
の修正です。
()が無くてRubyのwarningが出力されていたのを対応しています。