Adds an index on erro_connection_log for yogbot review command (#12065)

* Adds an index on erro_connection_log for yogbot review command

* r

* Comma

* Wrong comma

* Update database_changelog.txt
This commit is contained in:
alexkar598
2021-08-25 19:10:19 -04:00
committed by GitHub
parent dd12feeedb
commit 266cc701e3
4 changed files with 16 additions and 6 deletions

View File

@@ -1,13 +1,21 @@
Any time you make a change to the schema files, remember to increment the database schema version. Generally increment the minor number, major should be reserved for significant changes to the schema. Both values go up to 255. Any time you make a change to the schema files, remember to increment the database schema version. Generally increment the minor number, major should be reserved for significant changes to the schema. Both values go up to 255.
The latest database version is 5.5; The query to update the schema revision table is: The latest database version is 5.6; The query to update the schema revision table is:
INSERT INTO `schema_revision` (`major`, `minor`) VALUES (5, 5); INSERT INTO `schema_revision` (`major`, `minor`) VALUES (5, 6);
or or
INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (5, 5); INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (5, 6);
In any query remember to add a prefix to the table names if you use one. In any query remember to add a prefix to the table names if you use one.
version 5.6 14 August 2021, by alexkar598
Adds index on connection_log
create index idx_review
on connection_log (ckey, computerid, ip);
---------------------------------------------------- ----------------------------------------------------
version 5.5 14 August 2021, by JamieD1 version 5.5 14 August 2021, by JamieD1

View File

@@ -117,7 +117,8 @@ CREATE TABLE IF NOT EXISTS `connection_log` (
`ckey` varchar(45) DEFAULT NULL, `ckey` varchar(45) DEFAULT NULL,
`ip` int(10) unsigned NOT NULL, `ip` int(10) unsigned NOT NULL,
`computerid` varchar(45) DEFAULT NULL, `computerid` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`),
KEY `idx_review` (`ckey`, `computerid`, `ip`)
) ENGINE=InnoDB AUTO_INCREMENT=4192042 DEFAULT CHARSET=utf8; ) ENGINE=InnoDB AUTO_INCREMENT=4192042 DEFAULT CHARSET=utf8;

View File

@@ -117,7 +117,8 @@ CREATE TABLE IF NOT EXISTS `SS13_connection_log` (
`ckey` varchar(45) DEFAULT NULL, `ckey` varchar(45) DEFAULT NULL,
`ip` int(10) unsigned NOT NULL, `ip` int(10) unsigned NOT NULL,
`computerid` varchar(45) DEFAULT NULL, `computerid` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`),
KEY `idx_review` (`ckey`, `computerid`, `ip`)
) ENGINE=InnoDB AUTO_INCREMENT=4192042 DEFAULT CHARSET=utf8; ) ENGINE=InnoDB AUTO_INCREMENT=4192042 DEFAULT CHARSET=utf8;

View File

@@ -20,8 +20,8 @@
* *
* make sure you add an update to the schema_version stable in the db changelog * make sure you add an update to the schema_version stable in the db changelog
*/ */
#define DB_MINOR_VERSION 5
#define DB_MINOR_VERSION 6
//! ## Timing subsystem //! ## Timing subsystem
/** /**