Forum: Ruby on Rails not null constraints added when running rake - is this a "fe

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Pat M. (Guest)
on 2006-04-02 12:26
(Received via mailing list)
After upgrading to Rails 1.1, a lot of my unit tests broke.  Turns out
when I run rake test_units and it migrates the test database, it adds
a not null constraint to every column.  I don't have this specified in
my migration, and apparently it works fine with rake migrate if I do
'rake migrate RAILS_ENV=test', the not null constraints aren't set.
So why when I run tests is it adding the not null constraints?  I'm
using PostgreSQL 8.1.0, fwiw.

Pat
John D. (Guest)
on 2006-04-03 08:17
(Received via mailing list)
Pat M. wrote:
> After upgrading to Rails 1.1, a lot of my unit tests broke.  Turns out
> when I run rake test_units and it migrates the test database, it adds
> a not null constraint to every column.  I don't have this specified in
> my migration, and apparently it works fine with rake migrate if I do
> 'rake migrate RAILS_ENV=test', the not null constraints aren't set.
> So why when I run tests is it adding the not null constraints?  I'm
> using PostgreSQL 8.1.0, fwiw.

Hi Pat,

I have this problem also.  I only get it on Linux with postgres 8.1.
using ruby-postgres.  It works ok on Mac.  Here is the ticket I opened
on it.  Please chime in on the ticket to help it get some traction with
the devs:

http://dev.rubyonrails.org/ticket/4478

In the ticket, one guy mentions trying just the postgres driver (not
ruby-postgres), but that driver errors out for me.

Thanks,
John
This topic is locked and can not be replied to.