mirror of
https://github.com/discourse/discourse.git
synced 2024-12-24 23:40:09 +08:00
8016fcab33
The `id` column of `notifications` table and `notification_id` columns
of the other tables have been migrated to bigint in previous commits
(for example, 799a45a
).
In order to run the migrations with zero downtime, the data had to be
copied to new columns and swapped, but the old columns have been kept
to allow for rollback. They are no longer needed now.
26 lines
618 B
Ruby
26 lines
618 B
Ruby
# frozen_string_literal: true
|
|
|
|
class ShelvedNotification < ActiveRecord::Base
|
|
self.ignored_columns = [
|
|
:old_notification_id, # TODO: Remove once 20240829140226_drop_old_notification_id_columns has been promoted to pre-deploy
|
|
]
|
|
|
|
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
|
|
# notification_id :bigint not null
|
|
#
|
|
# Indexes
|
|
#
|
|
# index_shelved_notifications_on_notification_id (notification_id)
|
|
#
|