Skip to content

Conversation

@vjik
Copy link
Member

@vjik vjik commented Nov 24, 2025

Q A
Is bugfix?
New feature? ✔️
Breaks BC? ✔️

Related to yiisoft/db#1107

@vjik vjik mentioned this pull request Nov 24, 2025
@codecov
Copy link

codecov bot commented Nov 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.68%. Comparing base (9f0ec01) to head (89af030).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #465      +/-   ##
============================================
+ Coverage     96.64%   96.68%   +0.04%     
- Complexity      409      412       +3     
============================================
  Files            66       66              
  Lines          1192     1207      +15     
============================================
+ Hits           1152     1167      +15     
  Misses           40       40              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vjik vjik marked this pull request as ready for review November 29, 2025 10:25
@vjik vjik requested review from a team and Tigrov November 29, 2025 10:25
@vjik vjik added the status:code review The pull request needs review. label Nov 29, 2025
@vjik vjik requested a review from Copilot November 29, 2025 11:52
Copy link

Copilot AI left a 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 support for PostgreSQL enumeration column types. It enables the framework to recognize and properly handle both native PostgreSQL ENUM types and check-constraint-based enumerations.

  • Renames enum_values to values for consistency across the codebase
  • Adds tryGetEnumValuesFromCheck() method to extract enum values from CHECK constraints using the ANY (ARRAY[...]) pattern
  • Maps ColumnType::ENUM to varchar in the column definition builder

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
tests/Column/EnumColumnTest.php Adds PostgreSQL-specific enum column tests with native ENUM types and test cases to verify non-enum CHECK constraints are not misidentified
src/Schema.php Renames enum_values field to values, adds logic to extract enum values from CHECK constraints via new tryGetEnumValuesFromCheck() method
src/Column/ColumnDefinitionBuilder.php Maps ColumnType::ENUM to PostgreSQL varchar type for column definition generation
CHANGELOG.md Documents the new enumeration column type support feature

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vjik vjik merged commit 94a8405 into master Nov 30, 2025
33 checks passed
@vjik vjik deleted the enum-col branch November 30, 2025 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:code review The pull request needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants