Merge pull request #6482 from aignatov-bio/ai-sci-include-other-notifications-type-to-migration

Reset column information after adding columns
This commit is contained in:
aignatov-bio 2023-10-18 13:31:12 +02:00 committed by GitHub
commit c25d65a7ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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