From 89264a972e65ac5f5e7c4f646cd7c5d2dfae3ec2 Mon Sep 17 00:00:00 2001 From: Ou Date: Wed, 27 Nov 2024 20:38:34 +0800 Subject: [PATCH] feat: add index for user table --- server/database/user.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/database/user.ts b/server/database/user.ts index aff3022..8a35039 100644 --- a/server/database/user.ts +++ b/server/database/user.ts @@ -18,6 +18,9 @@ export class UserTable { updated INTEGER ); `).run() + await this.db.prepare(` + CREATE INDEX IF NOT EXISTS idx_user_id ON user(id); + `).run() logger.success(`init user table`) }