1 |
196 |
ahitrov |
create table profiles |
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, |
8 |
|
|
lastlogin timestamp not null default now(), |
9 |
|
|
status smallint not null default 0, |
10 |
|
|
type integer, |
11 |
|
|
sections integer[], |
12 |
|
|
name text, |
13 |
|
|
nickname text, |
14 |
|
|
login text, |
15 |
|
|
email text, |
16 |
|
|
login_method text default 'local', |
17 |
|
|
data text |
18 |
|
|
); |
19 |
|
|
create index profiles_sections on profiles using gist ( "sections" "gist__int_ops" ); |
20 |
|
|
create index profiles_lastlogin on profiles (lastlogin); |
21 |
|
|
create unique index profiles_login on profiles (login) where login is not null and login != ''; |
22 |
|
|
create unique index profiles_email on profiles (email) where email is not null and email != ''; |