Recreated announcements table.
This commit is contained in:
parent
41b6f1685a
commit
521b72d2a1
1 changed files with 17 additions and 1 deletions
|
|
@ -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);
|
||||
Loading…
Reference in a new issue