`estimated_amount` decimal(28,6) default NULL,
`authcat` varchar(30) NOT NULL,
`authvalue` varchar(30) NOT NULL,
+ `display` tinyint(1) DEFAULT 1,
PRIMARY KEY (`plan_id`),
CONSTRAINT `aqbudgets_planning_ifbk_1` FOREIGN KEY (`budget_id`) REFERENCES `aqbudgets` (`budget_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
SetVersion ($DBversion);
}
+$DBversion = '3.01.00.118';
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ my ($count) = $dbh->selectrow_array("SELECT count(*) FROM information_schema.columns
+ WHERE table_name = 'aqbudgets_planning'
+ AND column_name = 'display'");
+ if ($count < 1) {
+ $dbh->do("ALTER TABLE aqbudgets_planning ADD COLUMN display tinyint(1) DEFAULT 1");
+ }
+ print "Upgrade to $DBversion done (bug 4203: add display column to aqbudgets_planning if missing)\n";
+ SetVersion ($DBversion);
+}
+
=item DropAllForeignKeys($table)
Drop all foreign keys of the table $table
use strict;
sub kohaversion {
- our $VERSION = '3.01.00.117';
+ our $VERSION = '3.01.00.118';
# version needs to be set this way
# so that it can be picked up by Makefile.PL
# during install