Reset column information after adding columns

This commit is contained in:
Anton 2023-10-18 13:23:55 +02:00
parent c70bc67347
commit 8f41e72ea1

View file

@ -11,6 +11,8 @@ class MigrateNotificationToNoticed < ActiveRecord::Migration[7.0]
add_column :notifications, :read_at, :datetime
add_reference :notifications, :recipient, polymorphic: true
Notification.reset_column_information
type_mapping = {
0 => 'ActivityNotification',
1 => 'GeneralNotification',