adding table issuingrules (previously called categoryitem
This commit is contained in:
parent
fb4124707b
commit
f2b3acaf7d
1 changed files with 25 additions and 1 deletions
|
@ -251,7 +251,7 @@ my %requirefields = (
|
||||||
marc_subfield_structure =>{'seealso' => 'char(255)'},
|
marc_subfield_structure =>{'seealso' => 'char(255)'},
|
||||||
bookshelf => {'owner' => 'char(80)',
|
bookshelf => {'owner' => 'char(80)',
|
||||||
'category' => 'char(1)',
|
'category' => 'char(1)',
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
my %dropable_table = (
|
my %dropable_table = (
|
||||||
|
@ -713,6 +713,11 @@ unless ( $existingtables{'z3950servers'} ) {
|
||||||
);
|
);
|
||||||
$sti->execute;
|
$sti->execute;
|
||||||
}
|
}
|
||||||
|
unless ( $existingtables{'issuingrules'} ) {
|
||||||
|
$dbh->do("alter table categoryitem rename issuingrules");
|
||||||
|
print "renaming categoryitem\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#---------------------------------
|
#---------------------------------
|
||||||
# Columns
|
# Columns
|
||||||
|
@ -995,6 +1000,22 @@ if ($items{'bulk'} eq "varchar(30)") {
|
||||||
$sti->execute;
|
$sti->execute;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# creating index in issuingrules if needed
|
||||||
|
#
|
||||||
|
$sth = $dbh->prepare("show index from issuingrules");
|
||||||
|
$sth->execute;
|
||||||
|
my $exists=0;
|
||||||
|
while ( my ( $table, $non_unique, $key_name, $Seq_in_index, $Column_name, $Collation, $cardinality, $sub_part, $Packed, $comment ) = $sth->fetchrow )
|
||||||
|
{
|
||||||
|
if ($key_name eq 'PRIMARY') {
|
||||||
|
$exists=1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
print "Creating index on z3950results\n" unless $exists;
|
||||||
|
$dbh->do('ALTER TABLE issuingrules ADD PRIMARY KEY ( branchcode, categorycode, itemtype )') unless $exists;
|
||||||
|
|
||||||
|
|
||||||
# Populate tables with required data
|
# Populate tables with required data
|
||||||
|
|
||||||
foreach my $table ( keys %tabledata ) {
|
foreach my $table ( keys %tabledata ) {
|
||||||
|
@ -1046,6 +1067,9 @@ $sth->finish;
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
# $Log$
|
# $Log$
|
||||||
|
# Revision 1.77 2004/05/06 14:56:51 tipaul
|
||||||
|
# adding table issuingrules (previously called categoryitem
|
||||||
|
#
|
||||||
# Revision 1.76 2004/05/03 09:32:25 tipaul
|
# Revision 1.76 2004/05/03 09:32:25 tipaul
|
||||||
# adding printcirculationsplit parameter (already existed, but was not in systempref by defaul)
|
# adding printcirculationsplit parameter (already existed, but was not in systempref by defaul)
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue