koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha/updater updatedatabase [rel_3_0]


From: LAURIN arnaud
Subject: [Koha-cvs] koha/updater updatedatabase [rel_3_0]
Date: Mon, 11 Sep 2006 13:24:03 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         rel_3_0
Changes by:     LAURIN arnaud <alaurin> 06/09/11 13:24:03

Modified files:
        updater        : updatedatabase 

Log message:
        marcxml should be a longtext, some biblios can be more than 65535 char 
long

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/updater/updatedatabase?cvsroot=koha&only_with_tag=rel_3_0&r1=1.157.2.1&r2=1.157.2.2

Patches:
Index: updatedatabase
===================================================================
RCS file: /sources/koha/koha/updater/updatedatabase,v
retrieving revision 1.157.2.1
retrieving revision 1.157.2.2
diff -u -b -r1.157.2.1 -r1.157.2.2
--- updatedatabase      4 Sep 2006 08:39:14 -0000       1.157.2.1
+++ updatedatabase      11 Sep 2006 13:24:03 -0000      1.157.2.2
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: updatedatabase,v 1.157.2.1 2006/09/04 08:39:14 toins Exp $
+# $Id: updatedatabase,v 1.157.2.2 2006/09/11 13:24:03 alaurin Exp $
 
 # Database Updater
 # This script checks for required updates to the database.
@@ -1438,14 +1438,14 @@
 my $definitions;
 my $marcdone=0;
 while ( ( $column, $type, $null, $key, $default, $extra ) = $sth->fetchrow ){
-       $marcdone=1 if ($type eq 'blob' && $column eq 'marc') ;
+       $marcdone=1 if ($type eq 'longtext' && $column eq 'marcxml') ;
 }
 unless ($marcdone) {
        print "moving MARC record to biblioitems table\n";
        # changing marc field type
        $dbh->do('ALTER TABLE `biblioitems` CHANGE `marc` `marc` BLOB NULL 
DEFAULT NULL ');
        # adding marc xml, just for convenience
-       $dbh->do('ALTER TABLE `biblioitems` ADD `marcxml` TEXT CHARACTER SET 
utf8 COLLATE utf8_general_ci NOT NULL ');
+       $dbh->do('ALTER TABLE `biblioitems` ADD `marcxml` LONGTEXT CHARACTER 
SET utf8 COLLATE utf8_general_ci NOT NULL ');
        # moving data from marc_subfield_value to biblio
        $sth = $dbh->prepare('select bibid,biblionumber from marc_biblio');
        $sth->execute;
@@ -1678,6 +1678,9 @@
 exit;
 
 # $Log: updatedatabase,v $
+# Revision 1.157.2.2  2006/09/11 13:24:03  alaurin
+# marcxml should be a longtext, some biblios can be more than 65535 char long
+#
 # Revision 1.157.2.1  2006/09/04 08:39:14  toins
 # sync with rel_2_2.
 #




reply via email to

[Prev in Thread] Current Thread [Next in Thread]