add real enum support for mysql/mariadb#1883
Open
Abdeldjalil-H wants to merge 2 commits intotortoise:developfrom
Open
add real enum support for mysql/mariadb#1883Abdeldjalil-H wants to merge 2 commits intotortoise:developfrom
Abdeldjalil-H wants to merge 2 commits intotortoise:developfrom
Conversation
CodSpeed Performance ReportMerging #1883 will not alter performanceComparing Summary
|
Contributor
Author
|
Partially addresses #937 |
henadzit
requested changes
Feb 16, 2025
Contributor
henadzit
left a comment
There was a problem hiding this comment.
Thanks for the contribution! However, I have multiple concerns about this change:
- This is a breaking change
- This is not supported by aerich which is used by a lot of people
- This change will make the MySQL integration standout
If we decide to use the database enums, I think it should be a more complex change:
- Implement this for all databases that support enums
- Update aerich to support enums
- Make sure aerich can handle the migration to enums
Potentially we might have a configuration option on a field to regulate whether to use database enums to smooth the migration.
This file contains hidden or 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
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.
Description
Added MySQL-specific implementation for CharEnumField to properly support native ENUM types in MySQL databases. This implementation:
db_mysqlclass for CharEnumFieldInstanceMotivation and Context
Currently, CharEnumField doesn't utilize MySQL's native ENUM type, instead storing enum values as regular VARCHAR fields. This change improves:
How Has This Been Tested?
make testChecklist: