From 3d91ec6c8f52e7e1c3ba0a8d3eaff18f77838060 Mon Sep 17 00:00:00 2001 From: Christian Beer Date: Tue, 11 Sep 2018 15:32:02 +0200 Subject: [PATCH] DB: move index from schema.sql to constraints.sql As noted in the comment this is how it should be. Signed-off-by: Shawn Kwang --- db/constraints.sql | 3 +++ db/schema.sql | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) 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 (