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

(-)a/installer/data/mysql/atomicupdate/bug_36687.pl (+17 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "36687",
5
    description => "Set itemtypes.notforloan to NOT NULL and tinyint(1)",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
10
        # Do you stuffs here
11
        $dbh->do(q{
12
             ALTER TABLE itemtypes MODIFY COLUMN `notforloan` tinyint(1) NOT NULL DEFAULT 0
13
        });
14
15
        say $out "Updated itemtypes.notforlaon column'";
16
    },
17
};
(-)a/installer/data/mysql/kohastructure.sql (-2 / +1 lines)
Lines 4114-4120 CREATE TABLE `itemtypes` ( Link Here
4114
  `rentalcharge_hourly_calendar` tinyint(1) NOT NULL DEFAULT 1 COMMENT 'controls if the hourly rental fee is calculated directly or using finesCalendar',
4114
  `rentalcharge_hourly_calendar` tinyint(1) NOT NULL DEFAULT 1 COMMENT 'controls if the hourly rental fee is calculated directly or using finesCalendar',
4115
  `defaultreplacecost` decimal(28,6) DEFAULT NULL COMMENT 'default replacement cost',
4115
  `defaultreplacecost` decimal(28,6) DEFAULT NULL COMMENT 'default replacement cost',
4116
  `processfee` decimal(28,6) DEFAULT NULL COMMENT 'default text be recorded in the column note when the processing fee is applied',
4116
  `processfee` decimal(28,6) DEFAULT NULL COMMENT 'default text be recorded in the column note when the processing fee is applied',
4117
  `notforloan` smallint(6) DEFAULT NULL COMMENT '1 if the item is not for loan, 0 if the item is available for loan',
4117
  `notforloan` tinyint(1) NOT NULL DEFAULT 0 COMMENT '1 if the item is not for loan, 0 if the item is available for loan',
4118
  `imageurl` varchar(200) DEFAULT NULL COMMENT 'URL for the item type icon',
4118
  `imageurl` varchar(200) DEFAULT NULL COMMENT 'URL for the item type icon',
4119
  `summary` mediumtext DEFAULT NULL COMMENT 'information from the summary field, may include HTML',
4119
  `summary` mediumtext DEFAULT NULL COMMENT 'information from the summary field, may include HTML',
4120
  `checkinmsg` varchar(255) DEFAULT NULL COMMENT 'message that is displayed when an item with the given item type is checked in',
4120
  `checkinmsg` varchar(255) DEFAULT NULL COMMENT 'message that is displayed when an item with the given item type is checked in',
4121
- 

Return to bug 36687