* Add new columns to notifications table * Remove stream from notifications and add new methods * Turn off moderation comment notifications * Add notifiable_type index to migration * Stop creation of Stream-based notification model instances * Add notification model create hooks * Add badge achievement notification creation hook * Fix some specs * Add missing @ symbol * Fix for tests and rename a few things * forgot to uncomment code sigh
10 lines
385 B
Ruby
10 lines
385 B
Ruby
class AddColumnsToNotifications < ActiveRecord::Migration[5.1]
|
|
def change
|
|
add_index :notifications, :notifiable_id
|
|
add_index :notifications, :user_id
|
|
add_index :notifications, :notifiable_type
|
|
add_column :notifications, :json_data, :jsonb
|
|
add_index :notifications, :json_data, using: :gin
|
|
add_column :notifications, :read?, :boolean, default: false
|
|
end
|
|
end
|