authtypecode char(10) not NULL,
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 => "(
authtypecode char(10) NOT NULL default '',
value_builder char(80) default NULL,
seealso char(255) default NULL,
PRIMARY KEY (authtypecode,tagfield,tagsubfield),
- KEY tab (tab)
+ KEY tab (authtypecode,tab)
)",
auth_tag_structure => "(
authtypecode char(10) NOT NULL default '',
PRIMARY KEY (authid),
KEY origincode (origincode),
) ",
- marc_subfield_table => "(
+ auth_subfield_table => "(
subfieldid bigint(20) unsigned NOT NULL auto_increment,
authid bigint(20) unsigned NOT NULL default '0',
tag char(3) NOT NULL default '',
'options' => 'text' },
z3950servers => { 'syntax' => 'char(80)' },
marc_tag_structure =>{
- 'itemtype' => 'char(4) not NULL default \'\''},
+ 'frameworkcode' => 'char(4) not NULL default \'\''},
marc_subfield_structure =>{'seealso' => 'char(255)',
- 'itemtype' => 'char(4) not NULL default \'\'',
+ 'frameworkcode' => 'char(4) not NULL default \'\'',
'hidden' => 'tinyint(1)',
'isurl' => 'tinyint(1)',
},
bookshelf => {'owner' => 'char(80)',
'category' => 'char(1)',
},
+ marc_biblio => { 'frameworkcode' => 'char(4) not NULL default \'\'' },
);
my %dropable_table = (
explanation => 'if set to 1, suggestions are activated in OPAC',
type => 'free'
},
+ {
+ uniquefieldrequired => 'variable',
+ variable => 'ISBD',
+ forceupdate => { 'explanation' => 1,
+ 'type' => 1 },
+ value => 'Fill with appropriate value...',
+ explanation => 'ISBD',
+ type => 'free'
+ },
],
);
# making borrowernumber an auto_increment field
$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;
$dbh->do('ALTER TABLE issuingrules ADD PRIMARY KEY ( branchcode, categorycode, itemtype )') unless $exists;
$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_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 ( itemtype, tagfield, tagsubfield )');
+$dbh->do('ALTER TABLE marc_subfield_structure ADD PRIMARY KEY ( frameworkcode, tagfield, tagsubfield )');
# Populate tables with required data
exit;
# $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
#