On 3/5/06, Tom M. [email protected] wrote:
It seems that version doesn’t play nicely with migrations.
Columns defined nullable (either implicitly or explicity) don’t get
created as nullable.
I doubt it is driver problem, as migrations are Rails feature.
What test failures you had except those I mentioned?
I’m curious about your comment on return values. With the release
version of the driver:
http://ruby.scripting.ca/postgres/archive/ruby-postgres-0.7.1.tar.gz
I get true/false for boolean, Date for date columns, and Time for
timestamp with Rail 1.0. Perhaps it’s the Rails adapter doing the
conversion as opposed to the driver?
Yes, ActiveRecord performs conversion if the given value (from driver)
is a String.
And here is example of difference in driver behaviour:
ruby-postgres-0.7.1:
c = PGconn.new; c.query(“select true, false, 1, 2.4::float, ‘test’,
now()::date, now()”)
=> [[“t”, “f”, “1”, “2.4”, “test”, “2006-03-06”, “2006-03-06
09:39:56.859984+02”]]
ruby-postgres-20051221:
c = PGconn.new; c.query(“select true, false, 1, 2.4::float, ‘test’,
now()::date, now()”)
=> [[true, false, 1, 2.4, “test”, #<Date: 4907601/2,0,2299161>,
#<DateTime: 212008390801712003/86400000000,1/12,2299161>]]
In short, I’m a big believer in using the latest version, but from
my perspective, the release version works perfectly with Rails 1.0,
and the snapshot version does not.
As for me, snapshot version works better outside Rails 