-
Notifications
You must be signed in to change notification settings - Fork 2.1k
db pull can't parse script setting default value #23453
Copy link
Copy link
Closed
prisma/prisma-engines
#4884Labels
bug/2-confirmedBug has been reproduced and confirmed.Bug has been reproduced and confirmed.kind/bugA reported bug.A reported bug.topic: CREATE DEFAULT ... AS ...topic: defaulttopic: prisma db pullCLI: prisma db pullCLI: prisma db pulltopic: sql serverMicrosoft SQL ServerMicrosoft SQL Servertopic: unwrap error
Milestone
Description
Bug description
When I try to introspect the database, I get an error about a script that sets a default value for a column as 'Non'.
Here is the script :
/****** Object: Default dbo.Non Script Date: 21/12/98 09:42:22 ******/
/****** Object: Default dbo.Non Script Date: 03/12/98 14:41:54 ******/
/****** Object: Default dbo.Non Script Date: 20/10/98 14:23:35 ******/
/****** Object: Default dbo.Non Script Date: 19/10/98 09:48:52 ******/
/****** Objet: valeur par défaut: dbo.Non Date de script: 16/10/98 18:26:53 ******/
create default Non as 'Non'
How to reproduce
npx prisma db pull
Expected behavior
The introspection get all the tables from the database and translate them into models in schema.prisma
Prisma information
npx prisma db pull
schema :
generator client {
provider = "prisma-client-js"
previewFeatures = ["views"]
}
datasource db {
provider = "sqlserver"
url = env("DATABASE_URL")
}
Environment & setup
- OS: Ubuntu
- Database: SQL Server
- Node.js version: v20.11.1
Prisma Version
Environment variables loaded from .env
prisma : 5.10.2
@prisma/client : 5.10.2
Computed binaryTarget : debian-openssl-3.0.x
Operating System : linux
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug/2-confirmedBug has been reproduced and confirmed.Bug has been reproduced and confirmed.kind/bugA reported bug.A reported bug.topic: CREATE DEFAULT ... AS ...topic: defaulttopic: prisma db pullCLI: prisma db pullCLI: prisma db pulltopic: sql serverMicrosoft SQL ServerMicrosoft SQL Servertopic: unwrap error