1. 18 1月, 2014 1 次提交
  2. 07 1月, 2014 1 次提交
    • N
      Make change_table use object of current database adapter · eb589fed
      Nishant Modak 提交于
        - Earlier, change_table was creating database-agnostic object.
        - After this change, it will create correct object based on current
          database adapter.
        - This will ensure that create_table and change_table will get same objects.
        - This makes update_table_definition method public and nodoc.
        - Fixes #13577 and #13503
      eb589fed
  3. 24 12月, 2013 1 次提交
  4. 23 12月, 2013 1 次提交
    • S
      Tell how to Create a Database in Error Message · 0ec45cd1
      schneems 提交于
      Currently if you attempt to use a database that does not exist  you get an error:
      
      ```
      PG::ConnectionBad FATAL:  database "db_error" does not exist
      ```
      
      The solution is easy, create and migrate your database however new developers may not know these commands by memory. Instead of requiring the developer to search for a solution, tell them how to fix the problem in the error message:
      
      ```
      ActiveRecord::NoDatabase: FATAL:  database "db_error" does not exist
      Run `$ bin/rake db:create db:migrate` to create your database
      ```
      
      Active Record should not know about `rake db:migrate` so this additional information needs to come from the railtie. Potential alternative implementation suggestions are welcome.
      0ec45cd1
  5. 19 12月, 2013 1 次提交
  6. 14 12月, 2013 1 次提交
  7. 06 12月, 2013 1 次提交
  8. 05 12月, 2013 1 次提交
  9. 12 11月, 2013 1 次提交
  10. 10 11月, 2013 1 次提交
  11. 09 11月, 2013 1 次提交
    • Y
      log bind variables after they were type casted. · 97f0d9a0
      Yves Senn 提交于
      The log output used to be confusing in situation where type casting has
      "unexpected" effects. For example when finding records with a `String`.
      
      BEFORE:
      
      irb(main):002:0> Event.find("im-no-integer")
      D, [2013-11-09T11:10:28.998857 #1706] DEBUG -- :   Event Load (4.5ms)  SELECT "events".* FROM "events" WHERE "events"."id" = $1 LIMIT 1  [["id", "im-no-integer"]]
      
      AFTER:
      
      irb(main):002:0> Event.find("im-no-integer")
      D, [2013-11-09T11:10:28.998857 #1706] DEBUG -- :   Event Load (4.5ms)  SELECT "events".* FROM "events" WHERE "events"."id" = $1 LIMIT 1  [["id", 0]]
      97f0d9a0
  12. 25 10月, 2013 1 次提交
  13. 22 10月, 2013 1 次提交
  14. 14 10月, 2013 2 次提交
  15. 05 10月, 2013 4 次提交
  16. 30 9月, 2013 1 次提交
  17. 12 9月, 2013 1 次提交
    • R
      Check if the SQL is not a prepared statement · f13b2785
      Rafael Mendonça França 提交于
      When the adapter is with prepared statement disabled and the binds array
      is not empty the connection adapter will try to set the binds values and
      will fail. Now we are checking if the adapter has the prepared statement
      disabled.
      
      Fixes #12023
      f13b2785
  18. 08 8月, 2013 1 次提交
  19. 02 8月, 2013 1 次提交
  20. 10 7月, 2013 1 次提交
  21. 20 6月, 2013 1 次提交
    • D
      Handle single quotes in PostgreSQL default column values · 78f62689
      Dylan Markow 提交于
      PostgreSQL escapes single quotes by using an additional single quote.
      When Rails queries the column information, PostgreSQL returns the
      default values with the escaped single quotes.
      
      #extract_value_from_default now converts these to one single quote each.
      
      Fixes #10881.
      78f62689
  22. 15 5月, 2013 1 次提交
  23. 08 5月, 2013 1 次提交
  24. 07 5月, 2013 1 次提交
    • P
      Handle other pk types in PostgreSQL gracefully. · 0e00c6b2
      Patrick Robertson 提交于
      In #10410 it was noted that you can no longer create PK's with the
      type of bigserial in PostgreSQL in 4.0.0.rc1. This is mostly
      because the newer adapter is checking for column type with the
      id column instead of just letting it pass through like it did
      before.
      
      Side effects:
      You may just create a PK column of a type that you really don't
      want to be your PK. As far as I can tell this was allowed in 3.2.X
      and perhaps an exception should be raised if you try and do
      something extremely dumb.
      0e00c6b2
  25. 05 5月, 2013 1 次提交
  26. 03 5月, 2013 1 次提交
  27. 02 5月, 2013 2 次提交
  28. 05 4月, 2013 1 次提交
  29. 26 3月, 2013 3 次提交
  30. 23 3月, 2013 4 次提交