cursor = self.query('create unique index if not exists state_bot_id on state (bot_id)')
cursor = self.query('create table if not exists announcements (id char(36) not null, bot_id varchar(32) not null, server_id varchar(32) not null, member_id varchar(32) not null, channel_id varchar(32) not null, voice_id varchar(32), sound varchar(128), mention varchar(32), start_date datetime, end_date datetime, interval int, probability float not null default 1.0, last_spoke datetime, asap boolean not null default false, message text, digest char(56))')
cursor = self.query('create unique index if not exists announcements_id on announcements (id)')
+ cursor = self.query('create index if not exists announcements_bot_id on announcements (bot_id)')
cursor = self.query('create table if not exists feeds (id char(36) not null, bot_id varchar(32) not null, server_id varchar(32) not null, channel_id varchar(32) not null, description varchar(64), url varchar(128) not null, date boolean not null default true, summary boolean not null default false, link_json varchar(256))')
cursor = self.query('create unique index if not exists feed_id on feeds (id)')
- cursor = self.query('create unique index if not exists feed_bot_id on feeds (bot_id)')
+ cursor = self.query('create index if not exists feed_bot_id on feeds (bot_id)')
self.dbh.commit()
self.close_db()