Skip to content
This repository was archived by the owner on Jul 28, 2026. It is now read-only.

Commit 3ebdb1a

Browse files
committed
fix: add debug logging for skipped migration constraints to ease debugging
1 parent e8ef98a commit 3ebdb1a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

config/migrate.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,10 @@ export async function migrate() {
9999
try {
100100
await query(c.sql);
101101
console.log(`Applied constraint: ${c.name}`);
102-
} catch {
103-
// Constraint already exists or table missing — safe to ignore
102+
} catch (err) {
103+
if (process.env.NODE_ENV !== 'production') {
104+
console.log(`Skipped constraint ${c.name}: ${err.message}`);
105+
}
104106
}
105107
}
106108
}

0 commit comments

Comments
 (0)