1. 21 12月, 2015 2 次提交
  2. 19 12月, 2015 4 次提交
  3. 18 12月, 2015 7 次提交
  4. 17 12月, 2015 12 次提交
  5. 16 12月, 2015 5 次提交
  6. 15 12月, 2015 10 次提交
    • S
      Allow users to pass flags from database.yml · 46fe546c
      Stephen Blackstone 提交于
      Fix white-space
      
      Add test case demonstrating flags are received by the adapter
      46fe546c
    • Y
      remove extra spaces from deprecation message · 08780eff
      yuuji.yaginuma 提交于
      ```
      # before
      DEPRECATION WARNING:               Time columns will become time zone aware in Rails 5.1. This
                    still causes `String`s to be parsed as if they were in `Time.zone`,
                    and `Time`s to be converted to `Time.zone`.
      
                    To keep the old behavior, you must add the following to your initializer:
      
                        config.active_record.time_zone_aware_types = [:datetime]
      
                    To silence this deprecation warning, add the following:
      
                        config.active_record.time_zone_aware_types << :time
      ```
      
      ```
      # after
      DEPRECATION WARNING: Time columns will become time zone aware in Rails 5.1. This
      still causes `String`s to be parsed as if they were in `Time.zone`,
      and `Time`s to be converted to `Time.zone`.
      
      To keep the old behavior, you must add the following to your initializer:
      
          config.active_record.time_zone_aware_types = [:datetime]
      
      To silence this deprecation warning, add the following:
      
          config.active_record.time_zone_aware_types << :time
      ```
      08780eff
    • S
      Use a bind param for `LIMIT` and `OFFSET` · af3dc42e
      Sean Griffin 提交于
      We currently generate an unbounded number of prepared statements when
      `limit` or `offset` are called with a dynamic argument. This changes
      `LIMIT` and `OFFSET` to use bind params, eliminating the problem.
      
      `Type::Value#hash` needed to be implemented, as it turns out we busted
      the query cache if the type object used wasn't exactly the same object.
      
      This drops support for passing an `Arel::Nodes::SqlLiteral` to `limit`.
      Doing this relied on AR internals, and was never officially supported
      usage.
      
      Fixes #22250.
      af3dc42e
    • S
      Deprecate limit strings with commas · e12c2a6d
      Sean Griffin 提交于
      Some backends allow `LIMIT 1,2` as a shorthand for `LIMIT 1 OFFSET 2`.
      Supporting this in Active Record massively complicates using bind
      parameters for limit and offset, and it's trivially easy to build an
      invalid SQL query by also calling `offset` on the same `Relation`.
      
      This is a niche syntax that is only supported by a few adapters, and can
      be trivially worked around by calling offset explicitly.
      e12c2a6d
    • M
      Use a real migration version number in docs · 97c77160
      Matthew Draper 提交于
      Even though this means more things to change when we bump after a
      release, it's more important that our examples are directly copyable.
      97c77160
    • M
      Schema uses current migration API · 6d2469da
      Matthew Draper 提交于
      6d2469da
    • M
      In 4.2 migrations, `timestamps` defaulted to `null: true` · badaf353
      Matthew Draper 提交于
      .. it also showed a deprecation warning, but we obviously needn't retain
      that.
      badaf353
    • M
      Find the delegate, even in a deeper inheritance tree · f37d92c4
      Matthew Draper 提交于
      f37d92c4
    • M
      Internal test migrations use the private 'Current' version · a6d4e5e5
      Matthew Draper 提交于
      Apart from specific versioning support, our tests should focus on the
      behaviour of whatever version they're accompanying, regardless of when
      they were written.
      
      Application code should *not* do this.
      a6d4e5e5
    • M
      Use a deliberately-invalid migration version in all doc examples · c0af95e0
      Matthew Draper 提交于
      If we use a real version, at best that'll be an onerous update required
      for each release; at worst, it will encourage users to write new
      migrations against an older version than they're using.
      
      The other option would be to leave these bare, without any version
      specifier. But as that's just a variant spelling of "4.2", it would seem
      to raise the same concerns as above.
      c0af95e0