Skip to content

cuid safe maximum length #5060

@ghost

Description

In the cuid remarks sections, the docs say:

Since the length of cuid() output is undefined per the cuid creator, a safe minimum field size is 30 characters, in order to allow for enough characters for very large values. If you set the minimum field size as less than 30, and then a larger value is generated by cuid(), you might see Prisma errors such as Error: The provided value for the column is too long for the column's type.

I believe the docs should say:

Since the length of cuid() output is undefined per the cuid creator, a safe maximum field size is 30 characters, in order to allow for enough characters for very large values. If you set the maximum field size as less than 30, and then a larger value is generated by cuid(), you might see Prisma errors such as Error: The provided value for the column is too long for the column's type.

Notice where I've changed the word "minimum" to "maximum".

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/docsDocumentation creation, updates or corrections

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions