-
-
Notifications
You must be signed in to change notification settings - Fork 18
Add ENUM column
#448
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
Add ENUM column
#448
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #448 +/- ##
============================================
+ Coverage 98.70% 98.73% +0.02%
- Complexity 252 259 +7
============================================
Files 24 24
Lines 775 791 +16
============================================
+ Hits 765 781 +16
Misses 10 10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull request overview
This PR adds native MySQL ENUM column type support by introducing the EnumColumn class and implementing the necessary building logic for column definitions.
Key Changes:
- Migrates
enum_coltest data fromStringColumntoEnumColumnwith the newvaluesproperty - Implements
buildType()method support for generatingENUM(...)column definitions - Adds
buildCheck()method override to prevent redundant CHECK constraints on native ENUM columns - Adds comprehensive test coverage for enum column functionality
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/Provider/SchemaProvider.php | Updates test data to use EnumColumn instead of StringColumn for enum columns with new values property |
| tests/Column/EnumColumnTest.php | Adds MySQL-specific tests for enum column parsing, including negative tests for non-enum CHECK constraints |
| tests/Column/ColumnDefinitionBuilderTest.php | Adds unit tests for building enum column definitions, including case-sensitivity handling |
| src/Column/ColumnDefinitionBuilder.php | Implements enum type building logic and CHECK constraint suppression for native MySQL ENUM types |
| CHANGELOG.md | Documents the new enumeration column type support feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Related to yiisoft/db#1107