Skip to content

Commit

Permalink
Fix IPs in telemetry_connections not being unsigned (#63573)
Browse files Browse the repository at this point in the history
About The Pull Request

Fixes IPs not being unsigned, causing problems where they get capped if the IP is too big.

Not tested.
  • Loading branch information
Mothblocks authored Dec 26, 2021
1 parent e311c9f commit cf69eb0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
12 changes: 10 additions & 2 deletions SQL/database_changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,20 @@ Make sure to also update `DB_MAJOR_VERSION` and `DB_MINOR_VERSION`, which can be

The latest database version is 5.21; The query to update the schema revision table is:

INSERT INTO `schema_revision` (`major`, `minor`) VALUES (5, 21);
INSERT INTO `schema_revision` (`major`, `minor`) VALUES (5, 22);
or
INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (5, 21);
INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (5, 22);

In any query remember to add a prefix to the table names if you use one.

Version 5.22, 22 December 2021, by Mothblocks
Fixes a bug in `telemetry_connections` that limited the range of IPs.

```
ALTER TABLE `telemetry_connections` MODIFY COLUMN `address` INT(10) UNSIGNED NOT NULL;
```
-----------------------------------------------------

Version 5.21, 15 December 2021, by Mothblocks
Adds `telemetry_connections` table for tracking tgui telemetry.

Expand Down
2 changes: 1 addition & 1 deletion SQL/tgstation_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ CREATE TABLE `telemetry_connections` (
`id` INT NOT NULL AUTO_INCREMENT,
`ckey` VARCHAR(32) NOT NULL,
`telemetry_ckey` VARCHAR(32) NOT NULL,
`address` INT(10) NOT NULL,
`address` INT(10) UNSIGNED NOT NULL,
`computer_id` VARCHAR(32) NOT NULL,
`first_round_id` INT(11) UNSIGNED NULL,
`latest_round_id` INT(11) UNSIGNED NULL,
Expand Down
2 changes: 1 addition & 1 deletion SQL/tgstation_schema_prefixed.sql
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ CREATE TABLE `SS13_telemetry_connections` (
`id` INT NOT NULL AUTO_INCREMENT,
`ckey` VARCHAR(32) NOT NULL,
`telemetry_ckey` VARCHAR(32) NOT NULL,
`address` INT(10) NOT NULL,
`address` INT(10) UNSIGNED NOT NULL,
`computer_id` VARCHAR(32) NOT NULL,
`first_round_id` INT(11) UNSIGNED NULL,
`latest_round_id` INT(11) UNSIGNED NULL,
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*
* make sure you add an update to the schema_version stable in the db changelog
*/
#define DB_MINOR_VERSION 21
#define DB_MINOR_VERSION 22


//! ## Timing subsystem
Expand Down

0 comments on commit cf69eb0

Please sign in to comment.