Skip to content

Commit 6aae378

Browse files
authored
Drop indexes before dropping the column (#328)
* Drop handle index before dropping the column SQLite requires deleting the index before deleting the column. * Drop unique index before dropping column SQLite requires deleting the index before deleting the column.
1 parent 0d1fce7 commit 6aae378

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

database/migrations/updates/relate_form_submissions_by_handle.php.stub

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ return new class extends Migration {
3434
}
3535
});
3636

37+
$table->dropUnique(['form_id', 'created_at']);
3738
$table->dropColumn('form_id');
3839
});
3940
}

database/migrations/updates/update_assets_table.php.stub

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ return new class extends Migration {
4040
});
4141

4242
Schema::table($this->prefix('assets_meta'), function (Blueprint $table) {
43+
$table->dropIndex(['handle']);
4344
$table->dropColumn('handle');
4445
});
4546
}

0 commit comments

Comments
 (0)