Line # Revision Author
1 293 ahitrov create table profile_credentials
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 status smallint not null default 0,
8 opaque smallint not null default 0,
9 uid integer not null default 0,
10 310 ahitrov ext_id numeric not null default 0,
11 293 ahitrov sections integer,
12 name text,
13 main integer,
14 confirm varchar(32),
15 data text
16 );
17 379 ahitrov create index profile_credentials_user_class_ext_id on profile_credentials (class, uid, ext_id) where ext_id != 0;
18 create index profile_credentials_user_class_name on profile_credentials (class, uid, name) where ext_id = 0;
19 293 ahitrov create unique index profile_credentials_class_ext_id on profile_credentials (class, ext_id) where ext_id != 0;
20 create unique index profile_credentials_class_name on profile_credentials (class, name) where ext_id = 0;