From e9839d52c4fd7d458a5de9f15444c5dec80d3bfa Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Wed, 23 Oct 2019 14:14:12 +0100 Subject: [PATCH] output_processor/postgres: Fix out of range for `hostid` Change the field type of `hostid` as part of `TargetInfo` from `Int` to Bigint to prevent some ids from exceeding the maximum value. --- wa/commands/postgres_schemas/postgres_schema.sql | 4 ++-- wa/commands/postgres_schemas/postgres_schema_update_v1.5.sql | 1 + wa/commands/schema_changelog.rst | 5 +++++ 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 wa/commands/postgres_schemas/postgres_schema_update_v1.5.sql diff --git a/wa/commands/postgres_schemas/postgres_schema.sql b/wa/commands/postgres_schemas/postgres_schema.sql index 658bb01b..b0f5950d 100644 --- a/wa/commands/postgres_schemas/postgres_schema.sql +++ b/wa/commands/postgres_schemas/postgres_schema.sql @@ -1,4 +1,4 @@ ---!VERSION!1.4!ENDVERSION! +--!VERSION!1.5!ENDVERSION! CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE EXTENSION IF NOT EXISTS "lo"; @@ -82,7 +82,7 @@ CREATE TABLE Targets ( cpus text[], os text, os_version jsonb, - hostid int, + hostid bigint, hostname text, abi text, is_rooted boolean, diff --git a/wa/commands/postgres_schemas/postgres_schema_update_v1.5.sql b/wa/commands/postgres_schemas/postgres_schema_update_v1.5.sql new file mode 100644 index 00000000..0e7a9617 --- /dev/null +++ b/wa/commands/postgres_schemas/postgres_schema_update_v1.5.sql @@ -0,0 +1 @@ +ALTER TABLE targets ALTER hostid TYPE BIGINT; diff --git a/wa/commands/schema_changelog.rst b/wa/commands/schema_changelog.rst index 6b4cf41c..70ab4230 100644 --- a/wa/commands/schema_changelog.rst +++ b/wa/commands/schema_changelog.rst @@ -17,3 +17,8 @@ ## 1.3 - Add missing "system_id" field from TargetInfo. - Enable support for uploading Artifact that represent directories. +## 1.4 +- Add "modules" field to TargetInfo to list the modules loaded by the target + during the run. +## 1.5 +- Change the type of the "hostid" in TargetInfo from Int to Bigint.