[freeside-users] New Customer reuses Customer ID, has old Invoice data

Kristian Hoffmann khoff at fire2wire.com
Thu Aug 10 09:04:32 PDT 2006


It sounds like either your installation of postgres doesn't seem to know
what a primary key is, you don't have cust_main.custnum set as a primary
key in your database schema (possibly an error while upgrading), or you
deleted old customers manually doing something like "DELETE FROM cust_main
WHERE custnum = n".

I'm guessing the last option which, for the record, is a really really bad
idea.  I can't help much for the customers that are already borked, but
you can prevent further incursions by running the bin/fix-sequences script
found in the source distribution.  That will reset all of the postgres
sequences so that the next primary key assigned for each table will be
greater then the highest primary key for it's table.

Regards,

Kristian Hoffmann
Fire2Wire System Administrator
khoff at fire2wire.com
---

On Thu, 10 Aug 2006, John Gorkos wrote:

> I am using Freeside 1.5.8 under Perl::Mason 1.33, Postgres v 7.4.5, Apache
> 2.2.2 on Mandriva 10.1, Perl 5.8.8, and DBD::Pg 1.49.  I am using the Apache
> 2 patches provided on the mailing list.
>
> I have just installed my first customer after the upgrade to 1.5.8.  The
> customer appears to have been assigned a customer number from one of my first
> customers, 3 years ago.  That customer has since been canceled.  The new
> customer shows the invoice history of the original customer, as well as a
> leftover balance (the old customer skipped town with my equipment).
>
> How do I recover from this, and ensure that new customers get a unique
> customer ID?
>
> John Gorkos
> Wildcat Wireless Internet.
> _______________________________________________
> freeside-users mailing list
> freeside-users at sisd.com
> http://420.am/cgi-bin/mailman/listinfo/freeside-users
>
>



More information about the freeside-users mailing list