question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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)

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
tomhoulecommented, Feb 25, 2021

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.

1reaction
tomhoulecommented, Feb 25, 2021

Do you guys have a release date for 2.18.0?

Next tuesday 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prisma - Supabase
This guide explains how to quickly connect the Postgres database provided by Supabase to a Prisma project. Prisma is an open source next-generation...
Read more >
django-south Error during migrate - python - Stack Overflow
You are getting the SQL error "Table 'django_site' already exists" so for some reason that table already exists. – vicvicvic. Jan 5, 2015...
Read more >
Adding Prisma Migrate to an existing project
This can happen if: A migration failed, either because of an error or because it was interrupted while running (for example, unexpected shutdown);...
Read more >
MySQL : Mysql 1050 Error "Table already exists" when in fact ...
MySQL : Mysql 1050 Error " Table already exists " when in fact, it does not [ Beautify Your Computer ...
Read more >
Effortless database schema migration with Prisma
Learn how to use Prisma Migrate to perform database schema migrations, reducing the tedium (and improving the performance) of your code.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found