mirror of
https://github.com/catdevnull/preciazo.git
synced 2025-02-22 21:16:27 +00:00
setear WAL en migracióñ
This commit is contained in:
parent
241969e678
commit
e6ae2d629e
2 changed files with 4 additions and 4 deletions
|
@ -9,6 +9,10 @@ export function migrateDb() {
|
|||
const db = drizzle(sqlite, { schema });
|
||||
|
||||
migrate(db, { migrationsFolder: "./drizzle" });
|
||||
sqlite.run(`
|
||||
pragma journal_mode = WAL;
|
||||
PRAGMA synchronous = NORMAL;
|
||||
`);
|
||||
|
||||
sqlite.close();
|
||||
}
|
||||
|
|
|
@ -20,10 +20,6 @@ migrateDb();
|
|||
const sqlite = new Database(DB_PATH);
|
||||
const db = drizzle(sqlite, { schema });
|
||||
|
||||
sqlite.run(`
|
||||
pragma journal_mode = WAL;
|
||||
PRAGMA synchronous = NORMAL;
|
||||
`);
|
||||
const getPrevPrecio = db
|
||||
.select({ id: schema.precios.id })
|
||||
.from(schema.precios)
|
||||
|
|
Loading…
Reference in a new issue