Skip to content

Commit

Permalink
Fixed major errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tvroom committed Aug 5, 2004
1 parent 67efe53 commit cbe3318
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions utils/convertDBto200406
Original file line number Diff line number Diff line change
Expand Up @@ -781,10 +781,12 @@ INSERT INTO pollquestions_new (qid,question,voters,topic,discussion,date,uid,sec
EOT

for my $skid (sort { $a <=> $b } keys %skins) {
my $sec_skid = $slashdb->sqlQuote($skins{$skid}{name});
$sec_skid ||= $slashdb->getVar('mainpage_skid', 'value', 1);
print "UPDATE pollquestions_new SET primaryskid=$sec_skid WHERE section=$section_q;\n";
my $section_q = $slashdb->sqlQuote($skins{$skid}{name});
print "UPDATE pollquestions_new SET primaryskid=$skid WHERE section=$section_q;\n";
}
my $mainpage_skid = $slashdb->getVar('mainpage_skid','value',1);
print "UPDATE pollquestions SET primaryskid=$mainpage_skid WHERE primaryskid IS NULL;\n";

print "ALTER TABLE pollquestions_new DROP COLUMN section;\n";
#
# Update auto_poll if it exists
Expand Down

0 comments on commit cbe3318

Please sign in to comment.