Line # Revision Author
1 296 ahitrov create table voting
2 (
3 id integer not null primary key default nextval('public.documents_id_seq'::text),
4 class text not null,
5 ctime timestamp not null default now(),
6 mtime timestamp not null default now(),
7 dtime timestamp not null default now(),
8 uid integer not null,
9 vote_type varchar(32),
10 object_class text not null,
11 object_id integer not null,
12 status smallint not null default 0,
13 sections integer[],
14 name text,
15 vote integer not null,
16 data text
17 );
18 create index voting_sections on voting using gist ( "sections" "gist__int_ops" );
19 create index voting_object on voting (object_class, object_id);
20 create unique index voting_vote on voting (uid, object_class, object_id, vote_type);