Compare commits

..

4 commits

Author SHA1 Message Date
38b6b62aba cositas en la BD 2024-04-12 20:32:35 -03:00
b715781b07 upgrade a drizzle-orm 0.30 2024-04-12 20:23:51 -03:00
c5a38fee7b actualizar db-datos 2024-04-12 20:19:08 -03:00
ce6803f9b9 actualizar todoooo 2024-04-12 20:05:43 -03:00
4 changed files with 727 additions and 442 deletions

View file

@ -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;

View file

@ -12,12 +12,12 @@
"author": "",
"license": "ISC",
"dependencies": {
"better-sqlite3": "^9.2.2",
"drizzle-orm": "^0.29.1"
"better-sqlite3": "^9.5.0",
"drizzle-orm": "^0.30.8"
},
"devDependencies": {
"@types/better-sqlite3": "^7.6.8",
"@types/node": "^20.10.6",
"drizzle-kit": "^0.20.13"
"@types/better-sqlite3": "^7.6.9",
"@types/node": "^20.12.7",
"drizzle-kit": "^0.20.14"
}
}

File diff suppressed because it is too large Load diff

View file

@ -14,32 +14,32 @@
"format": "prettier --write ."
},
"devDependencies": {
"@sveltejs/adapter-node": "^2.0.2",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"@types/better-sqlite3": "^7.6.8",
"@types/node": "^20.10.6",
"autoprefixer": "^10.4.16",
"@sveltejs/adapter-node": "^2.1.2",
"@sveltejs/kit": "^2.5.5",
"@sveltejs/vite-plugin-svelte": "^3.1.0",
"@types/better-sqlite3": "^7.6.9",
"@types/node": "^20.12.7",
"autoprefixer": "^10.4.19",
"db-datos": "workspace:^",
"postcss": "^8.4.32",
"postcss-load-config": "^5.0.2",
"prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.1.2",
"prettier-plugin-tailwindcss": "^0.5.9",
"svelte": "^4.2.7",
"svelte-check": "^3.6.0",
"tailwindcss": "^3.3.6",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^5.0.3"
"postcss": "^8.4.38",
"postcss-load-config": "^5.0.3",
"prettier": "^3.2.5",
"prettier-plugin-svelte": "^3.2.3",
"prettier-plugin-tailwindcss": "^0.5.13",
"svelte": "^4.2.14",
"svelte-check": "^3.6.9",
"tailwindcss": "^3.4.3",
"tslib": "^2.6.2",
"typescript": "^5.4.5",
"vite": "^5.2.8"
},
"type": "module",
"dependencies": {
"better-sqlite3": "^9.2.2",
"chart.js": "^4.4.1",
"better-sqlite3": "^9.5.0",
"chart.js": "^4.4.2",
"chartjs-adapter-dayjs-4": "^1.0.4",
"dayjs": "^1.11.10",
"drizzle-orm": "^0.29.1",
"drizzle-orm": "^0.30.8",
"zod": "^3.22.4"
}
}