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

Allow ColumnInterface as column type #766

Merged
merged 13 commits into from
Apr 7, 2024

Conversation

Tigrov
Copy link
Member

@Tigrov Tigrov commented Oct 26, 2023

First step to solve yiisoft/db-migration#218, yiisoft/db-migration#219 and other

Q A
Is bugfix? ✔️
New feature?
Breaks BC? ✔️
Fixed issues -

@what-the-diff
Copy link

what-the-diff bot commented Oct 26, 2023

PR Summary

  • Expanded data type acceptance for 'addColumn' method
    The addColumn method, present in multiple files (AbstractCommand.php, CommandInterface.php, AbstractDDLQueryBuilder.php, AbstractQueryBuilder.php, and CommandInterfaceProxy.php), has been updated to accept data types of either ColumnInterface or string, contrasting its prior limitation to string only.

  • Updated 'createTable' method to handle array of columns
    The createTable method, found in the AbstractDDLQueryBuilder.php and DDLQueryBuilderInterface.php files, now has the capacity to accept an array of columns. These columns can be defined by either string or the ColumnInterface type.

  • Increased testing coverage for 'addColumn' method
    The addColumn method's testing capabilities have been widened in the AbstractQueryBuilderTest.php and CommandTest.php files. This expansion enables the testing of column additions with diversified types, with definitions accommodated by ColumnInterface or string.

  • Amendment in the 'testCreateTable' method for additional column creation
    The testCreateTable method, located in the CommonCommandTest.php file, now includes a functionality to incorporate an additional column of string(100) type during table creation.

@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.55%. Comparing base (749c3f3) to head (8020450).

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #766   +/-   ##
=========================================
  Coverage     99.55%   99.55%           
  Complexity     1277     1277           
=========================================
  Files            63       63           
  Lines          3120     3120           
=========================================
  Hits           3106     3106           
  Misses           14       14           

☔ 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 16:03
@samdark samdark requested a review from a team October 26, 2023 16:10
@Tigrov Tigrov added this to the 2.0.0 milestone Nov 17, 2023
src/QueryBuilder/AbstractDDLQueryBuilder.php Outdated Show resolved Hide resolved
src/QueryBuilder/AbstractDDLQueryBuilder.php Show resolved Hide resolved
tests/Db/Command/CommandTest.php Outdated Show resolved Hide resolved
Copy link
Member

@vjik vjik left a comment

Choose a reason for hiding this comment

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

Need line in changelog only

@vjik vjik merged commit 2eb63c0 into yiisoft:master Apr 7, 2024
84 of 86 checks passed
@Tigrov Tigrov deleted the allow-columninterface-as-type branch April 14, 2024 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants