mirror of
https://github.com/catdevnull/preciazo.git
synced 2024-11-22 22:26:19 +00:00
Compare commits
4 commits
0f4be235fb
...
38b6b62aba
Author | SHA1 | Date | |
---|---|---|---|
38b6b62aba | |||
b715781b07 | |||
c5a38fee7b | |||
ce6803f9b9 |
4 changed files with 727 additions and 442 deletions
|
@ -10,6 +10,12 @@ let db = null;
|
||||||
export function getDb() {
|
export function getDb() {
|
||||||
if (db) return db;
|
if (db) return db;
|
||||||
const sqlite = new Database(DB_PATH);
|
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 });
|
db = drizzle(sqlite, { schema, logger: true });
|
||||||
migrateDb(db);
|
migrateDb(db);
|
||||||
return db;
|
return db;
|
||||||
|
|
|
@ -12,12 +12,12 @@
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"better-sqlite3": "^9.2.2",
|
"better-sqlite3": "^9.5.0",
|
||||||
"drizzle-orm": "^0.29.1"
|
"drizzle-orm": "^0.30.8"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/better-sqlite3": "^7.6.8",
|
"@types/better-sqlite3": "^7.6.9",
|
||||||
"@types/node": "^20.10.6",
|
"@types/node": "^20.12.7",
|
||||||
"drizzle-kit": "^0.20.13"
|
"drizzle-kit": "^0.20.14"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
1113
pnpm-lock.yaml
1113
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
|
@ -14,32 +14,32 @@
|
||||||
"format": "prettier --write ."
|
"format": "prettier --write ."
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sveltejs/adapter-node": "^2.0.2",
|
"@sveltejs/adapter-node": "^2.1.2",
|
||||||
"@sveltejs/kit": "^2.0.0",
|
"@sveltejs/kit": "^2.5.5",
|
||||||
"@sveltejs/vite-plugin-svelte": "^3.0.0",
|
"@sveltejs/vite-plugin-svelte": "^3.1.0",
|
||||||
"@types/better-sqlite3": "^7.6.8",
|
"@types/better-sqlite3": "^7.6.9",
|
||||||
"@types/node": "^20.10.6",
|
"@types/node": "^20.12.7",
|
||||||
"autoprefixer": "^10.4.16",
|
"autoprefixer": "^10.4.19",
|
||||||
"db-datos": "workspace:^",
|
"db-datos": "workspace:^",
|
||||||
"postcss": "^8.4.32",
|
"postcss": "^8.4.38",
|
||||||
"postcss-load-config": "^5.0.2",
|
"postcss-load-config": "^5.0.3",
|
||||||
"prettier": "^3.1.1",
|
"prettier": "^3.2.5",
|
||||||
"prettier-plugin-svelte": "^3.1.2",
|
"prettier-plugin-svelte": "^3.2.3",
|
||||||
"prettier-plugin-tailwindcss": "^0.5.9",
|
"prettier-plugin-tailwindcss": "^0.5.13",
|
||||||
"svelte": "^4.2.7",
|
"svelte": "^4.2.14",
|
||||||
"svelte-check": "^3.6.0",
|
"svelte-check": "^3.6.9",
|
||||||
"tailwindcss": "^3.3.6",
|
"tailwindcss": "^3.4.3",
|
||||||
"tslib": "^2.4.1",
|
"tslib": "^2.6.2",
|
||||||
"typescript": "^5.0.0",
|
"typescript": "^5.4.5",
|
||||||
"vite": "^5.0.3"
|
"vite": "^5.2.8"
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"better-sqlite3": "^9.2.2",
|
"better-sqlite3": "^9.5.0",
|
||||||
"chart.js": "^4.4.1",
|
"chart.js": "^4.4.2",
|
||||||
"chartjs-adapter-dayjs-4": "^1.0.4",
|
"chartjs-adapter-dayjs-4": "^1.0.4",
|
||||||
"dayjs": "^1.11.10",
|
"dayjs": "^1.11.10",
|
||||||
"drizzle-orm": "^0.29.1",
|
"drizzle-orm": "^0.30.8",
|
||||||
"zod": "^3.22.4"
|
"zod": "^3.22.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue