discourse/db
David Taylor 9428a669b5
FIX: Make non-transactional migration idempotent (#13608)
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.
2021-07-01 19:12:38 +01:00
..
fixtures DEV: Correct typos and spelling mistakes (#12812) 2021-05-21 11:43:47 +10:00
migrate FIX: Make non-transactional migration idempotent (#13608) 2021-07-01 19:12:38 +01:00
post_migrate DEV: Drop duration column from topic timers (#13543) 2021-06-29 09:27:12 +10:00
api_test_seeds.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00