Bugzilla – Attachment 102976 Details for
Bug 25152
subscription.closed is a boolean and must be tinyint(1)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25152: Make subscription.closed tinyint(1)
Bug-25152-Make-subscriptionclosed-tinyint1.patch (text/plain), 1.89 KB, created by
Jonathan Druart
on 2020-04-15 09:31:12 UTC
(
hide
)
Description:
Bug 25152: Make subscription.closed tinyint(1)
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-04-15 09:31:12 UTC
Size:
1.89 KB
patch
obsolete
>From 2f4cb340fdfe442fa4b41d2217513b1a100ca84e Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 15 Apr 2020 11:29:21 +0200 >Subject: [PATCH] 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) >--- > installer/data/mysql/atomicupdate/bug_25152.perl | 6 ++++++ > installer/data/mysql/kohastructure.sql | 2 +- > 2 files changed, 7 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_25152.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_25152.perl b/installer/data/mysql/atomicupdate/bug_25152.perl >new file mode 100644 >index 0000000000..5980a8f0e8 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_25152.perl >@@ -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"); >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 02c086d71d..ed47b9076c 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -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, >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 25152
:
102976
|
102987