web: Modified consent_type table with new fields.

Modified the consent_type table to include fields 'enabled' and 'privacypref'.
This commit is contained in:
Shawn Kwang 2018-06-01 13:07:31 -05:00
parent 0cd3aab3a3
commit d6dd0945e9
2 changed files with 12 additions and 8 deletions

View File

@ -819,10 +819,12 @@ create table consent_type (
consent_id integer not null auto_increment, consent_id integer not null auto_increment,
shortname varchar(255) not null, shortname varchar(255) not null,
description varchar(255) not null, description varchar(255) not null,
enabled integer not null,
protected integer not null, protected integer not null,
privacypref integer not null,
primary key (consent_id) primary key (consent_id)
) engine=InnoDB; ) engine=InnoDB;
insert into consent_type (consent_id, shortname, description, protected) insert into consent_type (consent_id, shortname, description, enavled, protected, privacypref)
values (1, 'ENROLL', 'General terms-of-use for this BOINC project.', 1); values (1, 'ENROLL', 'General terms-of-use for this BOINC project.', 0, 1, 0);
values (2, 'STATSEXPORT', 'Consent to data exports.', 1); values (2, 'STATSEXPORT', 'Do you consent to exporting your data to BOINC statistics aggregation Web sites?', 0, 1, 1);

View File

@ -1179,21 +1179,23 @@ function update_5_17_2018() {
consent_id integer not null auto_increment, consent_id integer not null auto_increment,
shortname varchar(255) not null, shortname varchar(255) not null,
description varchar(255) not null, description varchar(255) not null,
enabled integer not null,
protected integer not null, protected integer not null,
privacypref integer not null,
primary key (consent_id) primary key (consent_id)
) engine=InnoDB; ) engine=InnoDB;
"); ");
do_query("insert into consent_type do_query("insert into consent_type
(consent_id, shortname, description, protected) values (consent_id, shortname, description, enabled, protected, privacypref) values
(1, 'ENROLL', 'General terms-of-use for this BOINC project.', 1); (1, 'ENROLL', 'General terms-of-use for this BOINC project.', 0, 1, 10);
"); ");
do_query("insert into consent_type do_query("insert into consent_type
(consent_id, shortname, description, protected) values (consent_id, shortname, description, enabled, protected, privacypref) values
(2, 'STATSEXPORT', 'Consent to data exports.', 1); (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". // Updates are done automatically if you use "upgrade".
// //
// If you need to do updates manually, // If you need to do updates manually,