Skip to content

Commit 1a5cda0

Browse files
feat(db-migrations): improved logging in patcher.mjs
1 parent 4653f03 commit 1a5cda0

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

packages/db-migrations/bin/patcher.mjs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ for (const db of databases) {
4242
);
4343
try {
4444
const cfg = conf.get(db);
45+
console.log('Patching', db, 'to', level);
4546
await patch({
4647
user: cfg.user,
4748
password: cfg.password,
@@ -55,11 +56,14 @@ for (const db of databases) {
5556
createDatabase: true,
5657
reversePatchAllowed: false,
5758
database: cfg.database,
59+
}, function(err, res) {
60+
console.log('Results:', res)
5861
});
62+
console.log('Successfully patched', db, 'to', level);
5963
} catch (error) {
6064
// fyi these logs show up in `pm2 logs mysql`
61-
console.error(error);
62-
console.error(db, 'failed to patch to', level);
65+
console.error('Error:',error);
66+
console.error('Failed to patch', db, 'to', level);
6367
process.exit(2);
6468
}
6569
}

0 commit comments

Comments
 (0)