Skip to content

Conversation

@vjik
Copy link
Member

@vjik vjik commented Nov 26, 2025

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

Related to yiisoft/db#1107

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

codecov bot commented Nov 28, 2025

Codecov Report

❌ Patch coverage is 94.44444% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.82%. Comparing base (dfac432) to head (d1fddb4).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/Column/ColumnDefinitionBuilder.php 90.47% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #382      +/-   ##
============================================
- Coverage     98.00%   97.82%   -0.19%     
- Complexity      242      250       +8     
============================================
  Files            26       26              
  Lines           803      827      +24     
============================================
+ Hits            787      809      +22     
- Misses           16       18       +2     

☔ 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 and others added 3 commits November 29, 2025 11:51
@vjik vjik requested review from a team and Tigrov November 29, 2025 10:29
@vjik vjik added the status:code review The pull request needs review. label Nov 29, 2025
@vjik vjik marked this pull request as ready for review November 29, 2025 10:29
@vjik vjik requested a review from Copilot November 29, 2025 11:53
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 ENUM column types in Oracle by leveraging CHECK constraints with IN clauses. Since Oracle doesn't have native ENUM types, the implementation maps ENUM columns to VARCHAR2 with CHECK constraints that restrict values to a predefined list.

Key changes:

  • Added regex-based parsing to extract enum values from CHECK constraints in table schemas
  • Implemented automatic VARCHAR2 size calculation for ENUM columns based on the longest value
  • Refactored buildCheck method to delegate enum constraint generation to the parent class

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/Column/EnumColumnTest.php Adds test cases for enum column detection and validation, including negative test cases for non-enum CHECK constraints
tests/Support/IntegrationTestTrait.php Adds a dropTable helper method for safely dropping tables in tests using PL/SQL error handling
src/Schema.php Implements tryGetEnumValuesFromCheck method to parse CHECK constraints and extract enum values using regex
src/Column/ColumnDefinitionBuilder.php Adds ENUM to VARCHAR2 type mapping with automatic size calculation and refactors buildCheck to use parent implementation for enum 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.

@vjik vjik merged commit 58758d4 into master Nov 30, 2025
17 of 19 checks passed
@vjik vjik deleted the enum-col branch November 30, 2025 08:05
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