Bugzilla – Attachment 79285 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.93 KB, created by
Michal Denar
on 2018-09-24 09:46:38 UTC
(
hide
)
Description:
Bug 21401: Add column transaction_library to table account_offsets
Filename:
MIME Type:
Creator:
Michal Denar
Created:
2018-09-24 09:46:38 UTC
Size:
2.93 KB
patch
obsolete
>From 34af95cc952135bdd4c79f0d13bc3d4fda3f904b 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 > >Signed-off-by: Your Full Name <your_email> > >Signed-off-by: Your Full Name <your_email> >--- > .../bug_21401_account_offsets_transaction_library.perl | 10 ++++++++++ > installer/data/mysql/kohastructure.sql | 4 +++- > 2 files changed, 13 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_21401_account_offsets_transaction_library.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_21401_account_offsets_transaction_library.perl b/installer/data/mysql/atomicupdate/bug_21401_account_offsets_transaction_library.perl >new file mode 100644 >index 0000000..f65ffce >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_21401_account_offsets_transaction_library.perl >@@ -0,0 +1,10 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ if( !column_exists( 'account_offsets', 'transaction_library' ) ) { >+ $dbh->do( "ALTER TABLE account_offsets ADD COLUMN transaction_library varchar(10) default NULL AFTER created_on" ); >+ $dbh->do( "ALTER TABLE account_offsets ADD CONSTRAINT `account_offsets_ibfk_l` FOREIGN KEY (`transaction_library`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE" ); >+ } >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 21401 - Add transacting library to account_offsets)\n"; >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 49a0f18..96c623d 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2717,10 +2717,12 @@ CREATE TABLE `account_offsets` ( > `type` varchar(16) NOT NULL, -- The type of offset this is > `amount` decimal(26,6) NOT NULL, -- The amount of the change > `created_on` timestamp NOT NULL default CURRENT_TIMESTAMP, >+ `transaction_library` varchar(10) default NULL, -- library where the offset was made > PRIMARY KEY (`id`), > CONSTRAINT `account_offsets_ibfk_p` FOREIGN KEY (`credit_id`) REFERENCES `accountlines` (`accountlines_id`) ON DELETE CASCADE ON UPDATE CASCADE, > CONSTRAINT `account_offsets_ibfk_f` FOREIGN KEY (`debit_id`) REFERENCES `accountlines` (`accountlines_id`) ON DELETE CASCADE ON UPDATE CASCADE, >- CONSTRAINT `account_offsets_ibfk_t` FOREIGN KEY (`type`) REFERENCES `account_offset_types` (`type`) ON DELETE CASCADE ON UPDATE CASCADE >+ CONSTRAINT `account_offsets_ibfk_t` FOREIGN KEY (`type`) REFERENCES `account_offset_types` (`type`) ON DELETE CASCADE ON UPDATE CASCADE, >+ CONSTRAINT `account_offsets_ibfk_l` FOREIGN KEY (`transaction_library`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE 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