Bug 25159: DB Update

Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Kyle M Hall 2023-07-18 07:00:50 -04:00 committed by Katrin Fischer
parent 7904c1b5d0
commit c18573d7a4
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,13 @@
use Modern::Perl;
return {
bug_number => "251159",
description => "Add action logs should be stored in JSON ( and as a diff of the change )",
up => sub {
my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)};
$dbh->do(q{ALTER TABLE action_logs ADD COLUMN diff LONGTEXT NULL DEFAULT NULL AFTER trace;});
say $out "Added column 'action_logs.diff'";
},
};

View File

@ -173,6 +173,7 @@ CREATE TABLE `action_logs` (
`interface` varchar(30) DEFAULT NULL COMMENT 'the context this action was taken in',
`script` varchar(255) DEFAULT NULL COMMENT 'the name of the cron script that caused this change',
`trace` text DEFAULT NULL COMMENT 'An optional stack trace enabled by ActionLogsTraceDepth',
`diff` LONGTEXT NULL DEFAULT NULL COMMENT 'Stores a diff of the changed object',
PRIMARY KEY (`action_id`),
KEY `timestamp_idx` (`timestamp`),
KEY `user_idx` (`user`),