1. 10 3月, 2017 1 次提交
  2. 27 2月, 2017 2 次提交
  3. 26 2月, 2017 1 次提交
  4. 21 2月, 2017 1 次提交
    • E
      Ensure test threads share a DB connection · d6466beb
      eileencodes 提交于
      This ensures multiple threads inside a transactional test to see consistent
      database state.
      
      When a system test starts Puma spins up one thread and Capybara spins up
      another thread. Because of this when tests are run the database cannot
      see what was inserted into the database on teardown. This is because
      there are two threads using two different connections.
      
      This change uses the statement cache to lock the threads to using a
      single connection ID instead of each not being able to see each other.
      This code only runs in the fixture setup and teardown so it does not
      affect real production databases.
      
      When a transaction is opened we set `lock_thread` to `Thread.current` so
      we can keep track of which connection the thread is using. When we
      rollback the transaction we unlock the thread and then there will be no
      left-over data in the database because the transaction will roll back
      the correct connections.
      
      [ Eileen M. Uchitelle, Matthew Draper ]
      d6466beb
  5. 14 2月, 2017 1 次提交
  6. 13 2月, 2017 3 次提交
  7. 09 2月, 2017 1 次提交
  8. 31 1月, 2017 1 次提交
    • J
      Simplify Postgres query for column_definitions() · f9c6cbd5
      Jordan Lewis 提交于
      column_definitions() needs to fetch the collation for every column, if
      present. Previously, it did so using a correlated subquery - a subquery
      that references results from the outer scope.
      
      This patch updates the query to remove the subquery in favor of a
      simpler and more efficient JOIN clause.
      
      Running the two queries through EXPLAIN against Postgres additionally
      shows that the original form with a correlated subquery requires a
      Nested Loop Left Join, while the new form with a simple JOIN can use a
      more efficient Merge Left Join.
      f9c6cbd5
  9. 22 1月, 2017 1 次提交
  10. 04 1月, 2017 1 次提交
  11. 29 12月, 2016 1 次提交
  12. 24 12月, 2016 2 次提交
  13. 06 12月, 2016 3 次提交
  14. 03 12月, 2016 1 次提交
  15. 02 12月, 2016 1 次提交
    • S
      Stop using the `pg` Float encoder · 22042331
      Sean Griffin 提交于
      PG's type map assumes that all Ruby floats are going to a field with an
      OID of type float4 or float8, and generates text which is invalid syntax
      for other types. Since the gem can handle floats properly without this
      encoder (albeit slightly slower), we can continue to use that as we have
      in prior versions of Rails.
      
      Fixes #27246
      22042331
  16. 23 11月, 2016 1 次提交
    • Y
      For `PostgreSQL >= 9.4` use `gen_random_uuid()` · b915b11c
      Yaw Boakye 提交于
      Since 9.4, PostgreSQL recommends using `pgcrypto`'s `gen_random_uuid()`
      to generate version 4 UUIDs instead of the functions in the `uuid-ossp`
      extension.
      
      These changes uses the appropriate UUID function depending on the
      underlying PostgreSQL server's version, while maintaining
      `uuid_generate_v4()` in older migrations.
      b915b11c
  17. 28 10月, 2016 1 次提交
  18. 14 10月, 2016 1 次提交
  19. 14 9月, 2016 1 次提交
  20. 01 9月, 2016 3 次提交
    • N
      Fix case insensitive check for text column in pg · 4c2f7ee3
      nanaya 提交于
      There's no 'text to text' casting in the cast table so the feature detection fails.
      4c2f7ee3
    • N
      Use proper casting · 501e979e
      nanaya 提交于
      501e979e
    • S
      Remove deprecated handling of PG Points · b347156b
      Sean Griffin 提交于
      There are some minor changes to the point type as I had forgotten that
      this will affect the behavior of `t.point` in migrations and the schema
      dumper so we need to handle those as well.
      
      I'll say this again so I can convince myself to come up with a better
      structure... TYPES SHOULD NOT CARE ABOUT SCHEMA DUMPING AND WE NEED TO
      BETTER SEPARATE THESE.
      b347156b
  21. 26 8月, 2016 1 次提交
  22. 07 8月, 2016 2 次提交
  23. 05 8月, 2016 2 次提交
  24. 26 7月, 2016 1 次提交
  25. 19 7月, 2016 1 次提交
  26. 24 5月, 2016 1 次提交
  27. 21 5月, 2016 1 次提交
  28. 30 4月, 2016 1 次提交
  29. 25 4月, 2016 2 次提交