- database: remove unused fields from app table

svn path=/trunk/boinc/; revision=21728
This commit is contained in:
David Anderson 2010-06-11 03:50:47 +00:00
parent 7802d3f253
commit 8b836a391b
5 changed files with 21 additions and 22 deletions

View File

@ -4224,3 +4224,12 @@ David 10 Jun 2010
credit.h
html/inc/
result.inc
David 10 Jun 2010
- database: remove unused fields from app table
db/
boinc_db.cpp,h
schema.sql
html/ops/
db_update.php

View File

@ -195,11 +195,7 @@ void DB_APP::db_print(char* buf){
"beta=%d, "
"target_nresults=%d, "
"min_avg_pfc=%.15e, "
"host_scale_check=%d, "
"max_jobs_in_progress=%d, "
"max_gpu_jobs_in_progress=%d, "
"max_jobs_per_rpc=%d, "
"max_jobs_per_day_init=%d ",
"host_scale_check=%d, ",
create_time,
name,
min_version,
@ -210,11 +206,7 @@ void DB_APP::db_print(char* buf){
beta?1:0,
target_nresults,
min_avg_pfc,
host_scale_check?1:0,
max_jobs_in_progress,
max_gpu_jobs_in_progress,
max_jobs_per_rpc,
max_jobs_per_day_init
host_scale_check?1:0
);
}
@ -233,10 +225,6 @@ void DB_APP::db_parse(MYSQL_ROW &r) {
target_nresults = atoi(r[i++]);
min_avg_pfc = atof(r[i++]);
host_scale_check = (atoi(r[i++]) != 0);
max_jobs_in_progress = atoi(r[i++]);
max_gpu_jobs_in_progress = atoi(r[i++]);
max_jobs_per_rpc = atoi(r[i++]);
max_jobs_per_day_init = atoi(r[i++]);
}
void DB_APP_VERSION::db_print(char* buf){

View File

@ -83,10 +83,6 @@ struct APP {
// Approximates (actual FLOPS)/wu.rsc_fpops_est
bool host_scale_check;
// use host scaling cautiously, to thwart cherry picking
int max_jobs_in_progress;
int max_gpu_jobs_in_progress;
int max_jobs_per_rpc;
int max_jobs_per_day_init;
int write(FILE*);
void clear();

View File

@ -51,10 +51,6 @@ create table app (
target_nresults smallint not null default 0,
min_avg_pfc double not null,
host_scale_check tinyint not null,
max_jobs_in_progress integer not null,
max_gpu_jobs_in_progress integer not null,
max_jobs_per_rpc integer not null,
max_jobs_per_day_init integer not null,
primary key (id)
) engine=InnoDB;

View File

@ -706,6 +706,15 @@ function update_4_21_2010() {
");
}
function update_6_10_2010() {
do_query("alter table app
drop column max_jobs_in_progress,
drop column max_gpu_jobs_in_progress,
drop column max_jobs_per_rpc,
drop column max_jobs_per_day_init
");
}
// Updates are done automatically if you use "upgrade".
//
// If you need to do updates manually,
@ -722,6 +731,7 @@ $db_updates = array (
array(20807, "update_3_5_2010"),
array(20932, "update_3_17_2010"),
array(21226, "update_4_21_2010"),
array(21728, "update_6_10_2010"),
);
?>