discourse/db/migrate/20150224004420_add_pinned_indexes.rb

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

9 lines
240 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class AddPinnedIndexes < ActiveRecord::Migration[4.2]
def change
add_index :topics, :pinned_globally, where: "pinned_globally"
add_index :topics, :pinned_at, where: "pinned_at IS NOT NULL"
end
end