[freeside-devel] And now for something completely different(svc_* keys)

Dave Burgess burgess at neonramp.com
Wed Nov 28 12:17:12 PST 2001

I figured it out (and will be including it in my missive on building a new
server from an old accounting system).

The cust_svc table uses the svcnum fields from each of the svc_* tables
independently.  This means that each service must be represented by a svcnum
entry that is unique within the family of tables.  Translated into database,
the svcnum in the variant part of the category relationship in part_svc is
unique within the domain of the invariant transivity (as opposed to what I
thought earlier, e.g., the variant parts were intransitive with regard to the
invariant portion).

Yeah, what he said.  I love teaching this stuff.

Anyway, I found that I couldn't look get the 'existing dial-up' thing to work
because the svcnums for the svc_acct records weren't in the cust_svc record.
Once I added dummy records for each svc_acct record into the cust_svc table,
I was able to attach dial-ups and DSLs to the cust_main records through the
pkg/svc entries in the web pages.  From this, I have discerned that each
entry in the svc_* tables must have a unique identifier.  Right?

Which leads us to the next question:

I have a package (DSL) which, as a consequence of being a POTS service, needs
a dial-up backup.  This means that I have two services which point to the
same svc_acct record in the package.  This has the side effect of changing
from one to the other, instead of setting both to the username in question.
What is the canonical workaround?   As far as I can tell, there are only
really two choices:

1)  Set up a different username and password entry for the DSL and the
dial-up.  It seems a little extreme, but should be doable.
2)  Assume that all DSL have an associated dial-up.

It gets even more interesting when I start looking at things like DS-0
channels on a fractional DS-1.  Right now, we track the channels as
additional services.  I've got them hooked into the domain record for the
DS1, but that's not satisfactory, since only one of the svc_domain entries in
the cust_svc table will be active at a time.

Give it some thought.  I'm almost through entering the data for my database
and should be ready start down the next set of data shortly.


Kristian Hoffmann wrote:

> On Tue, 27 Nov 2001, Dave Burgess wrote:
> ---snip---
> > Finally, I'd like to know if anyone other than me is even reading the
> > messages on this list?
> Pong!  I've been laying low because I've promised piles of merge patches
> but haven't had the time to make anything useful.  Our heavily modified
> 1.2.3-ish installation is working nicely and I'm afraid to touch it.  I'm
> going to have to very shortly so I might actually start getting some
> patches checked in.  One can hope.
> -Kristian

More information about the freeside-devel mailing list