Skip to content

Commit

Permalink
add ability to notify multiple tg subscribers about new messages in t…
Browse files Browse the repository at this point in the history
…he configured mail inbox
  • Loading branch information
jonua committed Jan 29, 2024
1 parent 10fd1d3 commit e8d7c06
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
create table mail_subscriber
(
mail_configuration_id int8 not null,
tg_source_id int8 not null
);

create unique index mail_subscriber_mail_configuration_id_tg_source_id
on mail_subscriber (mail_configuration_id, tg_source_id);

update mail_subscriber
set mail_configuration_id = mc.id,
tg_source_id = mc.tg_source_id
from mail_configuration mc
where mc.tg_source_id is not null;

alter table mail_configuration
drop column tg_source_id;

0 comments on commit e8d7c06

Please sign in to comment.