Skip to content

no error messages with importFile() method #253

@sergey-ovsiannikov

Description

@sergey-ovsiannikov

I have code to migrate from old DB to new

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions