[Koha-devel] Constraints on issues tables

Paul POULAIN paul.poulain at free.fr
Thu Oct 16 11:14:04 CEST 2008


Galen Charlton a écrit :
> Hi,
> 
> I've found at least one Koha database that has multiple issues rows
> for the same item but different patrons.  This doesn't map well to the
> reality of loaning physical items, unless somebody's slipped in a Star
> Trek-style replicator feature, so I propose the following changes to
> constraints on the issues table:
> 
> 1. Make itemnumber the primary key (and not null) - an item can be
> issued only once at any given time.
> 2. Make borrowernumber not null - a loan must be to a specific patron,
> and if the item is detached from the patron, there's no longer a loan.
I plan to say "no" here, but thinking of it, you're right...
in many countries, the law requires that we anonymize the issues. So we 
set borrowernumber=0, but keep track of the fact that we issue item N to 
someone.
So in old_issues, this constraint can't be set.
in issues, it can, as we won't anonimyze an issue that is not returned.

> 3. Make renewals not null with a default value of 0.
> 4. Make issuedate not null - a loan must have started at a specific
> time; during a migration, if the issue date is not known, a made-up
> date can be supplied.

so, it's OK for me.

-- 
Paul POULAIN
http://www.biblibre.com
Expert en Logiciels Libres pour l'info-doc
NOUVEAU TELEPHONE : 04 91 81 35 08



More information about the Koha-devel mailing list