Closed
Description
Laravel Version
10.46
PHP Version
8.2
Database Driver & Version
SQLite
Description
In a migration, I have the following code that worked well a few days ago :
public function down(): void
{
Schema::table('answers', function(Blueprint $table) {
$table->dropColumn('corrected_text');
$table->dropColumn('options');
$table->dropColumn('score');
});
}
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 :
public function down(): void
{
Schema::table('answers', function (Blueprint $table) {
$table->dropColumn('corrected_text');
});
Schema::table('answers', function (Blueprint $table) {
$table->dropColumn('options');
});
Schema::table('answers', function (Blueprint $table) {
$table->dropColumn('score');
});
}
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 Reproduce
Use multiple dropColumns in a migration file, and run unit tests using SQLite DB.
Metadata
Metadata
Assignees
Labels
No labels