The default MySQL database is mysql and contains all the system tables. Users should not use this table for their data. We should at least warn, or even better, forbid to use that table. Also, it prints warnings about those system tables when running prisma migrate.
docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=pw -d mysql:5.6
yarn prisma migrate save --create-db --name "init" --experimental
yarn prisma migrate up --experimental
Should fail with an error that you're not supposed to use the system database.
datasource db {
provider = "mysql"
url = "mysql://root:pw@localhost:3306"
// or
url = "mysql://root:pw@localhost:3306/mysql"
}
generator db {
provider = "prisma-client-js"
}
model User {
id String @id @default(cuid())
email String @unique
username String
name String?
}
prisma -v to see your Prisma version] 2.0.0-beta.5node -v to see your Node.js version] v10.16.3What I think makes sense:
To my knowledge, this is already implemented. I think this issue can be closed.
Most helpful comment
What I think makes sense: