P
Prisma•2w ago
Gauts

Prisma Studio v7 + mysql/mariadb - "introspect" operation failed

Hey, I just migrate my project to Prisma 7, its work, but studio does not work. When i try open, it says: "introspect" operation failed - No Tables Found Is there any bug? How can I fix it?
//packages
"@prisma/adapter-mariadb": "^7.0.0",
"@prisma/client": "^7.0.0",
//packages
"@prisma/adapter-mariadb": "^7.0.0",
"@prisma/client": "^7.0.0",
//prisma.config.ts
import "dotenv/config";
import { defineConfig, env } from "prisma/config";

export default defineConfig({
schema: "./schema.prisma",
datasource: {
url: env("DB_URL"),
},
migrations: {
path: "./migrations",
},
});
//prisma.config.ts
import "dotenv/config";
import { defineConfig, env } from "prisma/config";

export default defineConfig({
schema: "./schema.prisma",
datasource: {
url: env("DB_URL"),
},
migrations: {
path: "./migrations",
},
});
// schema.prisma
datasource db {
provider = "mysql"
}

generator client {
provider = "prisma-client"
output = "./generated/client"
}
// schema.prisma
datasource db {
provider = "mysql"
}

generator client {
provider = "prisma-client"
output = "./generated/client"
}
No description
17 Replies
Prisma AI Help
Prisma AI Help•2w ago
You selected the carefully hand-crafted route. A dev artisan will respond soon. Meanwhile, the #ask-ai channel awaits if you're curious!
Fardin
Fardin•2w ago
Same issue
Nurul
Nurul•2w ago
I am checking this.
Fardin
Fardin•2w ago
Any result?
FrancyMak
FrancyMak•2w ago
Almost same issue but with postgres
FrancyMak
FrancyMak•2w ago
No description
FrancyMak
FrancyMak•2w ago
// prisma.config.ts import 'dotenv/config' import { defineConfig, env, PrismaConfig } from 'prisma/config' export default defineConfig({ schema: 'prisma/schema.prisma', migrations: { path: 'prisma/migrations', }, datasource: { url: env('DATABASE_URL'), }, }) satisfies PrismaConfig
Nurul
Nurul•2w ago
I wasn't able to reproduce this for postgres.
No description
FrancyMak
FrancyMak•2w ago
I have no idea I took the default config from prisma postgres connection page
Nurul
Nurul•2w ago
Is your repo open source?
FrancyMak
FrancyMak•2w ago
literally copied and paste just to see if it was a mistake on my side Sadly not and it's under NDA I can share everything related to prisma though
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init

generator client {
provider = "prisma-client" // or `prisma-client-js`
output = "../lib/generated/prisma"
}

datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}

...models
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init

generator client {
provider = "prisma-client" // or `prisma-client-js`
output = "../lib/generated/prisma"
}

datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}

...models
db.ts
import { PrismaPg } from '@prisma/adapter-pg'
import { PrismaClient } from './generated/prisma/client'

const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL })
const prisma = new PrismaClient({ adapter })

export { prisma }
import { PrismaPg } from '@prisma/adapter-pg'
import { PrismaClient } from './generated/prisma/client'

const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL })
const prisma = new PrismaClient({ adapter })

export { prisma }
Nurul
Nurul•2w ago
Could you create a GitHub Issue and add information it asks for and the one you can provide: https://github.com/prisma/prisma/issues I'll get this checked with our ORM team
GitHub
prisma/prisma
Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB - prisma/prisma
FrancyMak
FrancyMak•2w ago
Sure
Gauts
GautsOP•2w ago
Yep, basic and simple config... impossible run the studio
Igal
Igal•7d ago
Hey 👋 MariaDB is not supported yet in this iteration - only PostgreSQL, MySQL and SQLite. You're seeing it trying to do MySQL-specific stuff and fail. Sorry about that. Issue being tracked in https://github.com/prisma/studio/issues/1367. @FrancyMak this issue is tracked in https://github.com/prisma/studio/issues/1363 and has a solution review pending. Sorry about that. As a temporary workaround, you can remove the schema query parameter from your connection string before starting Studio.
FrancyMak
FrancyMak•6d ago
I'm on prisma postgress i don't have that string
FrancyMak
FrancyMak•6d ago
No description

Did you find this page helpful?