mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-03 08:18:42 +08:00
10 lines
273 B
Ruby
10 lines
273 B
Ruby
# frozen_string_literal: true
|
|
|
|
class AddDeletedPostIndexToPosts < ActiveRecord::Migration[4.2]
|
|
def change
|
|
add_index :posts,
|
|
%i[topic_id post_number],
|
|
where: "deleted_at IS NOT NULL",
|
|
name: "idx_posts_deleted_posts"
|
|
end
|
|
end
|