Recreated announcements table.

This commit is contained in:
Benjamin A. Shelton 2026-10-30 14:29:43 -06:00
commit 521b72d2a1
Signed by: zancarius
GPG key ID: 8BD42DBD6C337E01

View file

@ -7,4 +7,20 @@ alter table birthdays add column announce boolean default true not null;
-- former, anniversary types will be implemented as views, and the INSTEAD OF
-- trigger will be used for inserts and updates:
-- www.sqlite.org/lang_createtrigger.html#instead_of_trigger
drop table anniversaries;
drop table anniversaries;
drop table announcements;
create table announcements (
id integer primary key autoincrement,
chatid integer not null,
scheduled_for datetime not null,
-- If enabled, reminders will be generated a week before and a day before the announcement itself.
reminders boolean default true not null,
title text default '' not null,
content text default '' not null,
foreign key (chatid) references chats(id)
);
create index announcements_chatid_idx on announcements (chatid);
create index announcements_scheduled_for_idx on announcements (scheduled_for);