1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-28 05:29:06 +09:00
Commit Graph

5 Commits

Author SHA1 Message Date
Eugen Rochko
fb1ae0152d
Wrong exception class: ActiveRecord::RecordNotUnique, not PG::UniqueViolation ()
* Wrong exception class: ActiveRecord::RecordNotUnique, not PG::UniqueViolation

It's completely not obvious but PG::UniqueViolation is just a string inside the exception message, not the actual class of the exception

* Favourite does not have target_account_id
2018-05-31 17:22:33 +02:00
Eugen Rochko
19b4c666f7
Improve account index migration ()
* Improve account index migration

- Display more progress in stdout
- Catch PG::UniqueViolation when re-attributing favourites
- Skip callbacks and validations when re-attributing other relationships

* Use in_batches to reduce table lock-up during account merge

* Use #say_with_time to benchmark each deduplication
2018-05-31 17:09:09 +02:00
Eugen Rochko
c61c4565ab
Fix nil error in migration ()
Under rare circumstances the user record could have already been deleted before...
2018-05-31 02:30:37 +02:00
Yamagishi Kazutoshi
9130b3cda9 Fix broken migrate (regression from ) () 2018-05-30 09:39:52 +02:00
Eugen Rochko
a16e06bbf5
Deduplicate accounts and make unique username/domain index case-insensitive ()
Fix 
Fix 
Fix 
2018-05-30 02:51:26 +02:00