[Koha-patches] [PATCH] BUGFIX fix on 2380 fix, dump to 102

Joshua Ferraro jmf at liblime.com
Fri Aug 1 05:59:08 CEST 2008


Hi Paul,

This bug is marked FIXED, can you clarify what remaining issues there
are and how your patch addresses them

Thanks!

Josh

On Wed, Jul 30, 2008 at 05:03:05PM +0200, paul.poulain at biblibre.com wrote:
> From: Paul POULAIN <paul.poulain at biblibre.com>
> 
> diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl
> index 07685ce..7f172d1 100755
> --- a/installer/data/mysql/updatedatabase.pl
> +++ b/installer/data/mysql/updatedatabase.pl
> @@ -1884,8 +1884,10 @@ if ( C4::Context->preference('Version') < TransformToNum($DBversion) ) {
>  	$dbh->do('ALTER TABLE serialitems MODIFY `serialid` int(11) NOT NULL AFTER itemnumber' );
>  	$dbh->do('ALTER TABLE serialitems DROP KEY serialididx' );
>  	$dbh->do('ALTER TABLE serialitems ADD CONSTRAINT UNIQUE KEY serialitemsidx (itemnumber)' );
> +	# before setting constraint, delete any unvalid data
> +	$dbh->do('DELETE from serialitems WHERE serialid not in (SELECT serial.serialid FROM serial)');
>  	$dbh->do('ALTER TABLE serialitems ADD CONSTRAINT serialitems_sfk_1 FOREIGN KEY (serialid) REFERENCES serial (serialid) ON DELETE CASCADE ON UPDATE CASCADE' );
> -    print "Upgrade to $DBversion done (Updating serialitems table to allow for mulitple items per serial fixing kohabug 2380)\n";
> +    print "Upgrade to $DBversion done (Updating serialitems table to allow for multiple items per serial fixing kohabug 2380)\n";
>      SetVersion($DBversion);
>  }
>  
> -- 
> 1.5.3.2
> 
> _______________________________________________
> Koha-patches mailing list
> Koha-patches at lists.koha.org
> http://lists.koha.org/mailman/listinfo/koha-patches



More information about the Koha-patches mailing list