Donate Share

Another PostgreSQL Diff Tool

Tracker: Bugs

5 sequence needs to be created before it is referenced - ID: 1649112
Last Update: Comment added ( fordfrog )

This is bug is against "beta17".

Overall, the tool worked very well. However, I ran into this bug.

A new column with added that included
DEFAULT nextval('foo_id_seq').

However, it wasn't until later the sequence was created by the diff:

CREATE SEQUENCE foo_id_seq

The sequence needs to be created before it is referenced.

Also, I noticed there is no final semi-colon at the end of the diff file,
and it seems like there should be.

Thanks!

Mark


Mark Stosberg ( markjugg ) - 2007-01-31 18:50

5

Closed

None

Nobody/Anonymous

None

None

Public


Comments ( 3 )

Date: 2007-02-01 14:15
Sender: fordfrogProject Admin


In just released beta18 sequences are created before tables. In fact all
sequence changes are performed before tables and now not sure how that
affects removal of sequences.

Thank you for your bug report and nice words :-) I'm thinking about
putting them at apgdiff homepage :-)


Date: 2007-02-01 13:34
Sender: markjugg


On further review, there is no semicolon bug. I thought my editor was at
the end of the file, but it wasn't. I has seen this:

CREATE SEQUENCE pet_hit_journal_id_seq


But really I was looking at this:

CREATE SEQUENCE pet_hit_journal_id_seq

START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;

###########

The first one is a complete statement on it's own, which is why I was
confused.

APGDiff helped me resolve dozen of minor differences between a
production and development website (not null, primary keys, indexes,
RI...). The application ran fine on both schemas, but I feel much better
knowing that these little differences have been discovered and resolved
now, thanks to your tool!

Mark


Date: 2007-02-01 09:36
Sender: fordfrogProject Admin


Yeah, you are right, I changed that behavior so sequences are now created
before tables. Anyway I need to clarify the problem about "missing
semicolon" before I release new bugfix. Could you please explain what did
you mean? It's not obvious to me. An example would be also useful.

Thank you.


Attached File

No Files Currently Attached

Changes ( 2 )

Field Old Value Date By
status_id Open 2007-02-01 14:15 fordfrog
close_date - 2007-02-01 14:15 fordfrog