0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-06 01:10:43 +08:00
discourse/db/migrate/20140728120708_fix_index_on_post_action.rb
2023-01-09 11:59:41 +00:00

11 lines
351 B
Ruby
Vendored

# frozen_string_literal: true
class FixIndexOnPostAction < ActiveRecord::Migration[4.2]
def change
remove_index "post_actions", name: "idx_unique_actions"
add_index "post_actions",
%w[user_id post_action_type_id post_id deleted_at targets_topic],
name: "idx_unique_actions",
unique: true
end
end