tootcli fix-duplicates bugs
Steps to reproduce the problem
Running the current fix-duplicates toolcli adds the index_tags_on_name_lower index back, even after the mitgrate has removed it.
https://github.com/mastodon/mastodon/blob/b07906bdb0127cd73662506b519183cc51a2758e/lib/mastodon/maintenance_cli.rb#L512
https://github.com/mastodon/mastodon/blob/main/db/migrate/20210421121431_add_case_insensitive_btree_index_to_tags.rb
Expected behaviour
index should be removed
Actual behaviour
index is recreated.
Specifications
main
Similar issue with index_users_on_remember_token might be n
ERROR: index "index_users_on_remember_token" does not exist
STATEMENT: DROP INDEX "index_users_on_remember_token"
https://github.com/mastodon/mastodon/blob/b07906bdb0127cd73662506b519183cc51a2758e/lib/mastodon/maintenance_cli.rb#L276
Was this deleted here?
https://github.com/mastodon/mastodon/blob/main/db/post_migrate/20220118183123_remove_rememberable_from_users.rb
for @ClearlyClaire
Running the current
fix-duplicatestoolcli adds theindex_tags_on_name_lowerindex back, even after the mitgrate has removed it.https://github.com/mastodon/mastodon/blob/b07906bdb0127cd73662506b519183cc51a2758e/lib/mastodon/maintenance_cli.rb#L512
https://github.com/mastodon/mastodon/blob/main/db/migrate/20210421121431_add_case_insensitive_btree_index_to_tags.rb
Oops, re-inserting it should have been conditional indeed.
Similar issue with
index_users_on_remember_tokenmight be nERROR: index "index_users_on_remember_token" does not exist STATEMENT: DROP INDEX "index_users_on_remember_token"
This is not an error when adding an index, but when attempting to remove it. However, the script should not error out if the index doesn't exist. Can I get more context for this error?
https://github.com/mastodon/mastodon/blob/b07906bdb0127cd73662506b519183cc51a2758e/lib/mastodon/maintenance_cli.rb#L276
Was this deleted here?
https://github.com/mastodon/mastodon/blob/main/db/post_migrate/20220118183123_remove_rememberable_from_users.rb
No, it's deleted in https://github.com/mastodon/mastodon/blob/main/db/post_migrate/20220118183010_remove_index_users_on_remember_token.rb