diff --git a/installer/data/mysql/atomicupdate/bug_25159.pl b/installer/data/mysql/atomicupdate/bug_25159.pl new file mode 100755 index 0000000000..a2c24e7407 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_25159.pl @@ -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'"; + }, +}; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 809400d678..9dd93ecdd3 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -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`),