2019-05-03 06:17:27 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-08-31 12:06:56 +08:00
|
|
|
class AddMutedUsers < ActiveRecord::Migration[4.2]
|
2015-03-24 08:55:22 +08:00
|
|
|
def change
|
2015-03-27 04:57:50 +08:00
|
|
|
create_table :muted_users, force: true do |t|
|
2015-03-24 08:55:22 +08:00
|
|
|
t.integer :user_id, null: false
|
|
|
|
t.integer :muted_user_id, null: false
|
2017-08-07 23:48:36 +08:00
|
|
|
t.timestamps null: false
|
2015-03-24 08:55:22 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
add_index :muted_users, [:user_id, :muted_user_id], unique: true
|
|
|
|
add_index :muted_users, [:muted_user_id, :user_id], unique: true
|
|
|
|
end
|
|
|
|
end
|