1 |
358 |
ahitrov |
create table payments_transactions |
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 |
|
|
status smallint not null default 0, |
9 |
|
|
provider text, |
10 |
|
|
name text, |
11 |
|
|
account_id numeric, |
12 |
554 |
ahitrov |
session_id text, |
13 |
358 |
ahitrov |
order_id integer not null, |
14 |
|
|
operation_id numeric not null, |
15 |
|
|
currency_code varchar(4), |
16 |
|
|
sum float, |
17 |
|
|
account_user text, |
18 |
|
|
payment_system text, |
19 |
|
|
account_corr text, |
20 |
554 |
ahitrov |
success smallint default 1, |
21 |
358 |
ahitrov |
data text |
22 |
|
|
); |
23 |
|
|
CREATE INDEX payments_transactions_operations ON payments_transactions USING btree (provider, operation_id); |
24 |
554 |
ahitrov |
CREATE INDEX payments_transactions_sessions ON payments_transactions USING btree (provider, session_id) WHERE session_id is not null; |
25 |
358 |
ahitrov |
CREATE INDEX payments_transactions_orders ON payments_transactions USING btree (order_id); |