Skip to content
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

Fix issues linked to name maximum length #6839

Closed
wants to merge 2 commits into from

Conversation

ijreilly
Copy link
Collaborator

@ijreilly ijreilly commented Sep 2, 2024

No description provided.

@@ -1 +1 @@
export const DATABASE_IDENTIFIER_MAXIMUM_LENGTH = 63;
export const DATABASE_IDENTIFIER_MAXIMUM_LENGTH = 62;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What changed? It seems like we need to have objects no longer than 61 (62 - 1) characters long, I can't figure out why.
Getting errors like

QueryFailedError: type "_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaao" already exists

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

63 is the default limit for PSQL identifiers such as columns, tables, indexes etc
I'm guessing we need to remove 1 because we need to take into account the "_" for custom entities (as of today, only table names I believe). That logic should already exist though 🤔 @ijreilly

@bosiraphael
Copy link
Contributor

@ijreilly Can we close this PR?

@ijreilly
Copy link
Collaborator Author

@bosiraphael I would like to resume working on it at some point but i can close it in the meantime if that helps with our "stats" of open PRs. or it would be good to take out draft PRs of the number of open PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants