Whenever a column is added to items, it must also be added to deleteditems - otherwise, whenever an item is deleted, it will not be saved to deleteditems.
Signed-off-by: Galen Charlton <[email protected]> --- installer/data/mysql/kohastructure.sql | 1 + installer/data/mysql/updatedatabase.pl | 7 +++++++ kohaversion.pl | 2 +- 3 files changed, 9 insertions(+), 1 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 0cf3d5b..a12f4fd 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -946,6 +946,7 @@ CREATE TABLE `deleteditems` ( `paidfor` mediumtext, `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `location` varchar(80) default NULL, + `permanent_location` varchar(80) default NULL, `onloan` date default NULL, `cn_source` varchar(10) default NULL, `cn_sort` varchar(30) default NULL, diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 6b7a49e..5f3d7a1 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -2589,6 +2589,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { print "Upgrade to $DBversion done (fixed typos in new sysprefs)\n"; } +$DBversion = '3.01.00.052'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do('ALTER TABLE deleteditems ADD COLUMN permanent_location VARCHAR(80) DEFAULT NULL AFTER location'); + SetVersion ($DBversion); + print "Upgrade to $DBversion done (bug 3481: add permanent_location column to deleteditems)\n"; +} + =item DropAllForeignKeys($table) Drop all foreign keys of the table $table diff --git a/kohaversion.pl b/kohaversion.pl index 91e55af..a470909 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -10,7 +10,7 @@ use strict; sub kohaversion { - our $VERSION = '3.01.00.051'; + our $VERSION = '3.01.00.052'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install -- 1.6.3.3 _______________________________________________ Koha-patches mailing list [email protected] http://lists.koha.org/mailman/listinfo/koha-patches
