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

Add $ifExists and $cascade to dropTable() methods #345

Merged
merged 1 commit into from
Mar 11, 2025
Merged

Conversation

vjik
Copy link
Member

@vjik vjik commented Mar 10, 2025

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

See yiisoft/db#880

@vjik vjik added the status:under development Someone is working on a pull request. label Mar 10, 2025
Copy link

codecov bot commented Mar 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.17%. Comparing base (8bebf09) to head (fcb1a9d).
Report is 2 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #345      +/-   ##
============================================
+ Coverage     98.16%   98.17%   +0.01%     
- Complexity      228      230       +2     
============================================
  Files            19       19              
  Lines           709      713       +4     
============================================
+ Hits            696      700       +4     
  Misses           13       13              

☔ 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 added status:code review The pull request needs review. and removed status:under development Someone is working on a pull request. labels Mar 10, 2025
@vjik vjik requested a review from a team March 10, 2025 14:00
public function dropTable(string $table, bool $ifExists = false, bool $cascade = false): string
{
if ($cascade) {
throw new NotSupportedException('MSSQL doesn\'t support cascade drop table.');
Copy link
Member

Choose a reason for hiding this comment

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

It is OK for now, but maybe we should traverse schema and do delete ourselves in this case for portability reasons.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. We make it in one of future versions.

@vjik vjik merged commit 54d57a5 into master Mar 11, 2025
16 checks passed
@vjik vjik deleted the drop-table-params branch March 11, 2025 06:45
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