mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 18:54:13 +08:00
ec8ba5a0b9
DEV: Migrate shelved_notifications#notification_id to bigint
The `notifications.id` has been migrated to `bigint` in previous commit
799a45a291
.
27 lines
667 B
Ruby
27 lines
667 B
Ruby
# frozen_string_literal: true
|
|
|
|
class ShelvedNotification < ActiveRecord::Base
|
|
self.ignored_columns = [
|
|
:old_notification_id, # TODO: Remove when column is dropped. At this point, the migration to drop the column has not been writted.
|
|
]
|
|
|
|
belongs_to :notification
|
|
|
|
def process
|
|
NotificationEmailer.process_notification(notification, no_delay: true)
|
|
end
|
|
end
|
|
|
|
# == Schema Information
|
|
#
|
|
# Table name: shelved_notifications
|
|
#
|
|
# id :bigint not null, primary key
|
|
# old_notification_id :integer
|
|
# notification_id :bigint not null
|
|
#
|
|
# Indexes
|
|
#
|
|
# index_shelved_notifications_on_notification_id (notification_id)
|
|
#
|