Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix alter column with default null #282

Merged
merged 3 commits into from
Nov 10, 2023

Conversation

Tigrov
Copy link
Member

@Tigrov Tigrov commented Oct 26, 2023

Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Fixed issues yiisoft/db-migration#11

@what-the-diff
Copy link

what-the-diff bot commented Oct 26, 2023

PR Summary

  • Simplified Query Building Operation
    The code in file src/DDLQueryBuilder.php was updated. Previously, a specific line was forcing the system to drop certain constraints for a database column, this operation has now been removed. This essentially simplifies the process for building database queries because we're not unnecessarily removing parts of the database structure anymore.

  • Enhancements in Database Column Tests
    In tests/CommandTest.php, important updates were made to provide better testing scenarios. A new test method testAlterColumnWithDefaultNull was introduced. This new test checks if the system behaves correctly when a column in the database that is supposed to have a default value of null is altered. This update ensures our software remains robust when changes are made to this kind of database columns.

@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9f3d91c) 98.48% compared to head (cb1d144) 98.48%.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #282   +/-   ##
=========================================
  Coverage     98.48%   98.48%           
  Complexity      205      205           
=========================================
  Files            15       15           
  Lines           596      596           
=========================================
  Hits            587      587           
  Misses            9        9           
Files Coverage Δ
src/DDLQueryBuilder.php 100.00% <100.00%> (ø)

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

@Tigrov Tigrov marked this pull request as ready for review October 26, 2023 17:20
@Tigrov Tigrov added the status:code review The pull request needs review. label Nov 2, 2023
@Tigrov Tigrov requested a review from a team November 2, 2023 05:42
@vjik
Copy link
Member

vjik commented Nov 9, 2023

@Tigrov Add line to changelog only.

@vjik vjik merged commit ff5d43c into yiisoft:master Nov 10, 2023
18 of 19 checks passed
@Tigrov Tigrov deleted the fix-alter-column-with-default-null branch November 21, 2023 02:56
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.

2 participants