Skip to content

Commit de626ff

Browse files
committed
loopdb: add deposit indices
1 parent d7635f3 commit de626ff

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

loopdb/sqlc/migrations/000010_static_address_deposits.up.sql

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,7 @@ CREATE TABLE IF NOT EXISTS deposit_updates (
4545

4646
-- update_timestamp is the timestamp of the update.
4747
update_timestamp TIMESTAMP NOT NULL
48-
);
48+
);
49+
50+
CREATE INDEX IF NOT EXISTS deposits_id_index ON deposits(deposit_id);
51+
CREATE INDEX IF NOT EXISTS deposit_updates_id_timestamp_index ON deposit_updates(deposit_id, update_timestamp DESC);

0 commit comments

Comments
 (0)