Bugzilla – Attachment 165483 Details for
Bug 36687
itemtypes.notforloan should be tinyint and NOT NULL
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36687: Update itemtpes.notforloan to not allow NULL values and change to tinyint(1)
Bug-36687-Update-itemtpesnotforloan-to-not-allow-N.patch (text/plain), 2.37 KB, created by
Lucas Gass (lukeg)
on 2024-04-24 17:13:38 UTC
(
hide
)
Description:
Bug 36687: Update itemtpes.notforloan to not allow NULL values and change to tinyint(1)
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2024-04-24 17:13:38 UTC
Size:
2.37 KB
patch
obsolete
>From e6daf6b56eae0a3bd54e735e300752c44e6d64fd Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 24 Apr 2024 17:05:18 +0000 >Subject: [PATCH] Bug 36687: Update itemtpes.notforloan to not allow NULL > values and change to tinyint(1) > >--- > installer/data/mysql/atomicupdate/bug_36687.pl | 17 +++++++++++++++++ > installer/data/mysql/kohastructure.sql | 2 +- > 2 files changed, 18 insertions(+), 1 deletion(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_36687.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_36687.pl b/installer/data/mysql/atomicupdate/bug_36687.pl >new file mode 100755 >index 0000000000..86a96a635e >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_36687.pl >@@ -0,0 +1,17 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "36687", >+ description => "Set itemtypes.notforloan to NOT NULL and tinyint(1)", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ # Do you stuffs here >+ $dbh->do(q{ >+ ALTER TABLE itemtypes MODIFY COLUMN `notforloan` tinyint(1) NOT NULL DEFAULT 0 >+ }); >+ >+ say $out "Updated itemtypes.notforlaon column'"; >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 2645d0f8ad..58f9b2a164 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -4114,7 +4114,7 @@ CREATE TABLE `itemtypes` ( > `rentalcharge_hourly_calendar` tinyint(1) NOT NULL DEFAULT 1 COMMENT 'controls if the hourly rental fee is calculated directly or using finesCalendar', > `defaultreplacecost` decimal(28,6) DEFAULT NULL COMMENT 'default replacement cost', > `processfee` decimal(28,6) DEFAULT NULL COMMENT 'default text be recorded in the column note when the processing fee is applied', >- `notforloan` smallint(6) DEFAULT NULL COMMENT '1 if the item is not for loan, 0 if the item is available for loan', >+ `notforloan` tinyint(1) NOT NULL DEFAULT 0 COMMENT '1 if the item is not for loan, 0 if the item is available for loan', > `imageurl` varchar(200) DEFAULT NULL COMMENT 'URL for the item type icon', > `summary` mediumtext DEFAULT NULL COMMENT 'information from the summary field, may include HTML', > `checkinmsg` varchar(255) DEFAULT NULL COMMENT 'message that is displayed when an item with the given item type is checked in', >-- >2.30.2
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 36687
:
165483
|
165484
|
165819
|
165820
|
165840
|
165841
|
166257
|
166413
|
166414
|
166447
|
166448