server: add indices for user_submit, user_submit_app tables

This commit is contained in:
David Anderson 2014-10-08 12:13:36 -07:00
parent 323d61bcee
commit 644690b100
2 changed files with 10 additions and 2 deletions

View File

@ -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.

View File

@ -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"),
);
?>