feat: Add last_activity_at field to Notification model (#8585)

This commit is contained in:
Muhsin Keloth
2023-12-20 13:02:37 +05:30
committed by GitHub
parent a80eff9aa3
commit b5071e61d7
3 changed files with 16 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
class AddLastActivityAtToNotifications < ActiveRecord::Migration[7.0]
def change
add_column :notifications, :last_activity_at, :datetime, default: -> { 'CURRENT_TIMESTAMP' }
add_index :notifications, :last_activity_at
end
end