diff --git a/db/constraints.sql b/db/constraints.sql index 88806929c0..47cc44b2c3 100644 --- a/db/constraints.sql +++ b/db/constraints.sql @@ -179,6 +179,9 @@ alter table sent_email add index sent_email_userid(userid); -- for delete account +alter table private_messages + add index userid(userid); + alter table consent add index userid_ctid(userid, consent_type_id); add index consent_timestamp(consent_time); diff --git a/db/schema.sql b/db/schema.sql index ea8d043314..86421e67c8 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -627,8 +627,7 @@ create table private_messages ( opened tinyint not null default 0, subject varchar(255) not null, content text not null, - primary key(id), - key userid (userid) + primary key(id) ) engine=MyISAM; create table credited_job (