discourse/db/migrate/20200717193118_create_allowed_pm_users.rb
Blake Erickson 690f17bcbe
FEATURE: Allow List for PMs (#10270)
* FEATURE: Allow List for PMs

This feature adds a new user setting that is disabled by default that
allows them to specify a list of users that are allowed to send them
private messages. This way they don't have to maintain a large list of
users they don't want to here from and instead just list the people they
know they do want. Staff will still always be able to send messages to
the user.

* Update PR based on feedback
2020-07-20 15:23:49 -06:00

14 lines
438 B
Ruby

# frozen_string_literal: true
class CreateAllowedPmUsers < ActiveRecord::Migration[6.0]
def change
create_table :allowed_pm_users do |t|
t.integer :user_id, null: false
t.integer :allowed_pm_user_id, null: false
t.timestamps null: false
end
add_index :allowed_pm_users, [:user_id, :allowed_pm_user_id], unique: true
add_index :allowed_pm_users, [:allowed_pm_user_id, :user_id], unique: true
end
end