Skip to content

Commit

Permalink
cositas en la BD
Browse files Browse the repository at this point in the history
  • Loading branch information
catdevnull committed Apr 12, 2024
1 parent b715781 commit 38b6b62
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions db-datos/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ let db = null;
export function getDb() {
if (db) return db;
const sqlite = new Database(DB_PATH);
sqlite.exec(`PRAGMA journal_mode = WAL;`);
sqlite.exec(`PRAGMA busy_timeout = 15000;`);
sqlite.exec(`PRAGMA synchronous = NORMAL;`);
sqlite.exec(`PRAGMA cache_size = 1000000000;`);
sqlite.exec(`PRAGMA foreign_keys = true;`);
sqlite.exec(`PRAGMA temp_store = memory;`);
db = drizzle(sqlite, { schema, logger: true });
migrateDb(db);
return db;
Expand Down

0 comments on commit 38b6b62

Please sign in to comment.