Skip to content

Crash introspecting MSSQL database with DEFAULTs #11557

@sbleon

Description

@sbleon

Hi Prisma Team! Prisma Migrate just crashed.

Command

introspect

Versions

Name Version
Platform darwin-arm64
Node v14.15.4
Prisma CLI 3.9.0
Engine bcc2ff906db47790ee902e7bbc76d7ffb1893009

Error

Error: [libs/sql-schema-describer/src/mssql.rs:315:30] called `Result::unwrap()` on an `Err` value: "Couldn't parse default value: `create default [valueZero] as 0`"

Our SQL Server database schema has this in it:

CREATE DEFAULT [dbo].[valueZero]
AS
0

(This DEFAULT isn't referenced by name anywhere, but I can't DROP it because "it is bound to one or more column".)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions