• Andreas Brandl's avatar
    Fix concurrency issue with migration for user_interacted_projects table. · 5f35ea14
    Andreas Brandl authored
    The concurrency issue originates from inserts on
    `user_interacted_projects` from the app while running the post-deploy
    migration.
    
    This change comes with a strategy to lock the table while removing
    duplicates and creating the unique index (and similar for FK
    constraints).
    
    Also, we'll have a non-unique index until the post-deploy migration is
    finished to speed up queries during that time.
    
    Closes #44205.
    5f35ea14
migration_helpers.rb 32.3 KB