From 8fa19e89fe409069b410311f1e5c4e81a28b3f68 Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Mon, 13 Nov 2006 21:01:07 +0000 Subject: [PATCH] fix: InOutBoard has wrong primary keys --- docs/upgrades/upgrade_7.2.0-7.2.1.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/upgrades/upgrade_7.2.0-7.2.1.pl b/docs/upgrades/upgrade_7.2.0-7.2.1.pl index 54d853619..674aee8cc 100644 --- a/docs/upgrades/upgrade_7.2.0-7.2.1.pl +++ b/docs/upgrades/upgrade_7.2.0-7.2.1.pl @@ -21,6 +21,7 @@ my $quiet; # this line required my $session = start(); # this line required # upgrade functions go here +fixInOutBoardTable(); finish($session); # this line required @@ -32,6 +33,15 @@ finish($session); # this line required # # and here's our code #} +#------------------------------------------------- +sub fixInOutBoardTable { + my $session = shift; + print "\tFixing InOutBoard table: Adding revisionDate column as a primary key.\n" unless ($quiet); + + $session->db->write("alter table InOutBoard drop primary key"); + $session->db->write("alter table InOutBoard add primary key (assetId,revisionDate)"); +} + # ---- DO NOT EDIT BELOW THIS LINE ----