discourse/db/migrate/20200717193118_create_allowed_pm_users.rb
2023-01-09 11:59:41 +00:00

14 lines
436 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, %i[user_id allowed_pm_user_id], unique: true
add_index :allowed_pm_users, %i[allowed_pm_user_id user_id], unique: true
end
end