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
Problem
There are multiple default values that are not persisted in the database, most important
uuid()andcuid(). 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()oruuid()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