about summary refs log tree commit diff
path: root/db/migrate/20180528141303_fix_accounts_unique_index.rb
AgeCommit message (Collapse)Author
2023-03-26Migration warning helper, and only run in production env (#24253)Matt Jankowski
2023-02-19Autofix Rubocop Style/RedundantBegin (#23703)Nick Schonning
2022-01-27Fix some old database migrations (#17379)Claire
2021-03-19Further preparation for Rails 6 (#15916)Claire
* Use ActiveRecord::Result#to_ary instead of deprecated to_hash They do the same thing, and to_hash has been removed from Rails 6.1 * Explicitly name polymorphic indexes to workaround a bug in Rails 6.1 cf. https://github.com/rails/rails/issues/41693 * Fix incorrect usage of “foreign_key” in migration script * Use `ActiveModel::Errors#delete` instead of deprecated clear method * Fix link headers tests on Rails 6.1 Rails 6.1 adds values to the Link header by default, thus it is not a LinkHeader object anymore. Fix the test to parse the Link header instead of assuming it is a LinkHeader.
2020-01-27Fix interactive delays in database migrations with no TTY (#12969)Eugen Rochko
Fix #12587
2019-07-10Fix old migration script depending on the StreamEntry model (#11278)ThibG
2018-08-15Fix FixAccountsUniqueIndex migration (#8212)ThibG
2018-08-11Make some migration script more robust (fixes #8007) (#8170)ThibG
Include a dummy Account class in the migration script containing only the attributes relevant to the migration in order to not rely as much on the codebase being in sync with the database schema.
2018-05-31Wrong exception class: ActiveRecord::RecordNotUnique, not ↵Eugen Rochko
PG::UniqueViolation (#7688) * 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-31Improve account index migration (#7684)Eugen Rochko
* 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-31Fix nil error in migration (#7680)Eugen Rochko
Under rare circumstances the user record could have already been deleted before...
2018-05-30Fix broken migrate (regression from #7658) (#7674)Yamagishi Kazutoshi
2018-05-30Deduplicate accounts and make unique username/domain index case-insensitive ↵Eugen Rochko
(#7658) Fix #6937 Fix #6837 Fix #6667