Bugzilla – Attachment 86899 Details for
Bug 22521
Convert fines handling to use 'status' instead of two accounttypes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22521: Increase varchar size for accounttype
Bug-22521-Increase-varchar-size-for-accounttype.patch (text/plain), 2.07 KB, created by
Martin Renvoize (ashimema)
on 2019-03-22 12:02:31 UTC
(
hide
)
Description:
Bug 22521: Increase varchar size for accounttype
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-03-22 12:02:31 UTC
Size:
2.07 KB
patch
obsolete
>From 4816215fd50b774f447120d10d455f758767e181 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 19 Mar 2019 14:24:35 +0000 >Subject: [PATCH] Bug 22521: Increase varchar size for accounttype > >accountlines.accounttype is currently a short varchar(5) field for to >store accounttype codes. Koha is moving towards more descriptive codes >which require a larger capacity varchar(16). > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > installer/data/mysql/atomicupdate/bug_22521.perl | 16 ++++++++++++++++ > installer/data/mysql/kohastructure.sql | 2 +- > 2 files changed, 17 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_22521.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_22521.perl b/installer/data/mysql/atomicupdate/bug_22521.perl >new file mode 100644 >index 0000000000..d6d5acf6ba >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_22521.perl >@@ -0,0 +1,16 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if ( CheckVersion($DBversion) ) { >+ >+ if ( column_exists( 'accountlines', 'accounttype' ) ) { >+ $dbh->do( >+ qq{ >+ ALTER TABLE `accountlines` >+ CHANGE COLUMN `accounttype` >+ `accounttype` varchar(16) DEFAULT NULL; >+ } >+ ); >+ } >+ >+ SetVersion($DBversion); >+ print "Upgrade to $DBversion done (Bug 22521 - Update accountlines.accounttype to varchar(16))\n"; >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index a317207a3b..7a5d2cc3c2 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2675,7 +2675,7 @@ CREATE TABLE `accountlines` ( > `date` date default NULL, > `amount` decimal(28,6) default NULL, > `description` LONGTEXT, >- `accounttype` varchar(5) default NULL, >+ `accounttype` varchar(16) default NULL, > `status` varchar(16) default NULL, > `payment_type` varchar(80) default NULL, -- optional authorised value PAYMENT_TYPE > `amountoutstanding` decimal(28,6) default 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 22521
:
86808
|
86890
|
86891
|
86892
|
86893
|
86894
|
86895
|
86896
|
86897
|
86898
|
86899
|
86900
|
86901
|
86902
|
86918
|
86919
|
86920
|
86921
|
87063
|
87083
|
87084
|
87085
|
87086
|
87087
|
87097
|
87098
|
87099
|
87100
|
87101
|
87209
|
87210
|
87211
|
87212
|
87213
|
87214
|
87215
|
87216
|
87217
|
87218
|
87219
|
87220
|
87619
|
87620
|
87621
|
87622
|
87623
|
87624
|
87678
|
87679
|
87680
|
87681
|
87682
|
87683
|
87787
|
87788
|
87789
|
87790
|
87791
|
87792
|
87808
|
87809
|
87810
|
87811
|
87812
|
87813
|
87814
|
87850
|
87851
|
87852
|
87853
|
87854
|
87855
|
87856
|
87857
|
87858
|
87859
|
87860
|
87861
|
87862
|
87863
|
87864
|
87865
|
88064
|
88065
|
88066
|
88067
|
88068
|
88069
|
88070
|
88071
|
88149
|
88150
|
88151
|
88152
|
88153
|
88154
|
88155
|
88156
|
88286