Lines 83-89
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
Link Here
|
83 |
$dbh->do("ALTER TABLE `virtualshelfcontents` ADD `biblionumber` INT( 11 ) NOT NULL default '0' AFTER shelfnumber"); |
83 |
$dbh->do("ALTER TABLE `virtualshelfcontents` ADD `biblionumber` INT( 11 ) NOT NULL default '0' AFTER shelfnumber"); |
84 |
$dbh->do("UPDATE `virtualshelfcontents` SET biblionumber=(SELECT biblionumber FROM items WHERE items.itemnumber=virtualshelfcontents.itemnumber)"); |
84 |
$dbh->do("UPDATE `virtualshelfcontents` SET biblionumber=(SELECT biblionumber FROM items WHERE items.itemnumber=virtualshelfcontents.itemnumber)"); |
85 |
# drop all foreign keys : otherwise, we can't drop itemnumber field. |
85 |
# drop all foreign keys : otherwise, we can't drop itemnumber field. |
86 |
DropAllForeignKeys('virtualshelfcontents'); |
|
|
87 |
$dbh->do("ALTER TABLE `virtualshelfcontents` ADD KEY biblionumber (biblionumber)"); |
86 |
$dbh->do("ALTER TABLE `virtualshelfcontents` ADD KEY biblionumber (biblionumber)"); |
88 |
# create the new foreign keys (on biblionumber) |
87 |
# create the new foreign keys (on biblionumber) |
89 |
$dbh->do("ALTER TABLE `virtualshelfcontents` ADD CONSTRAINT `virtualshelfcontents_ibfk_1` FOREIGN KEY (`shelfnumber`) REFERENCES `virtualshelves` (`shelfnumber`) ON DELETE CASCADE ON UPDATE CASCADE"); |
88 |
$dbh->do("ALTER TABLE `virtualshelfcontents` ADD CONSTRAINT `virtualshelfcontents_ibfk_1` FOREIGN KEY (`shelfnumber`) REFERENCES `virtualshelves` (`shelfnumber`) ON DELETE CASCADE ON UPDATE CASCADE"); |
Lines 2941-2947
ADDPERIODS
Link Here
|
2941 |
# `budgetamount` decimal(13,2) default NULL, |
2940 |
# `budgetamount` decimal(13,2) default NULL, |
2942 |
# `aqbudgetid` tinyint(4) NOT NULL auto_increment, |
2941 |
# `aqbudgetid` tinyint(4) NOT NULL auto_increment, |
2943 |
# `branchcode` varchar(10) default NULL, |
2942 |
# `branchcode` varchar(10) default NULL, |
2944 |
DropAllForeignKeys('aqbudget'); |
|
|
2945 |
#$dbh->do("drop table aqbudget;"); |
2943 |
#$dbh->do("drop table aqbudget;"); |
2946 |
|
2944 |
|
2947 |
|
2945 |
|
Lines 9758-9771
if ( CheckVersion($DBversion) ) {
Link Here
|
9758 |
) |
9756 |
) |
9759 |
|, { Slice => {} } ); |
9757 |
|, { Slice => {} } ); |
9760 |
|
9758 |
|
9761 |
if ( @$orphan_budgets ) { |
|
|
9762 |
for my $b ( @$orphan_budgets ) { |
9763 |
print "Fund $b->{budget_name} (code:$b->{budget_code}, id:$b->{budget_id}) does not have a parent, it may cause problem\n"; |
9764 |
} |
9765 |
print "Upgrade to $DBversion done (Bug 12905: Check budget integrity: FAIL)\n"; |
9766 |
} else { |
9767 |
print "Upgrade to $DBversion done (Bug 12905: Check budget integrity: OK)\n"; |
9768 |
} |
9769 |
SetVersion ($DBversion); |
9759 |
SetVersion ($DBversion); |
9770 |
} |
9760 |
} |
9771 |
|
9761 |
|
9772 |
- |
|
|