From b44a8c84556d305540488627607f60d64ab07601 Mon Sep 17 00:00:00 2001 From: Shawn Kwang Date: Mon, 17 Sep 2018 11:58:31 -0500 Subject: [PATCH] db: Renamed database field 'protect' to 'project_specific' --- db/boinc_db.cpp | 6 +++--- db/boinc_db_types.h | 2 +- db/content.sql | 6 +++--- db/schema.sql | 3 ++- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/db/boinc_db.cpp b/db/boinc_db.cpp index 8f178eb344..9b4a965b49 100644 --- a/db/boinc_db.cpp +++ b/db/boinc_db.cpp @@ -2875,13 +2875,13 @@ void DB_CONSENT_TYPE::db_print(char *buf) { "shortname='%s', " "description='%s', " "enabled=%d, " - "protect=%d, " + "project_specific=%d, " "privacypref=%d, ", id, shortname, description, enabled, - protect, + project_specific, privacypref ); } @@ -2893,7 +2893,7 @@ void DB_CONSENT_TYPE::db_parse(MYSQL_ROW &r) { strcpy2(shortname, r[i++]); strcpy2(description, r[i++]); enabled = atoi(r[i++]); - protect = atoi(r[i++]); + project_specific = atoi(r[i++]); privacypref = atoi(r[i++]); } diff --git a/db/boinc_db_types.h b/db/boinc_db_types.h index 5feb721cdc..a672ba8842 100644 --- a/db/boinc_db_types.h +++ b/db/boinc_db_types.h @@ -854,7 +854,7 @@ struct CONSENT_TYPE { char shortname[256]; char description[256]; int enabled; - int protect; + int project_specific; int privacypref; void clear(); }; diff --git a/db/content.sql b/db/content.sql index 713f03964d..ec2a0059bd 100644 --- a/db/content.sql +++ b/db/content.sql @@ -4,6 +4,6 @@ The table must be first defined in schema.sql before any content is added! */ -insert into consent_type (shortname, description, enabled, protect, privacypref) - values ('ENROLL', 'General terms-of-use for this BOINC project.', 0, 1, 0), - ('STATSEXPORT', 'Do you consent to exporting your data to BOINC statistics aggregation Web sites?', 0, 1, 1); +insert into consent_type (shortname, description, enabled, project_specific, privacypref) + values ('ENROLL', 'General terms-of-use for this BOINC project.', 0, 0, 0), + ('STATSEXPORT', 'Do you consent to exporting your data to BOINC statistics aggregation Web sites?', 0, 0, 1); diff --git a/db/schema.sql b/db/schema.sql index 37bd52ce94..a3d4daea31 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -816,12 +816,13 @@ create table consent ( primary key (id) ) engine=InnoDB; +-- @todo - change 'protect' to 'project_specific' create table consent_type ( id integer not null auto_increment, shortname varchar(255) not null, description varchar(255) not null, enabled integer not null, - protect integer not null, + project_specific integer not null, privacypref integer not null, primary key (id) ) engine=InnoDB;