View | Details | Raw Unified | Return to bug 31086
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_31086_do_not_allow_null_branchcode_in_reserves.pl (+16 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "31086",
5
    description => "Do not allow null values in branchcodes for reserves",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        $dbh->do(q{
10
            ALTER TABLE reserves
11
            MODIFY COLUMN `branchcode` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 0 COMMENT 'foreign key from the branches table defining which branch the patron wishes to pick this hold up at'
12
        });
13
        # Print useful stuff here
14
        say $out "Removed NULL option from branchcode for reserves";
15
    },
16
};
(-)a/installer/data/mysql/kohastructure.sql (-2 / +1 lines)
Lines 4408-4414 CREATE TABLE `reserves` ( Link Here
4408
  `borrowernumber` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the borrowers table defining which patron this hold is for',
4408
  `borrowernumber` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the borrowers table defining which patron this hold is for',
4409
  `reservedate` date DEFAULT NULL COMMENT 'the date the hold was placed',
4409
  `reservedate` date DEFAULT NULL COMMENT 'the date the hold was placed',
4410
  `biblionumber` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the biblio table defining which bib record this hold is on',
4410
  `biblionumber` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the biblio table defining which bib record this hold is on',
4411
  `branchcode` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'foreign key from the branches table defining which branch the patron wishes to pick this hold up at',
4411
  `branchcode` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 0 COMMENT 'foreign key from the branches table defining which branch the patron wishes to pick this hold up at',
4412
  `desk_id` int(11) DEFAULT NULL COMMENT 'foreign key from the desks table defining which desk the patron should pick this hold up at',
4412
  `desk_id` int(11) DEFAULT NULL COMMENT 'foreign key from the desks table defining which desk the patron should pick this hold up at',
4413
  `notificationdate` date DEFAULT NULL COMMENT 'currently unused',
4413
  `notificationdate` date DEFAULT NULL COMMENT 'currently unused',
4414
  `reminderdate` date DEFAULT NULL COMMENT 'currently unused',
4414
  `reminderdate` date DEFAULT NULL COMMENT 'currently unused',
4415
- 

Return to bug 31086