-
Notifications
You must be signed in to change notification settings - Fork 13
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
Migrating away from postgres CI fields. #513
Merged
oyvindhagberg
merged 1 commit into
unioslo:master
from
terjekv:migrate-away-from-ci-fields
May 21, 2024
Merged
Migrating away from postgres CI fields. #513
oyvindhagberg
merged 1 commit into
unioslo:master
from
terjekv:migrate-away-from-ci-fields
May 21, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terjekv
force-pushed
the
migrate-away-from-ci-fields
branch
from
August 18, 2023 08:23
3aab3b9
to
52ccd16
Compare
terjekv
force-pushed
the
migrate-away-from-ci-fields
branch
from
August 28, 2023 13:05
52ccd16
to
06b518a
Compare
terjekv
force-pushed
the
migrate-away-from-ci-fields
branch
from
September 18, 2023 07:09
06b518a
to
113999f
Compare
terjekv
force-pushed
the
migrate-away-from-ci-fields
branch
from
November 29, 2023 13:11
113999f
to
4a8c06c
Compare
terjekv
force-pushed
the
migrate-away-from-ci-fields
branch
from
December 5, 2023 08:34
4a8c06c
to
7eaa56e
Compare
terjekv
force-pushed
the
migrate-away-from-ci-fields
branch
from
April 22, 2024 15:49
7eaa56e
to
33d0178
Compare
oyvindhagberg
approved these changes
May 16, 2024
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.
Recently switched to trunk based development so the master branch is now considered development.
*Caveats:* - Assumes fields in LCI fields are all already in lowercase. No efforts are currently made to manipulate these fields. This is fixable if required. - Email fields are migrated to models.EmailField. Case insensitivity is not preserved. - Needs (much) more testing. Implementation details: - Creates two LowerCase-fields to replace the LCI-fields. - Uses a manager to hook into the calls to objects.get, objects.filter, and objects.exclude (the latter is currently unused). - Uses a mixin for views to overload get_object for relevant detail views. - Overloaded get_queryset() usage to check for exists are handled manually, should be cleaned up.
terjekv
force-pushed
the
migrate-away-from-ci-fields
branch
from
May 21, 2024 09:31
f9b4426
to
313aaac
Compare
terjekv
added a commit
that referenced
this pull request
May 23, 2024
- We have now moved on to collations in #513 so these hacks are no longer required.
terjekv
added a commit
that referenced
this pull request
May 23, 2024
- We have now moved on to collations in #513 so these hacks are no longer required.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Caveats:
get_db_prep_save
to guarantee only lowercase data is written.Implementation details:
LowerCaseCharField
andLowerCaseDNSField
. The latter inherits from the former. These fields will, like the LCI fields before them, save their data in lowercase by usingget_db_prep_save
.Noise:
Fixes #489