create table message ( id text not null primary key, channel text not null references channel (id), sender text not null references login (id), sent_sequence bigint unique not null, sent_at text not null, body text not null ); create index message_sent_at on message (sent_at);