prisma: Error: Failure during a migration command: Connector error. (error: Error querying the database: Error querying the database: Server error: `ERROR 42S01 (1050): Table './/City' already exists'

Command: prisma migrate up --experimental Version: 2.5.0 Binary Version: 9a670138b1db276001d785a2adcba1584c869d24 Report: https://prisma-errors.netlify.app/report/10459 OS: x64 darwin 19.5.0

JS Stacktrace:

Error: Failure during a migration command: Connector error. (error: Error querying the database: Error querying the database: Server error: `ERROR 42S01 (1050): Table './<folder-name>/City' already exists'
   0: migration_core::api::ApplyMigration
           with migration_id="20200723100056-test"
             at migration-engine/core/src/api.rs:79)
    at Object.<anonymous> (/path/node_modules/@prisma/cli/build/index.js:2:2145445)
    at MigrateEngine.handleResponse (/path/node_modules/@prisma/cli/build/index.js:2:2143653)
    at LineStream.<anonymous> (/path/node_modules/@prisma/cli/build/index.js:2:2145110)
    at LineStream.emit (events.js:311:20)
    at LineStream.EventEmitter.emit (domain.js:482:12)
    at addChunk (_stream_readable.js:294:12)
    at readableAddChunk (_stream_readable.js:275:11)
    at LineStream.Readable.push (_stream_readable.js:209:10)
    at LineStream.Transform.push (_stream_transform.js:152:32)
    at LineStream._pushBuffer (/path/node_modules/@prisma/cli/build/index.js:2:1813582)

Rust Stacktrace:

Failure during a migration command: Connector error. (error: Error querying the database: Error querying the database: Server error: `ERROR 42S01 (1050): Table './<folder-name>/City' already exists'
   0: migration_core::api::ApplyMigration
           with migration_id="20200723100056-test"
             at migration-engine/core/src/api.rs:79)

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 16 (6 by maintainers)

Most upvoted comments

Hi @dopefatimah and @DavideCarvalho the code to detect mysql installations of windows in migrate (they are broken otherwise because itโ€™s the only environment where table names are lower cased automatically by the database) has a regression in 2.17.0. It will be fixed in 2.18.0. For now, the solution to your problem would 1. reverting to 2.16.0, or 2. use prisma@dev.

Do you guys have a release date for 2.18.0?

Next tuesday ๐Ÿ˜ƒ

Do you guys have a release date for 2.18.0?

Migrate is known not to work on MySQL on windows, because it is case-insensitive. There is an issue to track this: https://github.com/prisma/prisma-engines/issues/950