-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This file adds more indexes to the database to improve performance
- Loading branch information
1 parent
40b8ccd
commit e9b81e4
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* Complex schemas are not great in Sails auto migrations | ||
If you are running a CSMM instance with many servers or have high data throughput these commands can help you out. */ | ||
|
||
--- Indexes | ||
ALTER TABLE sdtdconfig ADD INDEX IDX_sdtdconfig_server (`server` ASC); | ||
ALTER TABLE historicalinfo ADD INDEX IDX_historicalinfo_createdAt (`createdAt` ASC); | ||
ALTER TABLE player ADD INDEX IDX_player_steamId_server (`steamId` ASC, `server` ASC); | ||
ALTER TABLE analytics ADD INDEX IDX_analytics_createdAt_server (`createdAt` ASC, `server` ASC); | ||
ALTER TABLE trackinginfo ADD INDEX createdAt (createdAt ASC); | ||
ALTER TABLE trackinginfo ADD INDEX server (server ASC); | ||
ALTER TABLE customdiscordnotification ADD INDEX IDX_customdiscordnotification_server (`server` ASC); | ||
|
||
|
||
-- Data types | ||
ALTER TABLE gblcomment MODIFY content TEXT; | ||
ALTER TABLE sdtdconfig MODIFY votingCommand TEXT; | ||
ALTER TABLE customcommand MODIFY commandsToExecute TEXT; | ||
ALTER TABLE customhook MODIFY commandsToExecute TEXT; | ||
ALTER TABLE cronjob MODIFY command TEXT; | ||
ALTER TABLE banentry MODIFY reason TEXT; |