From e4d57d80a25b11b45fc05c95197ff3663157c7a1 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Sun, 23 Aug 2009 20:51:52 -0400 Subject: [PATCH] bug 3481: add deleditems.permanent_location (DB rev 052) 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 --- installer/data/mysql/kohastructure.sql | 1 + installer/data/mysql/updatedatabase.pl | 7 +++++++ kohaversion.pl | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 0cf3d5bffe..a12f4fdb7e 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 6b7a49e8c2..5f3d7a1ac7 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 91e55afc9d..a470909456 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 -- 2.39.5