class AddUniquenessToSpeedrunDotComGames < ActiveRecord::Migration[6.0]
  disable_ddl_transaction!

  def change
    remove_index :speedrun_dot_com_games, :shortname

    add_index :speedrun_dot_com_games, :shortname, unique: true, algorithm: :concurrently
    add_index :speedrun_dot_com_games, :srdc_id,   unique: true, algorithm: :concurrently
  end
end

Fix the bug with games getting duplicated
Fix the bug with games getting duplicated

which caused game pages to "belong" to the wrong game (e.g.
splits.io/games/sm64 going to a page called "SM64" with 2 runs instead
of the proper "Super Mario 64" game page)

This doesn't fix the code that causes the duplication, but will
hard-protect the game pages from being taken over, erroring instead of
letting it happen. Will fix the code causing the duplication in another
commit.
