Skip to content

[Re-Introspection] Keep defaults that are not persisted in the database (cuid() and uuid()) #2534

@janpio

Description

@janpio

Problem

There are multiple default values that are not persisted in the database, most important uuid() and cuid(). Re-Introspection thus looses them, making it necessary for users to be on the lookout for them and apply them manually again.

Suggested solution

Use the old schema as input to figure out if these fields were cuid() or uuid() before and apply those as defaults for the fields again.

(Additional rules to the possible native field type may apply and might give additional input if the default is still applicable to the field)


Related issue that adds these default to the schema on Introspection of a P1 schema in the first place: #2499

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions