1 |
741 |
ahitrov |
create sequence mailqueue_id_seq; |
2 |
|
|
select setval('mailqueue_id_seq', 1, true); |
3 |
|
|
|
4 |
|
|
create table mailqueue |
5 |
|
|
( |
6 |
|
|
id integer not null primary key default nextval('public.mailqueue_id_seq'::text), |
7 |
|
|
class text not null, |
8 |
|
|
ctime timestamp not null default now(), |
9 |
|
|
mtime timestamp not null default now(), |
10 |
|
|
dtime timestamp not null default now(), |
11 |
|
|
etime timestamp, |
12 |
|
|
status smallint not null default 0, |
13 |
|
|
sections integer, |
14 |
|
|
name text, |
15 |
|
|
subject text, |
16 |
|
|
data text |
17 |
|
|
); |
18 |
743 |
ahitrov |
create index mailqueue_actual on mailqueue (status, dtime) WHERE status = 0; |
19 |
741 |
ahitrov |
create index mailqueue_dtime on mailqueue (dtime); |