Forum: Ruby on Rails postgres fixtures and sequence id field

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Paolo N. (Guest)
on 2006-06-12 03:17
(Received via mailing list)

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

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.


This topic is locked and can not be replied to.