feat(core): Add an option to enable WAL mode for SQLite (#7118)

https://www.sqlite.org/wal.html
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-09-07 15:58:48 +02:00
committed by GitHub
parent 67aaad15eb
commit 1d1a022def
3 changed files with 9 additions and 1 deletions

View File

@@ -576,7 +576,7 @@ export async function getVariableById(id: string) {
* Generate options for an in-memory sqlite database connection,
* one per test suite run.
*/
export const getSqliteOptions = ({ name }: { name: string }): ConnectionOptions => {
const getSqliteOptions = ({ name }: { name: string }): ConnectionOptions => {
return {
name,
type: 'sqlite',
@@ -586,6 +586,7 @@ export const getSqliteOptions = ({ name }: { name: string }): ConnectionOptions
migrations: sqliteMigrations,
migrationsTableName: 'migrations',
migrationsRun: false,
enableWAL: config.getEnv('database.sqlite.enableWAL'),
};
};