Incorrect behaviour "SQLite doesn't support multiple calls to dropColumn / renameColumn in a single modification." #50308
-
Laravel Version10.46 PHP Version8.2 Database Driver & VersionSQLite DescriptionIn a migration, I have the following code that worked well a few days ago : Now, I have this message when I run the tests : "SQLite doesn't support multiple calls to dropColumn / renameColumn in a single modification." The solution I found is this : But it seems hacky and looks like a regression to me. I updated to 10.46 and I was on 10.40 before. Steps To ReproduceUse multiple dropColumns in a migration file, and run unit tests using SQLite DB. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
|
This happens when you have To fix this (Laravel >= 9 and < 11), you may call PS: This won't happen on Laravel 11.x: #48864 |
Beta Was this translation helpful? Give feedback.
-
It solved the problem, thanks! Just for my knowledge, why do I have to do this now? doctrine/dbal has been installed for months on my project. |
Beta Was this translation helpful? Give feedback.
-
|
Nothing changed recently on this manner (dropping columns on 10.x), maybe you didn't run your migrations after installing doctrine/dbal? |
Beta Was this translation helpful? Give feedback.
-
|
I get the same error when I try to sync my DB. I use Laravel Framework 8.83.29 and PHP 7.4.33 (I know the PHP version is old, but my team is working on it). However, |
Beta Was this translation helpful? Give feedback.
This happens when you have
doctrine/dbalpackage installed.To fix this (Laravel >= 9 and < 11), you may call
Schema::useNativeSchemaOperationsIfPossible()method within the boot method of yourApp\Providers\AppServiceProviderclass. check #45258PS: This won't happen on Laravel 11.x: #48864