diff --git a/db/migrate/20150224004420_add_pinned_indexes.rb b/db/migrate/20150224004420_add_pinned_indexes.rb new file mode 100644 index 00000000000..b750a4d0d66 --- /dev/null +++ b/db/migrate/20150224004420_add_pinned_indexes.rb @@ -0,0 +1,6 @@ +class AddPinnedIndexes < ActiveRecord::Migration + def change + add_index :topics, :pinned_globally, where: 'pinned_globally' + add_index :topics, :pinned_at, where: 'pinned_at IS NOT NULL' + end +end