Retrospring/db/migrate/20231107200845_optimise_ind...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
348 B
Ruby
Raw Normal View History

2023-11-07 12:24:49 -08:00
# frozen_string_literal: true
class OptimiseIndices < ActiveRecord::Migration[7.0]
def change
add_index :users, "LOWER(screen_name)", order: :desc, unique: true
remove_index :users, :screen_name, unique: true
add_index :user_bans, :expires_at, order: :desc
add_index :announcements, %i[starts_at ends_at], order: :desc
end
end