Commits on Jun 2, 2012
  1. Fix jdbc adapter when DriverManager#getConnection fails, bump version…

    jeremyevans committed Jun 2, 2012
    … to 3.36.1 (Fixes #488)
    This is completely my fault, as the most basic code review should
    have caught this.  It wasn't caught by the test suite since
    DriverManager.getConnection does not fail on any of the jdbc
    adapter tests in my environment (and I test on 10 separate jdbc
    Thanks to Alex Portnov for the heads up.
Commits on Jun 1, 2012
  1. Bump version to 3.36.0

    jeremyevans committed Jun 1, 2012
Commits on May 31, 2012
  1. Update CHANGELOG

    jeremyevans committed May 31, 2012
  2. Unsigned integer type with 10 digits can potentially contain values

    r-stu31 committed May 31, 2012
    which don't fit signed integer type. Regard such columns as Bignum,
    so that bigint type will be used in target database.
  3. Namespace indexes when copying databases in some cases

    jeremyevans committed May 31, 2012
    If copying from a database without a global index namespace (e.g.
    MySQL) to a database with a global index namespace (e.g. PostgreSQL),
    the previous copying could break if you had indexes with the same
    name in both tables.  To work around this, prepend the table name
    to the index name when copying.
    Note that if the index name exactly matches Sequel's default name,
    it will not do any additional namespacing.
  4. Betting handling of :read_only and :deferrable options for PostgreSQL…

    jeremyevans committed May 31, 2012
    … transactions
    If they are given and set to nil, ignore them instead of assuming
    they mean the same thing as false.
Commits on May 30, 2012
  1. Allow Model#from_json in the json_serializer plugin to use set_fields…

    jeremyevans committed May 30, 2012
    … if a :fields option is given
    Additionally, pass the options hash to set_fields, so you can use
    the :missing=>:skip and :missing=>:raise options.
  2. Support :using option to set_column_type on PostgreSQL, to force a sp…

    jeremyevans committed May 30, 2012
    …ecific conversion from the old value to the new value
    USING allows you to convert a column from one type to another even
    if there is no specific typecast for the conversion.  It's very
    flexible, even allowing other columns in the same row to be
  3. Drop indexes in the reverse order that they were added in the schema …

    jeremyevans committed May 30, 2012
    I can't imagine the previous way breaking things, but for consistency,
    the schema dumper should always have the down block do the reverse
    of the up block in the reverse order.
  4. Make schema_dumper :index_names=>:namespace only affect databases tha…

    jeremyevans committed May 30, 2012
    …t use a per-table index namespace
    If the database uses a global index namespace, the index names
    are already required to be unique, so there is no point in
    namespacing them.
  5. Add Database#global_index_namespace? method

    jeremyevans committed May 30, 2012
    This checks if the index namespace is global, or whether there is
    a separate index namespace per table.  The default is true since
    that is what most databases seem to use, with MySQL, MSSQL, and
    Oracle being exceptions.
    It's a shame this wasn't here in the beginning, since this
    should be used by the default_index_name method to omit the
    table name if indexes are already namespaced per table.  For
    backward compatibility, that unfortunately cannot be done.
  6. Fix nondeterminism after schema dumper spec change on ruby 1.8

    jeremyevans committed May 30, 2012
    On ruby 1.8, hashes don't have a set order, which makes checks
    for specific strings a pain.  Just sidestep the issue in this case
    by not using unique, since that's not what we are testing for
  7. Fix typecasting of time columns on jdbc/postgres, before could be off…

    jeremyevans committed May 30, 2012
    … by a millisecond
    I was getting this occassional failure on the jdbc/postgres tests,
    which I tracked down to the floating point addition done here.
    Instead of doing floating point addition after time parsing, put
    the correct milliseconds as part of the string, so that the time
    parsing code can get it correct without the need to worry about
    rational numbers.
  8. Make Database#transaction on PostgreSQL recognize :read_only and :def…

    jeremyevans committed May 30, 2012
    …errable options
    In addition to setting the transaction isolation level, PostgreSQL
    also supports these additional options.  READ ONLY ensures that
    most data changing commands are not allowed.  DEFERRABLE is only
    important for transactions that are both SERIALIZABLE and READ
    ONLY, in which case it has less overhead than a standard
    SERIALIZABLE transaction.
  9. Add support for :index_names option. It provides a facility to omit

    r-stu31 committed May 30, 2012
    names of indexes from the dump and a facility to prepend table name.
  10. Edit the nested_attributes :transform proc - switch the order of the …

    chanks committed May 30, 2012
    …arguments and expect it to return an attributes hash.
  11. Let nested_attributes take a proc as a :transform option, which is yi…

    chanks committed May 30, 2012
    …elded both each attribute hash and the parent object itself.
Commits on May 29, 2012
  1. Nested attributes plugin: support creating children with primary keys…

    chanks committed May 29, 2012
    … passed through the attributes hash.
    This adds an option to the nested_attributes declaration: :unmatched_key. Set it to :create to allow the creation of new children when an attributes hash contains an unmatched primary key. The default setting is :raise, which throws an error when an unmatched primary key is supplied. You can also set it to :ignore, which ignores any attributes hashes with unmatched primary keys. Setting :strict=>false is the same as :unmatched_pk=>:ignore, for backwards compatibility.
    One small backwards incompatibility: when :unmatched_pk=>:ignore (or :strict=>false), the nested_attributes_update and nested_attributes_remove methods are no longer called when no children match the supplied primary key. Anyone overriding those methods should be aware of this.
  2. Add a more detailed description of the eager loading key hash on the …

    jeremyevans committed May 29, 2012
    …advanced association page
  3. Attempt to detect more disconnect errors in the mysql2 adapter

    jeremyevans committed May 29, 2012
    Thanks to brianmario for some additional input.  If the
    connection object is available, call ping on it to see if
    the connection is alive, and assume disconnection if not.
    In addition to checking to the exception message, also check
    the sql_state, similar to what is done in the JDBC adapter.
    Not all disconnect errors have similar SQL states, so continue
    to use the exception message as a fallback.
  4. Add Migrator.check_current, cleanup Migrator.is_current? commit

    jeremyevans committed May 29, 2012
    This cleans up the Migrator.is_current? commit, adding back the
    spec it removed and adding docs.  It also adds the requested
    method to raise an exception if there are unapplied migrations.
Commits on May 28, 2012