Bug 2945: increase size of labels_conf.formatstring (DB update)

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This commit is contained in:
Joe Atzberger 2009-02-04 13:55:03 -06:00 committed by Galen Charlton
parent b81479fdb2
commit 0bd5a30708
2 changed files with 9 additions and 4 deletions

View file

@ -1249,7 +1249,7 @@ CREATE TABLE `labels_conf` (
`isbn` int(1) default '0',
`startlabel` int(2) NOT NULL default '1',
`printingtype` char(32) default 'BAR',
`formatstring` varchar(64) default NULL,
`formatstring` mediumtext default NULL,
`layoutname` char(20) NOT NULL default 'TEST',
`guidebox` int(1) default '0',
`active` tinyint(1) default '1',

View file

@ -1324,7 +1324,7 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
$DBversion = "3.00.00.072";
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
$dbh->do("ALTER TABLE labels_conf ADD COLUMN formatstring VARCHAR(64) DEFAULT NULL AFTER printingtype");
$dbh->do("ALTER TABLE labels_conf ADD COLUMN formatstring mediumtext DEFAULT NULL AFTER printingtype");
print "Upgrade to $DBversion done ( Adding format string to labels generator. )\n";
SetVersion ($DBversion);
}
@ -1501,8 +1501,6 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
SetVersion ($DBversion);
}
$DBversion = "3.00.00.080";
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
$dbh->do("ALTER TABLE subscription CHANGE monthlength monthlength int(11) default '0'");
@ -2327,6 +2325,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
SetVersion ($DBversion);
}
$DBversion = '3.01.00.020';
if ( C4::Context->preference('Version') < TransformToNum($DBversion) ) {
$dbh->do("ALTER TABLE `labels_conf` MODIFY COLUMN `formatstring` mediumtext DEFAULT NULL");
print "Upgrade to $DBversion done (bug 2945: increase size of labels_conf.formatstring)\n";
SetVersion ($DBversion);
}
=item DropAllForeignKeys($table)
Drop all foreign keys of the table $table