[Koha-cvs] CVS: koha/updater updatedatabase,1.81,1.82

Paul POULAIN tipaul at users.sourceforge.net
Thu Jun 3 14:47:00 CEST 2004


Update of /cvsroot/koha/koha/updater
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21115/updater

Modified Files:
	updatedatabase 
Log Message:
* frameworks and itemtypes are independant

WARNING : will work only if applied to a 2.0 base. some modifs have been done since last commit that will NOT be applied if you run updatedatabase again.

Index: updatedatabase
===================================================================
RCS file: /cvsroot/koha/koha/updater/updatedatabase,v
retrieving revision 1.81
retrieving revision 1.82
diff -C2 -r1.81 -r1.82
*** updatedatabase	28 May 2004 09:56:21 -0000	1.81
--- updatedatabase	3 Jun 2004 12:46:58 -0000	1.82
***************
*** 213,216 ****
--- 213,222 ----
  					authtypetext char(255) not NULL,
  					auth_tag_to_report char(3) not NULL,
+ 					PRIMARY KEY (authtypecode)
+ 			)",
+ 	biblio_framework => "(
+ 					frameworkcode char(4) not NULL,
+ 					frameworktext char(255) not NULL,
+ 					PRIMARY KEY (frameworkcode)
  			)",
      auth_subfield_structure => "(
***************
*** 227,231 ****
  					seealso char(255) default NULL,
  					PRIMARY KEY  (authtypecode,tagfield,tagsubfield),
! 					KEY tab (tab)
  					)",
      auth_tag_structure => "(
--- 233,237 ----
  					seealso char(255) default NULL,
  					PRIMARY KEY  (authtypecode,tagfield,tagsubfield),
! 					KEY tab (authtypecode,tab)
  					)",
      auth_tag_structure => "(
***************
*** 247,251 ****
  						KEY origincode (origincode),
  						) ",
!     marc_subfield_table => "(
  						subfieldid bigint(20) unsigned NOT NULL auto_increment,
  						authid bigint(20) unsigned NOT NULL default '0',
--- 253,257 ----
  						KEY origincode (origincode),
  						) ",
!     auth_subfield_table => "(
  						subfieldid bigint(20) unsigned NOT NULL auto_increment,
  						authid bigint(20) unsigned NOT NULL default '0',
***************
*** 323,329 ****
      z3950servers      => { 'syntax'      => 'char(80)' },
  	marc_tag_structure =>{
! 							'itemtype' => 'char(4) not NULL default \'\''},
      marc_subfield_structure =>{'seealso'  => 'char(255)',
! 							'itemtype' => 'char(4) not NULL default \'\'',
  							'hidden' => 'tinyint(1)',
  							'isurl' => 'tinyint(1)',
--- 329,335 ----
      z3950servers      => { 'syntax'      => 'char(80)' },
  	marc_tag_structure =>{
! 							'frameworkcode' => 'char(4) not NULL default \'\''},
      marc_subfield_structure =>{'seealso'  => 'char(255)',
! 							'frameworkcode' => 'char(4) not NULL default \'\'',
  							'hidden' => 'tinyint(1)',
  							'isurl' => 'tinyint(1)',
***************
*** 332,335 ****
--- 338,342 ----
      					'category' => 'char(1)',
  				},
+     marc_biblio        => { 'frameworkcode' => 'char(4) not NULL default \'\'' },
  );
  
***************
*** 666,669 ****
--- 673,685 ----
  	    type		=> 'free'
          },
+         {
+             uniquefieldrequired => 'variable',
+             variable            => 'ISBD',
+ 	    forceupdate		=> { 'explanation' => 1,
+ 	    			     'type' => 1 },
+             value               => 'Fill with appropriate value...',
+             explanation => 'ISBD',
+ 	    type		=> 'free'
+         },
      ],
  
***************
*** 1002,1005 ****
--- 1018,1028 ----
  $dbh->do("ALTER TABLE `borrowers` CHANGE `borrowernumber` `borrowernumber` INTEGER auto_increment");
  
+ # changing indexes in marc_*_structure to use frameworkcode
+ $dbh->do('alter table marc_subfield_structure drop index tab');
+ $dbh->do('create index tab on marc_subfield_structure (frameworkcode,tab)');
+ $dbh->do('alter table marc_subfield_structure drop index kohafield');
+ $dbh->do('create index kohafield on marc_subfield_structure (frameworkcode,kohafield)');
+ 
+ 
  # extending the timestamp in branchtransfers...
  my %branchtransfers;
***************
*** 1105,1112 ****
  
  $dbh->do('ALTER TABLE marc_tag_structure drop primary key');
! $dbh->do('ALTER TABLE marc_tag_structure ADD PRIMARY KEY ( itemtype, tagfield )');
  
  $dbh->do('ALTER TABLE marc_subfield_structure drop primary key');
! $dbh->do('ALTER TABLE marc_subfield_structure ADD PRIMARY KEY ( itemtype, tagfield, tagsubfield )');
  
  # Populate tables with required data
--- 1128,1135 ----
  
  $dbh->do('ALTER TABLE marc_tag_structure drop primary key');
! $dbh->do('ALTER TABLE marc_tag_structure ADD PRIMARY KEY ( frameworkcode, tagfield )');
  
  $dbh->do('ALTER TABLE marc_subfield_structure drop primary key');
! $dbh->do('ALTER TABLE marc_subfield_structure ADD PRIMARY KEY ( frameworkcode, tagfield, tagsubfield )');
  
  # Populate tables with required data
***************
*** 1161,1164 ****
--- 1184,1192 ----
  
  # $Log$
+ # Revision 1.82  2004/06/03 12:46:58  tipaul
+ # * frameworks and itemtypes are independant
+ #
+ # WARNING : will work only if applied to a 2.0 base. some modifs have been done since last commit that will NOT be applied if you run updatedatabase again.
+ #
  # Revision 1.81  2004/05/28 09:56:21  tipaul
  # bugfix





More information about the Koha-cvs mailing list