Hi
On 6/16/07, Robert Fraser <..hidden..> wrote:
>
>
>
>
> On 6/16/07, Chris Travers < ..hidden..> wrote:
> > On 6/15/07, Robert Fraser <..hidden..> wrote:
> > > Hi
> > >
> > > I am getting 2 of these (vendor and customer) when I try to manually
upgrade
> > > from Sql-ledger 2.6.5 to Ledgersmb 1.1.12 :
> > >
> > >
psql:/usr/local/lib/egsql-ledger/sql/Pg-upgrade-2.6.17-2.6.18.sql:211:
> > > ERROR: duplicate key violates unique constraint "transactions_pkey"
> > >
> > Try running the Pg-upgrade scripts manually and see where they fail.
> > This can be done in psql or Pgadmin III.
>
>
>
> Thanks Chris
>
> It is failing at line 139 and line 211 of
>
>
/usr/local/lib/egsql-ledger/sql/Pg-upgrade-2.6.17-2.6.18.sql
>
> INSERT INTO transactions (id, table_name) SELECT id, 'customer' FROM
customer;
>
> and
>
> INSERT INTO transactions (id, table_name) SELECT id, 'vendor' FROM vendor;
>
> There seem to be about 10 duplicate ids from customer and 5 from vendor
>
> Cheers
> Rob
I assume that for some reason SQL-Ledger has lost integrity for these rows
with duplicate ids (this instance of SQL-Ledger has been in use for quite a
while). Do I need to choose one of the tables and change the offending ids
to something unique? I guess depending on which one I choose to change, the
id may be a foreign key in another relation?
Thanks
Rob