Bugzilla – Attachment 138233 Details for
Bug 30392
Add a deleted_on column to deleteditems
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30392: DB changes
Bug-30392-DB-changes.patch (text/plain), 3.68 KB, created by
Katrin Fischer
on 2022-07-28 21:24:37 UTC
(
hide
)
Description:
Bug 30392: DB changes
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2022-07-28 21:24:37 UTC
Size:
3.68 KB
patch
obsolete
>From 2dac6d6421f351f484c85e0970ed8434442134bc Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 25 Jul 2022 09:48:16 +0200 >Subject: [PATCH] Bug 30392: DB changes > >--- > .../data/mysql/atomicupdate/bug_30392.pl | 24 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 2 ++ > 2 files changed, 26 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_30392.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_30392.pl b/installer/data/mysql/atomicupdate/bug_30392.pl >new file mode 100755 >index 0000000000..b5e2a32d57 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_30392.pl >@@ -0,0 +1,24 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "30392", >+ description => "Add deleteditems.deleted_on", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ unless ( column_exists('items', 'deleted_on') ) { >+ $dbh->do(q{ >+ ALTER TABLE items >+ ADD COLUMN deleted_on DATETIME DEFAULT NULL COMMENT 'date of the deletion' >+ AFTER timestamp >+ }); >+ } >+ unless ( column_exists('deleteditems', 'deleted_on') ) { >+ $dbh->do(q{ >+ ALTER TABLE deleteditems >+ ADD COLUMN deleted_on DATETIME DEFAULT NULL COMMENT 'date of the deletion' >+ AFTER timestamp >+ }); >+ } >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 6f43bdb954..d14b6158b1 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2578,6 +2578,7 @@ CREATE TABLE `deleteditems` ( > `itemnotes_nonpublic` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'non-public notes on this item (MARC21 952$x)', > `holdingbranch` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'foreign key from the branches table for the library that is currently in possession item (MARC21 952$b)', > `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'date and time this item was last altered', >+ `deleted_on` DATETIME DEFAULT NULL COMMENT 'date of the deletion', > `location` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'authorized value for the shelving location for this item (MARC21 952$c)', > `permanent_location` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'linked to the CART and PROC temporary locations feature, stores the permanent shelving location', > `onloan` date DEFAULT NULL COMMENT 'defines if item is checked out (NULL for not checked out, and due date for checked out)', >@@ -3139,6 +3140,7 @@ CREATE TABLE `items` ( > `itemnotes_nonpublic` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'non-public notes on this item (MARC21 952$x)', > `holdingbranch` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'foreign key from the branches table for the library that is currently in possession item (MARC21 952$b)', > `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'date and time this item was last altered', >+ `deleted_on` DATETIME DEFAULT NULL COMMENT 'date of the deletion', > `location` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'authorized value for the shelving location for this item (MARC21 952$c)', > `permanent_location` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'linked to the CART and PROC temporary locations feature, stores the permanent shelving location', > `onloan` date DEFAULT NULL COMMENT 'defines if item is checked out (NULL for not checked out, and due date for checked out)', >-- >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 30392
:
138073
|
138115
|
138232
|
138233
|
138481
|
138482
|
138483
|
138500