diff --git a/db/db.go b/db/db.go index 96e2c8f..cfba90b 100644 --- a/db/db.go +++ b/db/db.go @@ -185,6 +185,7 @@ func setupDb(tx *sql.Tx) error { FOREIGN KEY (user) REFERENCES accounts (uuid) ON DELETE CASCADE ON UPDATE CASCADE, FOREIGN KEY (friend) REFERENCES accounts (uuid) ON DELETE CASCADE ON UPDATE CASCADE )`, + `CREATE INDEX IF NOT EXISTS allUserFriends ON friends (user)`, } for _, q := range queries {