Skip to content

Conversation

@vjik
Copy link
Member

@vjik vjik commented Nov 12, 2025

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

Related to yiisoft/db#1095

@codecov
Copy link

codecov bot commented Nov 12, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 99.45%. Comparing base (a38f6c1) to head (7561044).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/Column/ColumnBuilder.php 75.00% 1 Missing ⚠️
src/Column/ColumnDefinitionBuilder.php 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #460      +/-   ##
============================================
- Coverage     99.67%   99.45%   -0.22%     
- Complexity      316      320       +4     
============================================
  Files            36       36              
  Lines           919      925       +6     
============================================
+ Hits            916      920       +4     
- Misses            3        5       +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 vjik changed the title Consider platform integer size in ColumnBuilder::bigint() Consider platform integer size in ColumnBuilder::bigint() + Throw exception on "unsigned" column usage Nov 12, 2025
Comment on lines +44 to +46
if ($column->isUnsigned()) {
throw new NotSupportedException('The "unsigned" attribute is not supported by PostgreSQL.');
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd just ignore this. Or as an option we can add CHECK (column >= 0)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsigned columns often usage for big values. Exception will alert the user that this is not available.

public function fromPseudoType(string $pseudoType, array $info = []): ColumnInterface
{
// PostgreSQL doesn't support unsigned types
return parent::fromPseudoType($pseudoType, $info)->unsigned(false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think that this is correct. There are ways how to get unsigned type (with check)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsigned in most cases (almost always?) is added for store big values, not for non-negative values constraint.

@vjik vjik requested a review from a team November 12, 2025 10:33
@vjik vjik added the status:code review The pull request needs review. label Nov 12, 2025
@vjik vjik requested a review from Tigrov November 13, 2025 12:11
@vjik vjik merged commit e3025a4 into master Nov 13, 2025
24 of 26 checks passed
@vjik vjik deleted the fix-bigint-builder branch November 13, 2025 14:17
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.

4 participants