Index: transactions.sql
===================================================================
--- transactions.sql	(revision 553)
+++ transactions.sql	(revision 554)
@@ -9,6 +9,7 @@
 	provider text,
 	name text,
 	account_id numeric,
+	session_id text,
 	order_id integer not null,
 	operation_id numeric not null,
 	currency_code varchar(4),
@@ -16,7 +17,9 @@
 	account_user text,
 	payment_system text,
 	account_corr text,
+	success smallint default 1,
 	data text
 );
 CREATE INDEX payments_transactions_operations ON payments_transactions USING btree (provider, operation_id);
+CREATE INDEX payments_transactions_sessions ON payments_transactions USING btree (provider, session_id) WHERE session_id is not null;
 CREATE INDEX payments_transactions_orders ON payments_transactions USING btree (order_id);
