create table message (
	id text
		not null
		primary key,
	channel text
		not null
		references channel (id),
	sender text
		not null
		references login (id),
	body text
		not null,
	sent_at text
		not null
);

create index message_sent_at on message (channel, sent_at);
