You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Prisma does not support have first-class support for Postgres generated columns but they still kind of work if you :
Write the migration yourself
Declare them in the prisma schema as optional with @default(dbgenerated())(see the prisma docs)
generatedField String? @default(dbgenerated()) /// note the empty argument
Issue
However, zmodels don't seem to allow calling dbgenerated() without arguments. Running zenstack generate with the previous example will output the following error :
missing argument for parameter "expr"
Expected behavior
zmodels should allow @default(dbgenerated()) and generate the prisma schema accordingly
Environment
ZenStack version: 2.0.2
Prisma version: 5.10.2
Database type: Postgresql
The text was updated successfully, but these errors were encountered:
Description and expected behavior
Description
Prisma does not support have first-class support for Postgres generated columns but they still kind of work if you :
@default(dbgenerated())
(see the prisma docs)Issue
However, zmodels don't seem to allow calling dbgenerated() without arguments. Running
zenstack generate
with the previous example will output the following error :Expected behavior
zmodels should allow
@default(dbgenerated())
and generate the prisma schema accordinglyEnvironment
The text was updated successfully, but these errors were encountered: