Skip to content

Adjust wording of comment when dbgenerated() is added via introspection #4369

@nikolasburk

Description

@nikolasburk

If a default value is set in the DB that we currently can't represent in the Prisma schema, we add @default(dbgenerated()) as a generic fallback.

We also add a comment to the field that reads: "This field's default value can currently not be parsed: uuid_generate_v4().":

model Log {
  /// This field's default value can currently not be parsed: `uuid_generate_v4()`.
  uuid           String    @id @default(dbgenerated())

  @@map("log")
}

The wording of this comment is currently a bit confusing since it indicates that something might have gone wrong. I suggest to adjust the copy to:

The value of this field is generated by the database as: `uuid_generate_v4()`

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions