Skip to main content
Glama

Prisma MCP Server

Official
by prisma
Apache 2.0
4
44,192
  • Linux
  • Apple
warnDatasourceDriverAdapter.ts1.18 kB
import { SchemaContext } from '@prisma/internals' const DEPRECATED_PROPERTIES = ['url', 'directUrl', 'shadowDatabaseUrl'] // Due to the complexity of making the datasource.url truly optional across the codebase // this placeholder value is used in the PSL parser if no URL property is given. const NO_URL_PLACEHOLDER = '<invalid>' export function warnDatasourceDriverAdapter(schemaContext: SchemaContext | undefined) { if (!schemaContext) return const foundProperties: string[] = [] for (const property of DEPRECATED_PROPERTIES) { if ( schemaContext.primaryDatasource?.[property] && schemaContext.primaryDatasource?.[property].value !== NO_URL_PLACEHOLDER ) { foundProperties.push(property) } } if (foundProperties.length > 0) { process.stdout.write( ` WARNING: Your schema specifies the following datasource properties but you are using a Driver Adapter via prisma.config.ts: ${foundProperties.map((property) => `- ${property}`).join('\n')} The values from your schema will NOT be used! We recommend you to remove those properties from your schema to avoid confusion if you are only using driver adapters. `, ) } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/prisma/prisma'

If you have feedback or need assistance with the MCP directory API, please join our Discord server