なるようになるブログ

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

rails commit log流し読み(2017/02/14)

2017/02/14分のコミットです。

CHANGELOGへの追加はありませんでした。


Merge pull request #26655 from kamipo/fix_remove_expression_index

Active Recordの修正です。

expression indexesに対してremove_indexメソッドを実行した場合にエラーになってしまうバグがあったのを修正しています。


Fix rubocop violations

activerecord/test/schema/postgresql_specific_schema.rbの修正です。

rubocopのstyle指定に違反している箇所があったのを修正しています。


Add default_index_type? to the generic schema dumper doesn’t have the knowledge about an index type

Active Recordの修正です。

connection adapterにdefaultのindex typeかどうかをチェックする為のdefault_index_type?メソッドを追加し、schema dumperそのメソッドを使用するよう修正しています。connection adapter毎の差異をschem dumperで意識しないで済むようにする為、のようです。


actionmailer/lib/action_mailer/base.rbactionpack/lib/abstract_controller/caching/fragments.rbactionpack/lib/action_controller/caching.rbの修正です。

fragment cacheで使用するinstrument nameをfreezeするよう修正しています。


Fix the return of deprecate_methods in doc [ci skip]

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

Deprecation::MethodWrapper#deprecate_methodsメソッドのdoc内のdeprecate_methodsのexampleの戻り値が実際の戻り値と異なっていたのを修正しています。


Merge pull request #27961 from jordanlewis/simplify-postgres-primary-keys-v2

activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rbの修正です。

PostgreSQLでprimary keyを取得する為のqueryのリファクタリングを行なっています(Part 2)。元々はpg_constraint + pg_attributeから取得していたのをinformation_schemaの key_column_usage view及びtable_constraints viewを使用するよう修正しています。


Not ants were harmed! ����

activesupport/lib/active_support/core_ext/module/delegation.rbのdocの修正です。

delegate_missing_toメソッドのdocのタイポを修正しています。


Should keep the primary key column order

activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rbの修正です。

先にコミットされたPostgreSQLでprimary keyを取得する為のqueryのリファクタリングで、primary keyのcolumn orderが維持されなくなっていたのを、再度column orderを維持するよう修正しています。


Use ActiveRecord bigint type, not SQL literal bigint

activerecord/test/cases/migration/foreign_key_test.rbの修正です。

foreign keyのテストでprimary keyにbigintを指定するのに、SQL literalでbigintを指定(pk BIGINT PRIMARY KEY)していたのを、Active Recordのbigint typeを使用するよう修正しています。

Oracleにはbigintが無く、SQLでbigintを指定するとエラーになってしまう為。


Remove unused DdlHelper in ForeignKeyTest

activerecord/test/cases/migration/foreign_key_test.rbの修正です。

foreign keyのtestから、使用していないDblHelper moduleを削除しています。