[Koha-cvs] CVS: koha/updater updatedatabase,1.55,1.56

Paul POULAIN tipaul at users.sourceforge.net
Mon Jul 7 17:37:22 CEST 2003


Update of /cvsroot/koha/koha/updater
In directory sc8-pr-cvs1:/tmp/cvs-serv14807/updater

Modified Files:
	updatedatabase 
Log Message:


Index: updatedatabase
===================================================================
RCS file: /cvsroot/koha/koha/updater/updatedatabase,v
retrieving revision 1.55
retrieving revision 1.56
diff -C2 -r1.55 -r1.56
*** updatedatabase	7 Jul 2003 15:36:13 -0000	1.55
--- updatedatabase	7 Jul 2003 15:37:20 -0000	1.56
***************
*** 717,724 ****
  			}
  # if it's a primary key, drop the previous pk, before altering the table
  			if ($key eq 'PRI') {
! 				my $sth =$dbh->prepare("alter table $table change $field $field $type $null $key $extra default ?");
  			} else {
! 				my $sth =$dbh->prepare("alter table $table drop primary key, change $field $field $type $null $key $extra default ?");
  			}
  			$sth->execute($default);
--- 717,725 ----
  			}
  # if it's a primary key, drop the previous pk, before altering the table
+ 			my $sth;
  			if ($key eq 'PRI') {
! 				$sth =$dbh->prepare("alter table $table change $field $field $type $null $key $extra default ?");
  			} else {
! 				$sth =$dbh->prepare("alter table $table drop primary key, change $field $field $type $null $key $extra default ?");
  			}
  			$sth->execute($default);
***************
*** 869,874 ****
  
  # $Log$
! # Revision 1.55  2003/07/07 15:36:13  tipaul
! # (again) fix to avoid errors when creating fields that are primary keys and a previous primary key exist.
  #
  # Revision 1.53  2003/07/07 14:11:16  tipaul
--- 870,875 ----
  
  # $Log$
! # Revision 1.56  2003/07/07 15:37:20  tipaul
! # *** empty log message ***
  #
  # Revision 1.53  2003/07/07 14:11:16  tipaul





More information about the Koha-cvs mailing list