fix: InOutBoard has wrong primary keys
This commit is contained in:
parent
07dba1128b
commit
8fa19e89fe
1 changed files with 10 additions and 0 deletions
|
|
@ -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 ----
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue