From 8f41e72ea1f585d54af256afcc372debf6ce25a9 Mon Sep 17 00:00:00 2001 From: Anton Date: Wed, 18 Oct 2023 13:23:55 +0200 Subject: [PATCH] Reset column information after adding columns --- db/migrate/20231011103114_migrate_notification_to_noticed.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/migrate/20231011103114_migrate_notification_to_noticed.rb b/db/migrate/20231011103114_migrate_notification_to_noticed.rb index e417d211b..7a52008ef 100644 --- a/db/migrate/20231011103114_migrate_notification_to_noticed.rb +++ b/db/migrate/20231011103114_migrate_notification_to_noticed.rb @@ -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',