class NewFingerprintValueIndex < ActiveRecord::Migration[7.2]
  disable_ddl_transaction!

  def up
    execute <<-SQL
      CREATE INDEX ivfflat_index_on_fingerprint_value
        ON public.domain_post_file_bit_fingerprints USING ivfflat
        (fingerprint_value bit_hamming_ops)
        WITH (lists = 5000)
        TABLESPACE mirai;
    SQL
  end

  def down
    execute <<-SQL
      DROP INDEX ivfflat_index_on_fingerprint_value;
    SQL
  end
end
