db: add subject_id, subject_type columns to mod_actions.
The subject of the mod action is the post, user, or other object the modaction is for.
This commit is contained in:
9
db/migrate/20220925045236_add_subject_to_mod_actions.rb
Normal file
9
db/migrate/20220925045236_add_subject_to_mod_actions.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class AddSubjectToModActions < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
add_column :mod_actions, :subject_type, :string, null: true
|
||||
add_column :mod_actions, :subject_id, :integer, null: true
|
||||
|
||||
add_index :mod_actions, :subject_type
|
||||
add_index :mod_actions, :subject_id
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user