fix(db): generator keeps NOT NULL boolean defaults; fails if a JSON interface import survives

This commit is contained in:
jubnl
2026-09-22 10:39:07 +02:00
parent 257529b250
commit 7534c2f903
2 changed files with 8 additions and 1 deletions
@@ -855,6 +855,7 @@ describe('generateEntities — migrations path is anchored to SERVER_ROOT, not c
'MIGPATH-001: generation still finds migrations when run from the repo root instead of server/',
async () => {
const originalCwd = process.cwd();
// process.chdir() is only safe because vitest.config.ts uses pool: 'forks' (a worker thread cannot chdir).
process.chdir(path.join(__dirname, '../../../..')); // server/tests/unit/db -> repo root
try {
const { files } = await generateEntities();