From e9154366614b0699c1839345d0ba7573ecaff83b Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Thu, 18 Jul 2019 14:08:44 +0100 Subject: [PATCH] commands/postgres: Upgrade the data base schema to v1.3 Upgrade the database schema to reflect the additions of directory artifacts and the missing TargetInfo property. --- wa/commands/postgres_schemas/postgres_schema.sql | 4 +++- .../postgres_schemas/postgres_schema_update_v1.3.sql | 3 +++ wa/commands/schema_changelog.rst | 10 ++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 wa/commands/postgres_schemas/postgres_schema_update_v1.3.sql diff --git a/wa/commands/postgres_schemas/postgres_schema.sql b/wa/commands/postgres_schemas/postgres_schema.sql index 7510c778..19daa85e 100644 --- a/wa/commands/postgres_schemas/postgres_schema.sql +++ b/wa/commands/postgres_schemas/postgres_schema.sql @@ -1,4 +1,4 @@ ---!VERSION!1.2!ENDVERSION! +--!VERSION!1.3!ENDVERSION! CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE EXTENSION IF NOT EXISTS "lo"; @@ -96,6 +96,7 @@ CREATE TABLE Targets ( android_id text, _pod_version int, _pod_serialization_version int, + system_id text, PRIMARY KEY (oid) ); @@ -164,6 +165,7 @@ CREATE TABLE Artifacts ( kind text, _pod_version int, _pod_serialization_version int, + is_dir boolean, PRIMARY KEY (oid) ); diff --git a/wa/commands/postgres_schemas/postgres_schema_update_v1.3.sql b/wa/commands/postgres_schemas/postgres_schema_update_v1.3.sql new file mode 100644 index 00000000..9d6fc8a2 --- /dev/null +++ b/wa/commands/postgres_schemas/postgres_schema_update_v1.3.sql @@ -0,0 +1,3 @@ +ALTER TABLE targets ADD COLUMN system_id text; + +ALTER TABLE artifacts ADD COLUMN is_dir boolean; diff --git a/wa/commands/schema_changelog.rst b/wa/commands/schema_changelog.rst index 862f9da4..6b4cf41c 100644 --- a/wa/commands/schema_changelog.rst +++ b/wa/commands/schema_changelog.rst @@ -7,3 +7,13 @@ was done following an extended discussion and tests that verified that the savings in processing power were not enough to warrant the creation of a dedicated server or file handler. +## 1.2 +- Rename the `resourcegetters` table to `resource_getters` for consistency. +- Add Job and Run level classifiers. +- Add missing android specific properties to targets. +- Add new POD meta data to relevant tables. +- Correct job column name from `retires` to `retry`. +- Add missing run information. +## 1.3 +- Add missing "system_id" field from TargetInfo. +- Enable support for uploading Artifact that represent directories.