diff --git a/sql.go b/sql.go index 941875a..be7b811 100644 --- a/sql.go +++ b/sql.go @@ -270,6 +270,8 @@ func initDB() { ,ended TIMESTAMP ,payload VARCHAR(4000) ,FOREIGN KEY (obj_id) REFERENCES obj(id) ON DELETE CASCADE + ,KEY (is_done) + ,KEY (in_work) ,KEY (user_id) ) ENGINE = InnoDB CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci;`) failOnError(err, "initDB : create table obj_job")