0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-06 05:42:36 +08:00
discourse/db/migrate/20150224004420_add_pinned_indexes.rb
2023-01-09 11:59:41 +00:00

8 lines
240 B
Ruby
Vendored

# 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