Bug 25152: Make subscription.closed tinyint(1)

https://wiki.koha-community.org/wiki/Coding_Guidelines#SQL12:_Booleans

Boolean fields must be tinyint(1), not int(1)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2020-04-15 11:29:21 +02:00 committed by Martin Renvoize
parent e83ed955fd
commit b87fdec6da
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
2 changed files with 7 additions and 1 deletions

View File

@ -0,0 +1,6 @@
$DBversion = 'XXX'; # will be replaced by the RM
if( CheckVersion( $DBversion ) ) {
$dbh->do( "ALTER TABLE subscription MODIFY COLUMN closed tinyint(1) not null default 0" );
NewVersion( $DBversion, 25152, "Description");
}

View File

@ -1994,7 +1994,7 @@ CREATE TABLE `subscription` ( -- information related to the subscription
`opacdisplaycount` VARCHAR(10) NULL, -- how many issues to show to the public
`graceperiod` int(11) NOT NULL default '0', -- grace period in days
`enddate` date default NULL, -- subscription end date
`closed` INT(1) NOT NULL DEFAULT 0, -- yes / no if the subscription is closed
`closed` TINYINT(1) NOT NULL DEFAULT 0, -- yes / no if the subscription is closed
`reneweddate` date default NULL, -- date of last renewal for the subscription
`itemtype` VARCHAR( 10 ) NULL,
`previousitemtype` VARCHAR( 10 ) NULL,