11 lines
437 B
SQL
11 lines
437 B
SQL
UPDATE scheduled_notifications
|
|
SET status = 'cancelled', cancelled_at = CURRENT_TIMESTAMP, updated_at = CURRENT_TIMESTAMP
|
|
WHERE channel = 'in_app' AND status IN ('pending', 'processing');
|
|
|
|
ALTER TABLE scheduled_notifications
|
|
DROP CONSTRAINT IF EXISTS scheduled_notifications_channel_check;
|
|
|
|
ALTER TABLE scheduled_notifications
|
|
ADD CONSTRAINT scheduled_notifications_channel_check
|
|
CHECK (channel IN ('email', 'sms', 'push'));
|