Line # Revision Author
1 694 ahitrov create sequence money_checks_id_seq;
2 select setval('money_checks_id_seq', 1, true);
3 693 ahitrov
4 694 ahitrov create table money_checks
5 693 ahitrov (
6 700 ahitrov id integer not null primary key default nextval('public.money_checks_id_seq'::text),
7 693 ahitrov 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 status smallint not null default 0,
12 provider text,
13 session_id text,
14 name text,
15 order_id integer not null,
16 currency_code varchar(4),
17 sum float,
18 success smallint default 0,
19 data text
20 );
21 694 ahitrov CREATE INDEX money_checks_sessions ON money_checks USING btree (provider, session_id) WHERE session_id is not null;
22 CREATE INDEX money_checks_orders ON money_checks USING btree (order_id);