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

Changing relative_path and digest to CharFields #153

Merged
merged 1 commit into from Feb 26, 2019

Conversation

daviddavis
Copy link
Contributor

@daviddavis daviddavis commented Jan 3, 2019

The relative_path and digest fields are text fields and are used in a constraint which MySQL doesn't
support.

@daviddavis daviddavis force-pushed the issue4288 branch 2 times, most recently from 1e70af2 to 6f36d5b Compare January 3, 2019 22:55
@daviddavis daviddavis changed the title Changing relative_path to a CharField Changing relative_path and digest to CharFields Feb 25, 2019
The relative_path and digest fields are text fields and are part of a
unique constraint which MySQL/mariadb doesn't support.

ref #4288
https://pulp.plan.io/issues/4288
Copy link
Member

@bmbouter bmbouter left a comment

Choose a reason for hiding this comment

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

This looks good to me. Thanks @daviddavis !

@daviddavis daviddavis merged commit c0ff733 into pulp:master Feb 26, 2019
relative_path = models.TextField(null=False)
digest = models.TextField(null=False)
relative_path = models.CharField(max_length=255, null=False)
digest = models.CharField(max_length=255, null=False)
Copy link
Collaborator

Choose a reason for hiding this comment

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

If "digest" is expected to always be a sha256, we can just use 64, the length of a sha256 hash.

Also I'm sure 255 chars is more than relative_path will typically need but we may want to document that limitation, and maybe try to think if it could ever be violated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I opened a PR for the digest change and an issue to discuss the relative_path problem.

PR: #191

Issue: https://pulp.plan.io/issues/4544

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