diff --git a/db/schema.sql b/db/schema.sql index b29e320521..9a38801680 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -330,7 +330,8 @@ create table user_submit ( -- manager privileges for all apps -- grant/revoke permissions (except manage), change quotas -- create apps - max_jobs_in_progress integer not null + max_jobs_in_progress integer not null, + primary key (user_id) ) engine = InnoDB; -- (user, app) submit permissions @@ -339,11 +340,12 @@ create table user_submit ( create table user_submit_app ( user_id integer not null, app_id integer not null, - manage tinyint not null + manage tinyint not null, -- can -- create/deprecated app versions of this app -- grant/revoke permissions (except admin) this app -- abort their jobs + primary key (user_id, app_id) ) engine = InnoDB; -- Record files present on server. diff --git a/html/ops/db_update.php b/html/ops/db_update.php index 0503c60065..9a5ef352b3 100644 --- a/html/ops/db_update.php +++ b/html/ops/db_update.php @@ -969,6 +969,11 @@ function update_8_15_2014() { " ); } + +function update_10_8_2014() { + do_query("alter table user_submit add primary key(user_id)"); + do_query("alter table user_submit_app add primary key(user_id, app_id)"); +} // Updates are done automatically if you use "upgrade". // @@ -1013,6 +1018,7 @@ $db_updates = array ( array(27009, "update_5_3_2014"), array(27010, "update_6_5_2014"), array(27011, "update_8_15_2014"), + array(27012, "update_10_8_2014"), ); ?>