added a karma ranking system to cs threads for conducting popularity contests

This commit is contained in:
JT Smith 2006-02-28 17:28:44 +00:00
parent 0400beba05
commit f2b2832524
9 changed files with 133 additions and 6 deletions

View file

@ -39,6 +39,15 @@ addDatabaseCache();
finish($session); # this line required
#-------------------------------------------------
sub addCsPopularityContest {
print "\tAdding collaboration system popularity system based upon karma.\n";
$session->db->write("alter table Collaboration add column defaultKarmaScale integer not null default 1");
$session->db->write("alter table Thread add column karma integer not null default 0");
$session->db->write("alter table Thread add column karmaScale integer not null default 1");
$session->db->write("alter table Thread add column karmaRank decimal(5,6) not null default 0");
}
#-------------------------------------------------
sub addDatabaseCache {
print "\tAdding database cache.\n";