FriendsOfFlarum / byobu

Well integrated, advanced private discussions for your Flarum forum.
https://discuss.flarum.org/d/4762-flagrow-by-bu-well-integrated-advanced-private-discussions
MIT License
54 stars 33 forks source link

Fix index down migration #172

Closed clarkwinkelmann closed 2 years ago

clarkwinkelmann commented 2 years ago

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, 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.