mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 06:04:11 +08:00
9428a669b5
Since disable_ddl_transaction! is disabled for this migration, it needs to be idempotent. Any error during the migration (e.g. a timeout) will cause ActiveRecord to fail the migration, and try again on the next run. If the index had already been created during the first run, then an 'already exists' error will be raised, with no way to recover. Unfortunately an [ActiveRecord bug](https://github.com/rails/rails/pull/41490) prevents us from using `if_not_exists: true` alongside `algorithm: :concurrently`, so we have to drop to raw SQL. |
||
---|---|---|
.. | ||
fixtures | ||
migrate | ||
post_migrate | ||
api_test_seeds.rb |