Skip to content

Commit

Permalink
Merge pull request #20257 from ambrozt/bugfix/20256-mssql-drop-views
Browse files Browse the repository at this point in the history
Add support for dropping views in MSSQL server when running migrate/fresh
  • Loading branch information
mtangoo authored Sep 22, 2024
2 parents 899a833 + e69746b commit 62f7f12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions framework/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Yii Framework 2 Change Log
- Bug #20232: Fix regression introduced in `GHSA-cjcc-p67m-7qxm` while attaching behavior defined by `__class` array key (erickskrauch)
- Bug #20231: Fix regression introduced in #20167 in `yii\validators\FileValidator` (bizley)
- Enh #20247: Support for variadic console controller action methods (brandonkelly)
- Bug #20256: Add support for dropping views in MSSQL server when running migrate/fresh (ambrozt)

2.0.51 July 18, 2024
--------------------
Expand Down
1 change: 1 addition & 0 deletions framework/console/controllers/MigrateController.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ private function isViewRelated($errorMessage)
$dropViewErrors = [
'DROP VIEW to delete view', // SQLite
'SQLSTATE[42S02]', // MySQL
'is a view. Use DROP VIEW', // Microsoft SQL Server
];

foreach ($dropViewErrors as $dropViewError) {
Expand Down

0 comments on commit 62f7f12

Please sign in to comment.