[Windows/MySQL] Table `_migration` doesn't exist when migrating
See original GitHub issuePrisma version: 2.0.0-preview020.3
Operating System: Windows 10
Schema:
generator client {
provider = "prisma-client-js"
}
datasource db {
default = true
provider = "mysql"
url = "mysql://root@localhost:3306/prisma2_api_rest"
}
enum Role {
ADMIN
USER
}
model User {
id Int @id
email String @unique
role Role @default(USER)
username String @unique
}
When I try to run my migrations, I receive the following error:
Failure during a migration command: Connector error. (error: Error querying the database: Error querying the database: Error querying the database: Server error: `ERROR 42S02 (1146): Table 'prisma2_api_rest._migration' doesn't exist')
It also seems like the migration is dropping the table if it exists, but then it tries to access it which causes the error, as when running the migration I see the following:
Migration Database actions Status
20200129144426-init 1 DropTable, 2 CreateTable statements.
Not entirely sure that’s significant though, because I’ve tried dropping the database and just creating the empty database with the same results.
I’ve also tried the TypeScript rest-express
example and received the same error. I can provide the tiny package setup as a GitHub repo if need be, but given that I get the same error in the example I can’t imagine I’d be doing anything significantly different that’d cause this.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:18 (7 by maintainers)
Top Results From Across the Web
[Windows/MySQL] Table `_migration` doesn't exist ... - GitHub
It works at WSL2 (Ubuntu 20.02) + MySQL 8.0.21. At windows OS, attach the code below to prisma.schema . And then, you can...
Read more >File not exist when run mysql database migrations on windows
\internal\db\migrations , this is migration files path. First of all i run the command docker compose up .for an existing docker.yaml , then...
Read more >Diagnose issues for MySQL | Database Migration Service
This can happen if the migration job can't find the dump file at the given location. Check the dump path to ensure a...
Read more >10.2.1 A Visual Guide to Performing a Database Migration
From MySQL Workbench, choose Database and then Migrate to open the migration wizard and display the migration wizard overview (see the figure that...
Read more >SELECT * FROM error: table does not exist - post migration
Dear All, Following a migration from MS Access to Oracle SQL, via Oracle SQL Developer, I am unable to perform a simple SELECT...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I can confirm that at least on my system this does now work out of the box! 😃
Great 😃 Then I’m happy to say it looks like we can close this issue. Thanks for the feedback!