Skip to content

Conversation

@vjik
Copy link
Member

@vjik vjik commented Nov 25, 2025

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

Related to yiisoft/db#1107

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

codecov bot commented Nov 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.48%. Comparing base (ce14515) to head (339c90d).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #404      +/-   ##
============================================
+ Coverage     98.45%   98.48%   +0.03%     
- Complexity      326      332       +6     
============================================
  Files            22       22              
  Lines          1035     1059      +24     
============================================
+ Hits           1019     1043      +24     
  Misses           16       16              

☔ 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:26
@vjik vjik requested review from a team, Tigrov and Copilot November 29, 2025 10:26
@vjik vjik added the status:code review The pull request needs review. label Nov 29, 2025
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 to the Yiisoft SQLite database driver. Since SQLite doesn't have a native ENUM type, the implementation detects CHECK constraints with IN clauses and treats columns with such constraints as enumeration types. This is a breaking change that removes the previous mapping of 'enum' to string type.

Key changes:

  • Implements enum value extraction from CHECK constraints using regex pattern matching
  • Maps ENUM column type to 'varchar' in schema definitions
  • Adds comprehensive test coverage for various CHECK constraint formats

Reviewed changes

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

Show a summary per file
File Description
src/Schema.php Adds tryGetEnumValuesFromCheck() and isCheckNotStartsFromColumnName() methods to parse CHECK constraints and extract enum values
src/Column/ColumnFactory.php Removes 'enum' from the type map (breaking change)
src/Column/ColumnDefinitionBuilder.php Adds mapping for ColumnType::ENUM to 'varchar' type
tests/Column/EnumColumnTest.php Adds SQLite-specific tests for enum column detection from CHECK constraints
tests/Provider/ColumnFactoryProvider.php Removes enum test case from column factory provider
CHANGELOG.md Documents the new enum column type support feature

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

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

Copilot reviewed 6 out of 6 changed files in this pull request and generated 9 comments.


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

@vjik vjik requested a review from Tigrov November 29, 2025 14:52
Co-authored-by: Sergei Tigrov <rrr-r@ya.ru>
vjik and others added 3 commits November 29, 2025 18:43
Co-authored-by: Sergei Tigrov <rrr-r@ya.ru>
@vjik vjik merged commit 1334fa5 into master Nov 30, 2025
22 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