aboutsummaryrefslogtreecommitdiff
path: root/sql/tables.sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql/tables.sql')
-rw-r--r--sql/tables.sql6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/tables.sql b/sql/tables.sql
index d56156b..37ffbff 100644
--- a/sql/tables.sql
+++ b/sql/tables.sql
@@ -41,3 +41,9 @@ create table transactions (
41 (operation in ('fee', 'withdrawal') or recipient is not null), 41 (operation in ('fee', 'withdrawal') or recipient is not null),
42 amount simoleon not null check (amount > 0) 42 amount simoleon not null check (amount > 0)
43); 43);
44
45-- Additional indexes for the financial transaction log for the common
46-- participant-centered queries. Those also include the datetime column, which
47-- is useful for paginating the log.
48create index transaction_source_index on transactions (source, datetime);
49create index transaction_recipient_index on transactions (recipient, datetime);