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: 3 comments 1 reply
-
This happens when you have To fix this, you may call PS: This won't happen on Laravel 11.x |
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.
This happens when you have
doctrine/dbal
package installed.To fix this, you may call
Schema::useNativeSchemaOperationsIfPossible()
method within the boot method of yourApp\Providers\AppServiceProvider
class. check #45258PS: This won't happen on Laravel 11.x