fixed a problem with multistage upgrades and the search bug
This commit is contained in:
parent
68d63c7e0a
commit
a58d109b01
2 changed files with 6 additions and 10 deletions
|
|
@ -21,7 +21,6 @@ my $quiet; # this line required
|
|||
my $session = start(); # this line required
|
||||
|
||||
# upgrade functions go here
|
||||
dropLineageInAssetIndex($session);
|
||||
giveTasksMultipleResources($session);
|
||||
giveTasksLagTime($session);
|
||||
giveProjectsObserverGroup($session);
|
||||
|
|
@ -29,13 +28,6 @@ giveProjectsObserverGroup($session);
|
|||
finish($session); # this line required
|
||||
|
||||
|
||||
#-------------------------------------------------
|
||||
sub dropLineageInAssetIndex {
|
||||
my $session = shift;
|
||||
print "\tDropping lineage column in assetIndex table.\n" unless ($quiet);
|
||||
|
||||
$session->db->write('alter table assetIndex drop column lineage');
|
||||
}
|
||||
|
||||
sub giveTasksMultipleResources {
|
||||
my $session = shift;
|
||||
|
|
|
|||
|
|
@ -30,8 +30,12 @@ finish($session); # this line required
|
|||
#-------------------------------------------------
|
||||
sub fixSearch {
|
||||
print "\tFixing search.\n" unless ($quiet);
|
||||
$session->db->write("alter table assetIndex add column lineage varchar(255)");
|
||||
|
||||
my $sth = $session->db->read("describe assetIndex lineage");
|
||||
my $exists = $sth->rows;
|
||||
$sth->finish;
|
||||
unless ($exists) {
|
||||
$session->db->write("alter table assetIndex add column lineage varchar(255)");
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue