drop another SQL Form table if the SQL form isn't used. Fixes bug #11061
This commit is contained in:
parent
c169a901ab
commit
0a23831f91
2 changed files with 15 additions and 0 deletions
|
|
@ -33,6 +33,7 @@ my $session = start(); # this line required
|
|||
fixWikis( $session );
|
||||
fixEMSTemplates( $session );
|
||||
removeOldSubscriptionTables( $session );
|
||||
removeSQLFormTables( $session );
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
|
|
@ -46,6 +47,18 @@ finish($session); # this line required
|
|||
# print "DONE!\n" unless $quiet;
|
||||
#}
|
||||
|
||||
# Describe what our function does
|
||||
sub removeSQLFormTables {
|
||||
my $session = shift;
|
||||
print "\tRemoving leftover SQL Form tables if not used... " unless $quiet;
|
||||
my $tablesUsed = $session->db->quickScalar("select count(*) from asset where className='WebGUI::Asset::Wobject::SQLForm'");
|
||||
if (!$tablesUsed) {
|
||||
$session->db->write('DROP TABLE IF EXISTS SQLForm_fieldOrder');
|
||||
print "\n\t\tSQL Form not used, dropping table...";
|
||||
}
|
||||
print "Done.\n" unless $quiet;
|
||||
}
|
||||
|
||||
# Describe what our function does
|
||||
sub removeOldSubscriptionTables {
|
||||
my $session = shift;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue