MariaDB Connector/Node.js is used to connect applications developed on Node.js to MariaDB and MySQL databases. MariaDB Connector/Node.js is LGPL licensed.
const migrateTables = async () => {
// .... connection and other preparations
const filenames = fs.readdirSync('migrations/tables');
for (const filename of filenames) {
try {
console.log(`Migrating ${filename}`)
await conn.importFile({file: `migrations/tables/${filename}`, database: targetDb})
} catch (e) {
console.error(`Migrate error in file ${filename}: ${e}`)
}
}
}
I get no error messages and no errors at all. I've found errors only when enabling debug mode. There are messages from the server with errors.
Is there is possibility of getting errors without debug mode?
I have code to migrate from old DB to new
I get no error messages and no errors at all. I've found errors only when enabling debug mode. There are messages from the server with errors. Is there is possibility of getting errors without debug mode?