[Koha-patches] [PATCH] bug_4002: issues referential integrity

Srdjan srdjan at catalyst.net.nz
Thu Apr 14 01:48:59 CEST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You are right Galen, will correct that.

Cheers,
Srdjan

On 14/04/11 07:47, Galen Charlton wrote:
> Hi,
>
> On Wed, Apr 13, 2011 at 1:17 AM, Srdjan Jankovic
<srdjan at catalyst.net.nz> wrote:
>> + $dbh->do("DELETE FROM issues WHERE NOT EXISTS (SELECT * FROM
borrowers WHERE borrowernumber = issues.borrowernumber)");
>> + $dbh->do("DELETE FROM issues WHERE NOT EXISTS (SELECT * FROM items
WHERE itemnumber = issues.itemnumber)");
>
> Since there is a decent chance that such rows used to refer to actual
> loans and might have value for statistical purposes, they ought to be
> moved to old_issues before being deleted.
>
> Regards,
>
> Galen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2mNmsACgkQX6p/D9UE7dz7RgCeMfqER8GLXEUUOvMhOAhMAeLj
IrwAnijc/QoC9fIvtfI78WbbEm44BagW
=Jk7D
-----END PGP SIGNATURE-----



More information about the Koha-patches mailing list