1. 17 3月, 2019 4 次提交
  2. 16 3月, 2019 2 次提交
  3. 14 3月, 2019 1 次提交
  4. 13 3月, 2019 7 次提交
    • Y
      [skip ci] Rails 5.1+ supports bigint primary key · 7de57cfe
      Yasuo Honda 提交于
      Follow up #35573
      7de57cfe
    • A
      Document int Primary Key with create_or_find_by (#35573) · 18ff6020
      Alex Kitchens 提交于
      This commit addresses the issue in
      https://github.com/rails/rails/issues/35543 by making note of the
      growing primary key issue with `create_or_find_by`.
      18ff6020
    • K
      Schema Cache: cache table indexes · 6e3a7d12
      Kasper Timm Hansen 提交于
      Useful to not query for indexes when an application uses schema cache.
      
      Ref https://github.com/rails/rails/pull/35546
      6e3a7d12
    • K
      Modernize size calculation in Schema Cache · f45084c7
      Kasper Timm Hansen 提交于
      Not looking for other contributions like this, but I took the liberty
      since I was already working on this.
      f45084c7
    • K
      Remove Marshal support from SchemaCache · 65f2eeaa
      Kasper Timm Hansen 提交于
      YAML has been used to serialize the schema cache ever since 2016 with
      Rails 5.1: 4c00c6ed
      65f2eeaa
    • R
      Remove unused `Row` class in `SelectManager` · 386e2c73
      Ryuta Kamizono 提交于
      The `Row` class is no longer used since d956772b.
      386e2c73
    • R
      Initialize `@default_timezone` and `@timestamp_decoder` in `add_pg_decoders` · 40316aa9
      Ryuta Kamizono 提交于
      Staled `@default_timezone` would cause an error on `reconnect!` after
      `disconnect!`.
      
      https://buildkite.com/rails/rails/builds/59495#23be8079-3a4f-4375-9991-0a6f874554f2
      
      Steps to reproduce:
      
      ```
      % ARCONN=postgresql bin/test test/cases/adapter_test.rb test/cases/base_test.rb -n "/(?:test_attributes_on_dummy_time|test_reconnect_after_a_disconnect)$/" --seed 15849
      Using postgresql
      Run options: -n "/(?:test_attributes_on_dummy_time|test_reconnect_after_a_disconnect)$/" --seed 15849
      
      # Running:
      
      .
      E
      
      Error:
      ActiveRecord::AdapterTestWithoutTransaction#test_reconnect_after_a_disconnect:
      NoMethodError: undefined method `add_coder' for #<PG::TypeMapAllStrings:0x00007f85ab9dd5b8>
          /Users/kamipo/src/github.com/rails/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:866:in `update_typemap_for_default_timezone'
          /Users/kamipo/src/github.com/rails/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:652:in `exec_no_cache'
          /Users/kamipo/src/github.com/rails/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:636:in `execute_and_clear'
          /Users/kamipo/src/github.com/rails/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:894:in `add_pg_decoders'
          /Users/kamipo/src/github.com/rails/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:744:in `connect'
          /Users/kamipo/src/github.com/rails/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:285:in `rescue in block in reconnect!'
          /Users/kamipo/src/github.com/rails/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:281:in `block in reconnect!'
          /Users/kamipo/.rbenv/versions/2.6.1/lib/ruby/2.6.0/monitor.rb:230:in `mon_synchronize'
          /Users/kamipo/src/github.com/rails/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:280:in `reconnect!'
          /Users/kamipo/src/github.com/rails/rails/activerecord/test/cases/adapter_test.rb:465:in `block in <class:AdapterTestWithoutTransaction>'
      ```
      40316aa9
  5. 11 3月, 2019 2 次提交
    • E
      Prep release · 7c87fd56
      eileencodes 提交于
      * Update RAILS_VERSION
      * Bundle
      * rake update_versions
      * rake changelog:header
      7c87fd56
    • P
      Squish the deprecation messages across the codebase · 538a459a
      Prathamesh Sonpatki 提交于
      Sample example ->
      
      Before:
      
      prathamesh@Prathameshs-MacBook-Pro-2 blog *$ rails server thin
      DEPRECATION WARNING: Passing the Rack server name as a regular argument is deprecated
      and will be removed in the next Rails version. Please, use the -u
      option instead.
      
      After:
      
      prathamesh@Prathameshs-MacBook-Pro-2 squish_app *$ rails server thin
      DEPRECATION WARNING: Passing the Rack server name as a regular argument is deprecated and will be removed in the next Rails version. Please, use the -u option instead.
      538a459a
  6. 10 3月, 2019 4 次提交
  7. 09 3月, 2019 2 次提交
  8. 08 3月, 2019 3 次提交
  9. 07 3月, 2019 6 次提交
  10. 06 3月, 2019 7 次提交
    • K
      Add some whitespace for readability. · 1818c4e8
      Kasper Timm Hansen 提交于
      1818c4e8
    • K
      ba795c9e
    • R
      Allow `remove_foreign_key` with both `to_table` and `options` · fd18b98d
      Ryuta Kamizono 提交于
      Foreign keys could be created to the same table.
      So `remove_foreign_key :from_table, :to_table` is sometimes ambiguous.
      This allows `remove_foreign_key` to remove the select one on the same
      table with giving both `to_table` and `options`.
      fd18b98d
    • E
      Load YAML for rake tasks without parsing ERB · 37d1429a
      eileencodes 提交于
      This change adds a new method that loads the YAML for the database
      config without parsing the ERB. This may seem odd but bear with me:
      
      When we added the ability to have rake tasks for multiple databases we
      started looping through the configurations to collect the namespaces so
      we could do `rake db:create:my_second_db`. See #32274.
      
      This caused a problem where if you had `Rails.config.max_threads` set in
      your database.yml it will blow up because the environment that defines
      `max_threads` isn't loaded during `rake -T`. See #35468.
      
      We tried to fix this by adding the ability to just load the YAML and
      ignore ERB all together but that caused a bug in GitHub's YAML loading
      where if you used multi-line ERB the YAML was invalid. That led us to
      reverting some changes in #33748.
      
      After trying to resolve this a bunch of ways `@tenderlove` came up with
      replacing the ERB values so that we don't need to load the environment
      but we also can load the YAML.
      
      This change adds a DummyCompiler for ERB that will replace all the
      values so we can load the database yaml and create the rake tasks.
      Nothing else uses this method so it's "safe".
      
      DO NOT use this method in your application.
      
      Fixes #35468
      37d1429a
    • A
      [ci skip] Fix typo beacuse -> because · 66468568
      Abhay Nikam 提交于
      66468568
    • R
      Ensure `clear_cache!` clears the prepared statements cache · a67841eb
      Ryuta Kamizono 提交于
      Since #23461, all adapters supports prepared statements, so that clears
      the prepared statements cache is no longer database specific.
      
      Actually, I struggled to identify the cause of random CI failure in
      #23461, that was missing `@statements.clear` in `clear_cache!`.
      
      This extracts `clear_cache!` to ensure the common concerns in the
      abstract adapter.
      a67841eb
    • B
      Add insert_all to ActiveRecord models (#35077) · 91ed21b3
      Bob Lail 提交于
      Adds a method to ActiveRecord allowing records to be inserted in bulk without instantiating ActiveRecord models. This method supports options for handling uniqueness violations by skipping duplicate records or overwriting them in an UPSERT operation.
      
      ActiveRecord already supports bulk-update and bulk-destroy actions that execute SQL UPDATE and DELETE commands directly. It also supports bulk-read actions through `pluck`. It makes sense for it also to support bulk-creation.
      91ed21b3
  11. 05 3月, 2019 1 次提交
  12. 04 3月, 2019 1 次提交