The migration to generate the columns needed for the feature. There are three new columns: moderated: a boolean that, when true, it means a moderator has hidden a proposal notification. The notification is hidden immediately and it's shown in the moderators proposal notifications index. hidden_at: used by acts_as_paranoid to hide the notification from the list. It's like deleting it, but without deleting definitely from DB. ignored_at: used to mark as a notification as ignored, so that it will appear in marked as reviewed and not in the pending list. WARNING! this doesn't mean that it will disappear from the 'All' filter.
9 lines
369 B
Ruby
9 lines
369 B
Ruby
class AddModerationFlagsToProposalNotifications < ActiveRecord::Migration
|
|
def change
|
|
add_column :proposal_notifications, :moderated, :boolean, default: false
|
|
add_column :proposal_notifications, :hidden_at, :datetime
|
|
add_column :proposal_notifications, :ignored_at, :datetime
|
|
add_column :proposal_notifications, :confirmed_hide_at, :datetime
|
|
end
|
|
end
|