diff --git a/installer/data/mysql/db_revs/220600075.pl b/installer/data/mysql/db_revs/220600075.pl index df2dbb255c..279284a8dd 100755 --- a/installer/data/mysql/db_revs/220600075.pl +++ b/installer/data/mysql/db_revs/220600075.pl @@ -1,12 +1,17 @@ use Modern::Perl; return { - bug_number => "31948", + bug_number => "31948", description => "Add timestamp to tmp_holdsqueue table", up => sub { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; - $dbh->do(q{ALTER TABLE `tmp_holdsqueue` ADD `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP AFTER item_level_request}); + unless ( column_exists( 'tmp_holdsqueue', 'timestamp' ) ) { + $dbh->do(q{ + ALTER TABLE `tmp_holdsqueue` + ADD `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP AFTER item_level_request + }); + } }, };