create table events
(
	id integer not null primary key default nextval('public.documents_id_seq'::text),
	class text not null,
	start timestamp not null default now(),
	finish timestamp not null default now(),
	status smallint not null default 0,
	sections integer[],
	name text,
	data text
);
create index events_sections on events using gist ( "sections" "gist__int_ops" );
create index events_start on events (start);
create index events_finish on events (finish);
