Matt Jankowski
9ae2594726
Add reusable duplicate ID finder methods in maintenance CLI ( #28910 )
2 years ago
Claire
d71d26a3c9
Reattribute notification-related records if possible when merging accounts ( #29694 )
2 years ago
Matt Jankowski
718ee72c80
Use `db_table_exists?` method in new cli/maintenance area ( #29677 )
2 years ago
Matt Jankowski
cdd168f5d3
Update `enum` away from deprecated ( #29678 )
2 years ago
Claire
44bf7b8128
Add notifications of severed relationships ( #27511 )
2 years ago
Matt Jankowski
0e0a94f483
Handle CLI failure exit status at the top-level script ( #28322 )
2 years ago
Matt Jankowski
4cdf62e576
Extract `rebuild_index` method in maintenance CLI ( #28911 )
2 years ago
Matt Jankowski
274a48a9f4
Extract helper methods for db connection and table existence check in `CLI::Maintenance` task ( #28281 )
2 years ago
Matt Jankowski
d03fe2bdee
N+1 fixes for CLI maintenance command ( #28847 )
2 years ago
Matt Jankowski
2115bc52e4
Order by sql in `CLI::Maintenance` task ( #28289 )
2 years ago
Matt Jankowski
202951e6d9
Use Arel `in_order_of` method to generate CASE for `DomainBlock.by_severity` ( #28617 )
2 years ago
Matt Jankowski
2463b53363
More duplicates in cli maintenance spec, misc bug fixes ( #28449 )
2 years ago
Matt Jankowski
c7c727994a
Add spec for `CLI::Maintenance#fix_duplicates` ( #28326 )
2 years ago
Matt Jankowski
1c3b5f4a78
Fix reference to non-existent var in CLI maintenance command ( #28363 )
2 years ago
Matt Jankowski
4a7395d989
Add `migrator_version` method to CLI maintenance script ( #28323 )
2 years ago
Matt Jankowski
253393f3a8
Only attempt to remove indexes that exist in `CLI::Maintenance` script ( #28286 )
2 years ago
Matt Jankowski
490e4969a1
Correct section naming in maintenance cli script ( #28279 )
2 years ago
Matt Jankowski
440b80b2e7
Model concerns organization into module namespaces ( #28149 )
2 years ago
Matt Jankowski
370802ce48
Add coverage for `CLI::Maintenance#fix_duplicates` command ( #25252 )
3 years ago
Matt Jankowski
45770c9306
Fix `Performance/MapMethodChain` cop ( #27744 )
3 years ago
Claire
82eaa26d87
Update `tootctl maintenance fix-duplicates` to Mastodon v4.2.0 ( #27147 )
3 years ago
Matt Jankowski
dc26140d54
Use thor methods instead of tty prompt in maintenance cli ( #25207 )
3 years ago
Matt Jankowski
1baf40077b
Fix FormatStringToken cop in CLI ( #25122 )
3 years ago
Matt Jankowski
2cecb2dc9e
Increment index which was previously not used in maintenance CLI loop ( #25118 )
3 years ago
Matt Jankowski
55785b1603
Extract methods for user de-duping in maintenance CLI ( #25117 )
3 years ago
Matt Jankowski
384345b0de
Add CLI Base class for command line code ( #25106 )
3 years ago
Matt Jankowski
b6b4ea4ca5
Move the mastodon/*_cli files to mastodon/cli/* ( #24139 )
3 years ago
Matt Jankowski
88d33f361f
Fix Lint/DuplicateBranch cop ( #24766 )
3 years ago
Nick Schonning
af4c95100c
Autofix Rubocop Style/FormatString ( #23743 )
3 years ago
Nick Schonning
bf785df9fe
Audofix Rubocop Style/WordArray ( #23739 )
3 years ago
Nick Schonning
2177daeae9
Autofix Rubocop Style/RedundantBegin ( #23703 )
3 years ago
Nick Schonning
ac59d6f19f
Enable Rubocop Style/NumericLiterals ( #23647 )
3 years ago
Claire
457c37e47a
Fix index name in fix-duplicates task ( #20632 )
4 years ago
Claire
bd806a3090
Update fix-duplicates ( #20502 )
...
Fixes #19133
4 years ago
Claire
b07906bdb0
Fix wrong language code for Kurdish languages ( #17812 )
4 years ago
Claire
642528f455
Update fix-duplicates maintenance task ( #17731 )
...
* Update fix-duplicates task to 2022_02_10_153119
Also add support for Appeal to AccountMerging#merge_with!
* Update fix-duplicates task to 2022_03_07_094650
* Update fix-duplicates task to 2022_03_09_213005
* Update fix-duplicates task to 2022_03_07_083603
* Update fix-duplicates task to 2022_03_10_060626
* Update fix-duplicates script to 2022_03_07_083603
* Update fix-duplicates task to 2022_03_10_060706
* Update fix-duplicates task to 2022_03_10_060959
* Silence CodeClimate
4 years ago
Josh Soref
b5329e0035
Spelling ( #17705 )
...
* spelling: account
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: affiliated
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: appearance
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: autosuggest
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: cacheable
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: component
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: conversations
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: domain.example
Clarify what's distinct and use RFC friendly domain space.
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: environment
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: exceeds
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: functional
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: inefficiency
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: not
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: notifications
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: occurring
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: position
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: progress
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: promotable
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: reblogging
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: repetitive
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: resolve
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: saturated
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: similar
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: strategies
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: success
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: targeting
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: thumbnails
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: unauthorized
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: unsensitizes
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: validations
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: various
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
4 years ago
Claire
8a07ecd377
Remove leftover database columns from Devise::Models::Rememberable ( #17191 )
...
* Remove leftover database columns from Devise::Models::Rememberable
* Update fix-duplication maintenance script
* Improve errors/warnings in the fix-duplicates maintenance script
4 years ago
Claire
526332c545
Fix account deletion sometimes failing because of optimistic locks ( #16317 )
...
* Fix account deletion sometimes failing because of optimistic locks
In some rare occasions[1], deleting accounts would fail with a
`StaleObjectError` exception.
Indeed, account deletion manually sets the `AccountStat` values without
handling cases where the optimistic locking on `AccountStat` would fail.
To my knowledge, with the rewrite of account counters in #15913 , the
`DeleteAccountService` is now the only place that changes the counters in
a way that is not atomic.
Since in this specific case, we do not care about the previous values of the
account counters, it appears we don't need locking at all for this table
anymore.
[1]: https://discourse.joinmastodon.org/t/account-cant-be-deleted/3602
* Bump MAX_SUPPORTED_VERSION in maintenance script
5 years ago
Claire
76064e6608
Update fix-duplicates maintenance script to support latest migrations ( #16231 )
...
* Update maintenance script to support latest database migrations
* Update Account#merge_with!
5 years ago
Claire
82caed594c
Change deduplication order of tootctl maintenance fix-duplicates ( #15923 )
...
Hopefully fixes #15922
Also update support up to latest database schema version
5 years ago
ThibG
9395143126
Fix maintenance script not re-indexing some indexes on textual values ( #15515 )
...
* Fix maintenance script not re-indexing some indexes on textual values
Fixes #15475
* Refresh instance view at the end of the maintenance script run
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
5 years ago
ThibG
75944a2f2d
Bump max supported schema version in maintenance script ( #15359 )
...
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
5 years ago
ThibG
8485c436d5
Bump max supported schema version in maintenance script ( #15349 )
...
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
5 years ago
ThibG
fbe7519243
Fix account merging in maintenance script ( #15264 )
...
Also include AccountNote and AccountDeletionRequest to the list of classes
needing to be reassigned the merged account.
5 years ago
Eugen Rochko
f844386809
Add `tootctl accounts merge` ( #15201 )
...
* Add `tootctl accounts merge`
* Update lib/mastodon/accounts_cli.rb
Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
6 years ago
ThibG
1242e57c27
Deal with collation-related index corruption ( #14860 )
...
* Add tootctl maintenance fix-duplicates
This tool goes through the database to detect and fix duplicates.
This operation is very slow and may cause data loss (of data that would be
inaccessible without intervention because of the existing index corruptions).
It tries its best to make sensible decisions, and asks the user in some cases.
* Add warning message in db:migrate hook
* Clear Rails cache after being done with database deduplication
Avoids followers hash cache being incorrect, among other things
6 years ago