mirror of
https://github.com/pagefaultgames/rogueserver.git
synced 2025-04-03 03:27:13 +08:00
Added index on friends table
This commit is contained in:
parent
ac059b0a2e
commit
0b53bb87c3
1
db/db.go
1
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 (user) REFERENCES accounts (uuid) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
FOREIGN KEY (friend) 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 {
|
for _, q := range queries {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user