Forum: Ruby on Rails postgres fixtures and sequence id field

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.
10c122532c00465b809dbf9dc35806a7?d=identicon&s=25 Paolo Negri (Guest)
on 2006-06-12 01:17
(Received via mailing list)
Hi

I've a problem testing my application.
Basicly when tests try to load the fixture in my postgresql database I
obtain the error

currval of sequence "my sequence name" is not yet defined in this
session

The problem is the ID field: basicly the fixtures try to add
explicitly a defined ID but postgres don't like this, even if I build
a brand new DB and try to push the id 1.

How can I make the fixtures load smoothly in the test DB?

My sequence name use a non standard rails name since my DB is coming
from a legacy system.

Thanks

Paolo
This topic is locked and can not be replied to.