Skip to content

Commit 39a64bd

Browse files
authored
Merge pull request #18267 from mozilla/improve-db-migration-patcher-logging
feat(db-migrations): improved logging in patcher.mjs
2 parents 8b10c5e + 1a0f10f commit 39a64bd

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

packages/db-migrations/bin/patcher.mjs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ for (const db of databases) {
4242
);
4343
try {
4444
const cfg = conf.get(db);
45-
await patch({
45+
console.log(`Patching ${db} to ${level}`);
46+
let results = await patch({
4647
user: cfg.user,
4748
password: cfg.password,
4849
host: cfg.host,
@@ -56,10 +57,12 @@ for (const db of databases) {
5657
reversePatchAllowed: false,
5758
database: cfg.database,
5859
});
60+
console.log(`Results: ${results}`);
61+
console.log(`Successfully patched ${db} to ${level}`);
5962
} catch (error) {
6063
// fyi these logs show up in `pm2 logs mysql`
61-
console.error(error);
62-
console.error(db, 'failed to patch to', level);
64+
console.error(`Error: ${error}`);
65+
console.error(`Failed to patch ${db} to ${level}`);
6366
process.exit(2);
6467
}
6568
}

0 commit comments

Comments
 (0)