1. 01 3月, 2013 1 次提交
  2. 28 2月, 2013 1 次提交
  3. 25 2月, 2013 1 次提交
  4. 16 2月, 2013 2 次提交
  5. 14 2月, 2013 1 次提交
  6. 12 2月, 2013 1 次提交
  7. 07 2月, 2013 2 次提交
  8. 30 1月, 2013 2 次提交
  9. 29 1月, 2013 3 次提交
  10. 24 1月, 2013 1 次提交
  11. 23 1月, 2013 1 次提交
  12. 07 1月, 2013 2 次提交
  13. 06 1月, 2013 1 次提交
  14. 05 1月, 2013 1 次提交
  15. 16 12月, 2012 1 次提交
  16. 09 12月, 2012 1 次提交
    • A
      Session variables for mysql, mysql2, and postgresql adapters can be set · 97d06e8c
      Aaron Stone 提交于
      in the new 'variables:' hash in each database config section in database.yml.
      The key-value pairs of this hash will be sent in a 'SET key = value, ...'
      query on new database connections.
      
      The configure_connection methods from mysql and mysql2 into are
      consolidated into the abstract_mysql base class.
      97d06e8c
  17. 14 10月, 2012 3 次提交
    • A
      #7914 Remove code for unsupported postgreSQL version. · 8fb841bd
      Arturo Pie 提交于
      Remove parsing of character type default values for 8.1 formatting since
      Rails doesn't support postgreSQL 8.1 anymore.
      
      Remove misleading comment unrelated to code.
      8fb841bd
    • A
      #7914 Using a better way to get the defaults from db. · 40475cf3
      Arturo Pie 提交于
      According to postgreSQL documentation:
      (http://www.postgresql.org/docs/8.2/static/catalog-pg-attrdef.html)
      we should not be using 'adsrc' field because this field is unaware of
      outside changes that could affect the way that default values are
      represented. Thus, I changed the queries to use
      "pg_get_expr(adbin, adrelid)" instead of the historical "adsrc" field.
      40475cf3
    • A
      #7914 get default value when type uses schema name · 2da85edd
      Arturo Pie 提交于
      PostgreSQL adapter properly parses default values when using multiple
      schemas and domains.
      
      When using domains across schemas, PostgresSQL prefixes the type of the
      default value with the name of the schema where that type (or domain) is.
      
      For example, this query:
      ```
      SELECT a.attname, d.adsrc
      FROM pg_attribute a LEFT JOIN pg_attrdef d
      ON a.attrelid = d.adrelid AND a.attnum = d.adnum
      WHERE a.attrelid = "defaults"'::regclass
      AND a.attnum > 0 AND NOT a.attisdropped
      ORDER BY a.attnum;
      ```
      
      could return something like "'<default_value>'::pg_catalog.text" or
      "(''<default_value>'::pg_catalog.text)::text" for the text columns with
      defaults.
      
      I modified the regexp used to parse this value so that it ignores
      anything between ':: and \b(?:character varying|bpchar|text), and it
      allows to have optional parens like in the above second example.
      2da85edd
  18. 09 10月, 2012 1 次提交
  19. 21 9月, 2012 1 次提交
    • J
      Support for specifying transaction isolation level · 392eeecc
      Jon Leighton 提交于
      If your database supports setting the isolation level for a transaction,
      you can set it like so:
      
        Post.transaction(isolation: :serializable) do
          # ...
        end
      
      Valid isolation levels are:
      
      * `:read_uncommitted`
      * `:read_committed`
      * `:repeatable_read`
      * `:serializable`
      
      You should consult the documentation for your database to understand the
      semantics of these different levels:
      
      * http://www.postgresql.org/docs/9.1/static/transaction-iso.html
      * https://dev.mysql.com/doc/refman/5.0/en/set-transaction.html
      
      An `ActiveRecord::TransactionIsolationError` will be raised if:
      
      * The adapter does not support setting the isolation level
      * You are joining an existing open transaction
      * You are creating a nested (savepoint) transaction
      
      The mysql, mysql2 and postgresql adapters support setting the
      transaction isolation level. However, support is disabled for mysql
      versions below 5, because they are affected by a bug
      (http://bugs.mysql.com/bug.php?id=39170) which means the isolation level
      gets persisted outside the transaction.
      392eeecc
  20. 15 9月, 2012 2 次提交
  21. 14 9月, 2012 1 次提交
    • D
      Moves column dump specific code to a module included in AbstractAdapter · 4544d2bc
      Dan McClain 提交于
      Having column related schema dumper code in the AbstractAdapter. The
      code remains the same, but by placing it in the AbstractAdapter, we can
      then overwrite it with Adapter specific methods that will help with
      Adapter specific data types.
      
      The goal of moving this code here is to create a new migration key for
      PostgreSQL's array type. Since any datatype can be an array, the goal is
      to have ':array => true' as a migration option, turning the datatype
      into an array. I've implemented this in postgres_ext, the syntax is
      shown here: https://github.com/dockyard/postgres_ext#arrays
      
      Adds array migration support
      
      Adds array_test.rb outlining the test cases for array data type
      Adds pg_array_parser to Gemfile for testing
      Adds pg_array_parser to postgresql_adapter (unused in this commit)
      
      Adds schema dump support for arrays
      
      Adds postgres array type casting support
      
      Updates changelog, adds note for inet and cidr support, which I forgot to add before
      
      Removing debugger, Adds pg_array_parser to JRuby platform
      
      Removes pg_array_parser requirement, creates ArrayParser module used by
      PostgreSQLAdapter
      4544d2bc
  22. 07 9月, 2012 1 次提交
  23. 06 9月, 2012 1 次提交
  24. 05 9月, 2012 1 次提交
  25. 03 9月, 2012 1 次提交
  26. 22 8月, 2012 1 次提交
  27. 03 8月, 2012 1 次提交
  28. 17 7月, 2012 2 次提交
  29. 01 7月, 2012 1 次提交
  30. 29 6月, 2012 1 次提交