Skip to content

Commit

Permalink
Added created_at index for users table.
Browse files Browse the repository at this point in the history
  • Loading branch information
ice-myles committed Oct 28, 2024
1 parent 09dfd7a commit aa578d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ require (
github.com/stretchr/testify v1.9.0
github.com/swaggo/swag v1.16.4
github.com/telegram-mini-apps/init-data-golang v1.1.5
github.com/testcontainers/testcontainers-go v0.33.0
github.com/testcontainers/testcontainers-go v0.34.0
github.com/zeebo/xxh3 v1.0.2
golang.org/x/mod v0.21.0
golang.org/x/net v0.30.0
Expand Down
1 change: 1 addition & 0 deletions users/DDL.sql
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ WHERE mining_boost_level = 0
AND verified_t1_referrals = 0;
CREATE INDEX IF NOT EXISTS users_referred_by_created_at_ix ON users (referred_by, created_at DESC);
CREATE INDEX IF NOT EXISTS users_last_mining_ended_at_ix ON users (last_mining_ended_at DESC NULLS LAST);
CREATE INDEX IF NOT EXISTS users_created_at ON users (created_at ASC);

CREATE OR REPLACE FUNCTION before_update_on_users()
RETURNS TRIGGER AS $$
Expand Down

0 comments on commit aa578d8

Please sign in to comment.