fix: InOutBoard has wrong primary keys

This commit is contained in:
Doug Bell 2006-11-13 21:01:07 +00:00
parent 07dba1128b
commit 8fa19e89fe

View file

@ -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 ----