The error happens because the down migration of 2021_04_21_000000_drop_users_unified_index_column re-creates the column but not the index, and 2021_01_13_000000_unified_index_index always tries to delete the index.
We could just completely drop the down migration of 2021_01_13_000000_unified_index_index. I think the index would get dropped when the column is deleted again by 2020_10_23_000000_users_unified_index_column. But this PR does it in the cleanest way I could think of.
Confirmed
Tested migrations up and down locally both with and without 2021_04_21_000000_drop_users_unified_index_column to account for index existence or not.
[ ] Frontend changes: tested on a local Flarum installation.
[ ] Backend changes: tests are green (run composer test).
Fixes #160
The error happens because the down migration of
2021_04_21_000000_drop_users_unified_index_column
re-creates the column but not the index, and2021_01_13_000000_unified_index_index
always tries to delete the index.We could just completely drop the down migration of
2021_01_13_000000_unified_index_index
. I think the index would get dropped when the column is deleted again by2020_10_23_000000_users_unified_index_column
. But this PR does it in the cleanest way I could think of.Confirmed
Tested migrations up and down locally both with and without
2021_04_21_000000_drop_users_unified_index_column
to account for index existence or not.composer test
).