-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
prisma/prisma-engines
#4841Closed
Copy link
Labels
bug/2-confirmedBug has been reproduced and confirmed.Bug has been reproduced and confirmed.tech/engines/migration engineIssue in the Migration EngineIssue in the Migration Enginetopic: UnsupportedScalar pseudo type `Unsupported`Scalar pseudo type `Unsupported`topic: dbgeneratedtopic: generated columns
Milestone
Description
Bug description
Using a default(dbgenerated()) on a column with type Unsupported("...") where a Postgres generated column is manually added leads to Prisma migrate wanting to DROP DEFAULT on that column, which is an error in pg.
Empty dbgenerated() were broken for all column types in v4 and fixed recently here: #14799. Seems like the fix didn't apply to Unsupported() types.
How to reproduce
Clone & follow instructions here:
https://github.com/jkcorrea/prisma-unsupported-dbgenerated-bug
Expected behavior
To not touch the defaults for any columns with default(dbgenerated()
Prisma information
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model table {
id String @id
hereBeDragons Unsupported("tsvector")? @default(dbgenerated())
}Environment & setup
- OS: macOS
- Database: Postgres
- Node.js version: v16.15.1
Prisma Version
Happens on prisma v4+ (including v4.4 and v4.5)
andyfleming, mwanago, androbwebb, Druue and shawnli-capix
Metadata
Metadata
Assignees
Labels
bug/2-confirmedBug has been reproduced and confirmed.Bug has been reproduced and confirmed.tech/engines/migration engineIssue in the Migration EngineIssue in the Migration Enginetopic: UnsupportedScalar pseudo type `Unsupported`Scalar pseudo type `Unsupported`topic: dbgeneratedtopic: generated columns