Bugzilla – Attachment 80355 Details for
Bug 21401
Account offsets should save the transacting library
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21401: Add column transaction_library to table account_offsets
Bug-21401-Add-column-transactionlibrary-to-table-a.patch (text/plain), 2.68 KB, created by
Josef Moravec
on 2018-10-10 14:59:46 UTC
(
hide
)
Description:
Bug 21401: Add column transaction_library to table account_offsets
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2018-10-10 14:59:46 UTC
Size:
2.68 KB
patch
obsolete
>From fc5b5c85aa7832f39b720d3c2373987f53b6c430 Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Mon, 24 Sep 2018 08:28:16 +0200 >Subject: [PATCH] Bug 21401: Add column transaction_library to table > account_offsets > >--- > .../atomicupdate/bug_21401_add_accountlines_branchcode.perl | 10 ++++++++++ > installer/data/mysql/kohastructure.sql | 4 +++- > 2 files changed, 13 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_21401_add_accountlines_branchcode.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_21401_add_accountlines_branchcode.perl b/installer/data/mysql/atomicupdate/bug_21401_add_accountlines_branchcode.perl >new file mode 100644 >index 0000000..44b20fc >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_21401_add_accountlines_branchcode.perl >@@ -0,0 +1,10 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ if( !column_exists( 'accountlines', 'branchcode' ) ) { >+ $dbh->do( "ALTER TABLE accountlines ADD COLUMN branchcode varchar(10) default NULL AFTER manager_id" ); >+ $dbh->do( "ALTER TABLE accountlines ADD CONSTRAINT `accountlines_ibfk_3` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE SET NULL ON UPDATE CASCADE" ); >+ } >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 21401 - Add branchcode to accountlines)\n"; >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index f086cbe..0e78284 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2697,12 +2697,14 @@ CREATE TABLE `accountlines` ( > `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, > `note` MEDIUMTEXT NULL default NULL, > `manager_id` int(11) NULL, >+ `branchcode` varchar(10) default NULL, -- library where the accountline was created > PRIMARY KEY (`accountlines_id`), > KEY `acctsborridx` (`borrowernumber`), > KEY `timeidx` (`timestamp`), > KEY `itemnumber` (`itemnumber`), > CONSTRAINT `accountlines_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE, >- CONSTRAINT `accountlines_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE SET NULL >+ CONSTRAINT `accountlines_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE SET NULL, >+ CONSTRAINT `accountlines_ibfk_3` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE SET NULL ON UPDATE CASCADE > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > > -- >-- >2.1.4
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 21401
:
79272
|
79273
|
79274
|
79275
|
79284
|
79285
|
79286
|
79287
|
79288
|
79688
| 80355 |
80356
|
80357
|
80358