@jakaman/nestjs-pris-lite 1.0.7 ā 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +2 -2
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -121,7 +121,7 @@ import { PrismaBetterSqlite3 } from '@prisma/adapter-better-sqlite3';
|
|
|
121
121
|
export class PrismaService extends PrismaClient {
|
|
122
122
|
constructor() {
|
|
123
123
|
|
|
124
|
-
const adapter = new PrismaBetterSqlite3({ url: "file:./${dbFileName}
|
|
124
|
+
const adapter = new PrismaBetterSqlite3({ url: "file:./${dbFileName}" });
|
|
125
125
|
super({ adapter });
|
|
126
126
|
}
|
|
127
127
|
|
|
@@ -137,7 +137,7 @@ export class PrismaService extends PrismaClient {
|
|
|
137
137
|
console.log(`\nš ļø 6. Optimizing database (${dbFileName})...`);
|
|
138
138
|
|
|
139
139
|
// Path to the db file relative to project root
|
|
140
|
-
const dbPath =
|
|
140
|
+
const dbPath = `./${dbFileName}`;
|
|
141
141
|
|
|
142
142
|
// One-liner: Requires better-sqlite3, opens db, sets WAL, then closes.
|
|
143
143
|
const optimizeCmd = `node -e "const db = require('better-sqlite3')('${dbPath}'); db.pragma('journal_mode = WAL'); db.pragma('foreign_keys = ON'); db.close();"`;
|