Skip to content

Add PostgresSchema to manage Postgres schemas with #206

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

Merged
merged 13 commits into from
Apr 12, 2023
Merged

Conversation

Photonios
Copy link
Member

No description provided.

@Photonios Photonios force-pushed the schema-management branch 2 times, most recently from 9d95720 to b757d69 Compare April 6, 2023 08:43
@Photonios Photonios requested a review from sewi-cpan April 6, 2023 09:02
@Photonios Photonios force-pushed the schema-management branch 2 times, most recently from 7fe9065 to 4d727a0 Compare April 10, 2023 12:08
Comment on lines 164 to 166
max_prefix_length = cls.NAME_MAX_LENGTH - len(suffix)

if len(prefix) > max_prefix_length:
Copy link
Contributor

Choose a reason for hiding this comment

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

Assumptions:

  1. Prefix len 50
  2. Suffix len 13
    max_prefix_length would be 63 - 13 = 50
    len(prefix) = 50 is not > max_prefix_length 50.
    The calling function does {prefix}_{suffix} which results in 50 + 1 + 13 = 64 chars.

Either remove the seperator from the creation functions or consider it here while calculating.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops, forgot about the separator. Taken into account now.

@Photonios Photonios requested a review from sewi-cpan April 12, 2023 07:02
@Photonios Photonios merged commit 784e7a1 into master Apr 12, 2023
@Photonios Photonios deleted the schema-management branch April 12, 2023 07:58
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.

2 participants