diff --git a/perl/exit_strategy.pl b/perl/exit_strategy.pl index 573683d52f30ac511a60fc1aa543068b4fd80052..76fffbfca7e97ebca4567bcb10015a7525450887 100644 --- a/perl/exit_strategy.pl +++ b/perl/exit_strategy.pl @@ -152,7 +152,6 @@ SQL_CREATE5 CREATE TABLE deleted ( id INTEGER, aip_id INTEGER NOT NULL REFERENCES aip (id), - state TEXT NOT NULL, reason TEXT NOT NULL, note TEXT, date DATE, @@ -164,7 +163,6 @@ SQL_CREATE6 CREATE TABLE purged ( id INTEGER, aip_id INTEGER NOT NULL REFERENCES aip (id), - state TEXT NOT NULL, reason TEXT, note TEXT, date DATE, @@ -227,13 +225,13 @@ SQL_LOCAT_PLAN ); SQL_DC_PLAN my $sql_deleted_plan=<<"SQL_DELETE_PLAN"; - INSERT INTO deleted (aip_id, state, reason, note, date, authorized_by) VALUES ( - (SELECT id FROM aip WHERE aip.ie_id=\$1 AND aip.version=\$2), \$3, \$4, \$5, \$6, \$7 + INSERT INTO deleted (aip_id, reason, note, date, authorized_by) VALUES ( + (SELECT id FROM aip WHERE aip.ie_id=\$1 AND aip.version=\$2), \$3, \$4, \$5, \$6 ); SQL_DELETE_PLAN my $sql_purged_plan=<<"SQL_PURGED_PLAN"; - INSERT INTO purged (aip_id, state, reason, note, date, authorized_by) VALUES ( - (SELECT id FROM aip WHERE aip.ie_id=\$1 AND aip.version=\$2), \$3, \$4, \$5, \$6, \$7 + INSERT INTO purged (aip_id, reason, note, date, authorized_by) VALUES ( + (SELECT id FROM aip WHERE aip.ie_id=\$1 AND aip.version=\$2), \$3, \$4, \$5, \$6 ); SQL_PURGED_PLAN @@ -334,8 +332,8 @@ SQL_PURGED_PLAN my $date = $delete->{'date'}; my $authorized_by = $delete->{'authorized_by'}; eval { - $plans->{$delstate}->execute($ieid, $ieversion, $state, $reason, $note, $date, $authorized_by) - } or die "sql problem detected with $delstate $ieid ($ieversion, $state, $reason, $note, $date, $authorized_by), ", $dbh->errstr; + $plans->{$delstate}->execute($ieid, $ieversion, $reason, $note, $date, $authorized_by) + } or die "sql problem detected with $delstate $ieid ($ieversion, $reason, $note, $date, $authorized_by), ", $dbh->errstr; } } return 1;