mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-17 09:23:07 +02:00
perf(sqlite): synchronous=normal
This commit is contained in:
parent
d77d37cf9e
commit
5895b3dd6e
@ -55,9 +55,10 @@ module.exports = class Client extends FrameworkClient {
|
||||
this.prisma = new PrismaClient();
|
||||
if (process.env.DB_PROVIDER === 'sqlite') {
|
||||
this.prisma.$use(sqliteMiddleware);
|
||||
// make sqlite faster (https://www.sqlite.org/wal.html),
|
||||
// make sqlite faster,
|
||||
// and the missing parentheses are not a mistake, `$queryRaw` is a tagged template literal
|
||||
this.log.debug(await this.prisma.$queryRaw`PRAGMA journal_mode=WAL;`);
|
||||
this.log.debug(await this.prisma.$queryRaw`PRAGMA journal_mode=WAL;`); // https://www.sqlite.org/wal.html
|
||||
this.log.debug(await this.prisma.$queryRaw`PRAGMA synchronous=normal;`); // https://www.sqlite.org/pragma.html#pragma_synchronous
|
||||
}
|
||||
this.keyv = new Keyv();
|
||||
return super.login(token);
|
||||
|
Loading…
Reference in New Issue
Block a user