-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enhancement(database)!: shorten prefixes and suffixes used in identifiers #19783
enhancement(database)!: shorten prefixes and suffixes used in identifiers #19783
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…short-db-prefixes
…short-db-prefixes
…short-db-prefixes
…short-db-prefixes
* @param {NameToken[]} nameTokens - Array of name tokens | ||
* @param {number} [maxLength] - Maximum length for the final name string. | ||
* @param {NameFromTokenOptions} options - Name token options | ||
* @returns {string} The generated name string within maxLength. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to keep those jsdoc tags since we already have the TS types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one comment, otherwise looks great
index: 'idx', | ||
inv_fk: 'ifk', | ||
order_fk: 'ofk', | ||
id_column_index: 'idix', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be shortened to something like this, i mean looking at how we are shortening index everywhere else
id_column_index: 'idix', | |
id_column_index: 'ididx', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used idix
because that's what was in the RFC but I have no idea where that came from or why. If anyone wants to vote here, I'll go with whatever the consensus is, I don't think it's super important as long as we document it.
…short-db-prefixes
1a78eec
into
enhancement/short-db-names-migration
What does it do?
Use shorter prefixes and suffixes in generated metadata, for example using "cmps" instead of "components" and "lnk" instead of "links"
Why is it needed?
To make more space available for the actual names of content types and attribute in our database names
How to test it?
See #19732 and follow the same testing instructions. The only difference is that now suffixes and prefixes should also be renamed to the shorter versions.
Related issue(s)/PR(s)
The core migration without shorter prefixes and suffixes: #19732