Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #415 +/- ##
============================================
+ Coverage 98.62% 98.64% +0.02%
- Complexity 247 251 +4
============================================
Files 26 26
Lines 800 812 +12
============================================
+ Hits 789 801 +12
Misses 11 11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Tigrov
approved these changes
Nov 25, 2025
There was a problem hiding this comment.
Pull request overview
This PR adds support for ENUM column types in the MSSQL database driver. Since MSSQL doesn't have a native ENUM type, this implementation uses NVARCHAR columns with CHECK constraints to simulate enum behavior.
Key Changes:
- Enum value extraction from CHECK constraints via regex pattern matching
- ENUM type mapping to NVARCHAR with appropriate CHECK constraint generation
- Comprehensive test coverage including edge cases for non-enum CHECK constraints
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Schema.php | Adds tryGetEnumValuesFromCheck() method to extract enum values from MSSQL CHECK constraint definitions and integrates it into column loading |
| src/Column/ColumnDefinitionBuilder.php | Adds ENUM type mapping to nvarchar and refactors buildCheck() to delegate to parent class for ENUM handling |
| tests/Column/EnumColumnTest.php | Adds MSSQL-specific enum column tests, including negative test cases for non-enum CHECK constraints |
| CHANGELOG.md | Documents the new enumeration column type support feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Tigrov
approved these changes
Nov 29, 2025
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.
Related to yiisoft/db#1107