Skip to main content
Glama

Prisma MCP Server

Official
by prisma
Apache 2.0
4
44,192
  • Linux
  • Apple
handlePanic.migrate.test.ts1.65 kB
import { inferDirectoryConfig, loadSchemaContext, RustPanic } from '@prisma/internals' import { join } from 'path' import { Migrate } from '../Migrate' import { createDefaultTestContext } from './__helpers__/context' const ctx = createDefaultTestContext() const isWindows = ['win32'].includes(process.platform) describe('handlePanic migrate', () => { beforeEach(() => { jest.resetModules() // most important - it clears the cache }) it('engine panic no interactive mode in CI', async () => { process.env.FORCE_PANIC_SCHEMA_ENGINE = '1' ctx.fixture('handle-panic') expect.assertions(isWindows ? 4 : 5) const schemaPath = join(ctx.tmpDir, 'schema.prisma') const schemaContext = await loadSchemaContext({ schemaPathFromArg: schemaPath }) const { migrationsDirPath } = inferDirectoryConfig(schemaContext) try { const migrate = await Migrate.setup({ migrationsDirPath, schemaContext }) await migrate.createMigration({ migrationName: 'setup', draft: false, schema: migrate.getPrismaSchema(), }) } catch (e) { const error = e as RustPanic expect(error).toMatchInlineSnapshot(` "Error in Schema engine. Reason: [/some/rust/path:0:0] This is the debugPanic artificial panic " `) expect(JSON.parse(JSON.stringify(error))).toMatchObject({ area: 'LIFT_CLI', }) expect(error.message).toContain('This is the debugPanic artificial panic') expect(error.rustStack).toContain('[EXIT_PANIC]') if (!isWindows) { expect(error.rustStack).toContain('std::panicking::') } } }) })

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