mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 11:25:07 +08:00
6bdcd7afb2
We used to log group deletion as custom, which means we can't later search for them. Include group ID in the details.
15 lines
410 B
Ruby
15 lines
410 B
Ruby
# frozen_string_literal: true
|
|
class MigrateCustomGroupDeletionLogs < ActiveRecord::Migration[7.0]
|
|
def up
|
|
DB.exec(<<~SQL, group_deleted_id: 99, custom_action_id: 23)
|
|
UPDATE user_histories
|
|
SET action = :group_deleted_id, custom_type = NULL
|
|
WHERE action = :custom_action_id AND custom_type = 'delete_group'
|
|
SQL
|
|
end
|
|
|
|
def down
|
|
raise ActiveRecord::IrreversibleMigration
|
|
end
|
|
end
|