From d6dd0945e963d3cb0bce39bd09efcadaab442707 Mon Sep 17 00:00:00 2001 From: Shawn Kwang Date: Fri, 1 Jun 2018 13:07:31 -0500 Subject: [PATCH] web: Modified consent_type table with new fields. Modified the consent_type table to include fields 'enabled' and 'privacypref'. --- db/schema.sql | 8 +++++--- html/ops/db_update.php | 12 +++++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/db/schema.sql b/db/schema.sql index 709d3786cd..92e1049475 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -819,10 +819,12 @@ create table consent_type ( consent_id integer not null auto_increment, shortname varchar(255) not null, description varchar(255) not null, + enabled integer not null, protected integer not null, + privacypref integer not null, primary key (consent_id) ) engine=InnoDB; -insert into consent_type (consent_id, shortname, description, protected) - values (1, 'ENROLL', 'General terms-of-use for this BOINC project.', 1); - values (2, 'STATSEXPORT', 'Consent to data exports.', 1); +insert into consent_type (consent_id, shortname, description, enavled, protected, privacypref) + values (1, 'ENROLL', 'General terms-of-use for this BOINC project.', 0, 1, 0); + values (2, 'STATSEXPORT', 'Do you consent to exporting your data to BOINC statistics aggregation Web sites?', 0, 1, 1); diff --git a/html/ops/db_update.php b/html/ops/db_update.php index 5c148bd761..037db08289 100644 --- a/html/ops/db_update.php +++ b/html/ops/db_update.php @@ -1179,21 +1179,23 @@ function update_5_17_2018() { consent_id integer not null auto_increment, shortname varchar(255) not null, description varchar(255) not null, + enabled integer not null, protected integer not null, + privacypref integer not null, primary key (consent_id) ) engine=InnoDB; "); do_query("insert into consent_type - (consent_id, shortname, description, protected) values - (1, 'ENROLL', 'General terms-of-use for this BOINC project.', 1); + (consent_id, shortname, description, enabled, protected, privacypref) values + (1, 'ENROLL', 'General terms-of-use for this BOINC project.', 0, 1, 10); "); do_query("insert into consent_type - (consent_id, shortname, description, protected) values - (2, 'STATSEXPORT', 'Consent to data exports.', 1); + (consent_id, shortname, description, enabled, protected, privacypref) values + (2, 'STATSEXPORT', 'Do you consent to exporting your data to BOINC statistics aggregation Web sites?', 0, 1, 1); "); } - + // Updates are done automatically if you use "upgrade". // // If you need to do updates manually,