That makes sense but I was trying to use one sequence for 5 different
tables
so the ids would be unique across all the tables. If the sequence has to
have the same name as the table, that would be impossible. Is that
what’s
happening here?
Date: Mon, 7 Nov 2005 16:12:31 -0800 (PST)
From: CSN [email protected]
Subject: Re: [Rails] using postgres sequences on id columns
To: [email protected]
Message-ID: [email protected]
Content-Type: text/plain; charset=iso-8859-1
SERIAL is just an alias for ‘integer no null default
nextval(‘sequence’)…’ Looks like Rails is looking
for a sequence named project_id_seq yet you created
one named unique_sequence.
CSN