Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no error messages with importFile() method #253

Closed
sergey-ovsiannikov opened this issue Sep 21, 2023 · 1 comment
Closed

no error messages with importFile() method #253

sergey-ovsiannikov opened this issue Sep 21, 2023 · 1 comment

Comments

@sergey-ovsiannikov
Copy link

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?

@rusher
Copy link
Collaborator

rusher commented Sep 25, 2023

reproducted, errors in imported commands in last 16kb of imported file won't throw error. This will be corrected in 3.2.2

@rusher rusher closed this as completed Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants