From 65ba2b47c8d6c83e37fe772a7b54fd6b7480ce17 Mon Sep 17 00:00:00 2001
From: Karen Arutyunov <karen@codesynthesis.com>
Date: Wed, 1 Apr 2020 23:01:02 +0300
Subject: Add support for test-exclude task manifest value

Note that the last two commits demonstrate an approach to use for migrating
data on the ODB object member type change.
---
 libbrep/build-extra.sql | 73 +++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 67 insertions(+), 6 deletions(-)

(limited to 'libbrep/build-extra.sql')

diff --git a/libbrep/build-extra.sql b/libbrep/build-extra.sql
index 7b9fec5..e8d0775 100644
--- a/libbrep/build-extra.sql
+++ b/libbrep/build-extra.sql
@@ -10,6 +10,12 @@ DROP FOREIGN TABLE IF EXISTS build_package_constraints;
 
 DROP FOREIGN TABLE IF EXISTS build_package_builds;
 
+DROP FOREIGN TABLE IF EXISTS build_package_benchmarks;
+
+DROP FOREIGN TABLE IF EXISTS build_package_examples;
+
+DROP FOREIGN TABLE IF EXISTS build_package_tests;
+
 DROP FOREIGN TABLE IF EXISTS build_package;
 
 DROP FOREIGN TABLE IF EXISTS build_repository;
@@ -18,7 +24,6 @@ DROP FOREIGN TABLE IF EXISTS build_tenant;
 
 -- The foreign table for build_tenant object.
 --
---
 CREATE FOREIGN TABLE build_tenant (
   id TEXT NOT NULL,
   archived BOOLEAN NOT NULL)
@@ -26,7 +31,6 @@ SERVER package_server OPTIONS (table_name 'tenant');
 
 -- The foreign table for build_repository object.
 --
---
 CREATE FOREIGN TABLE build_repository (
   tenant TEXT NOT NULL,
   canonical_name TEXT NOT NULL,
@@ -37,7 +41,6 @@ SERVER package_server OPTIONS (table_name 'repository');
 
 -- The foreign table for build_package object.
 --
---
 CREATE FOREIGN TABLE build_package (
   tenant TEXT NOT NULL,
   name CITEXT NOT NULL,
@@ -49,12 +52,71 @@ CREATE FOREIGN TABLE build_package (
   version_release TEXT NULL,
   internal_repository_tenant TEXT NULL,
   internal_repository_canonical_name TEXT NULL,
-  buildable_ BOOLEAN NOT NULL)
+  buildable TEXT NOT NULL)
 SERVER package_server OPTIONS (table_name 'package');
 
--- The foreign table for the build_package object builds member (that is of a
+-- The foreign table for the build_package object tests member (that is of a
 -- container type).
 --
+CREATE FOREIGN TABLE build_package_tests (
+  tenant TEXT NOT NULL,
+  name CITEXT NOT NULL,
+  version_epoch INTEGER NOT NULL,
+  version_canonical_upstream TEXT NOT NULL,
+  version_canonical_release TEXT NOT NULL COLLATE "C",
+  version_revision INTEGER NOT NULL,
+  index BIGINT NOT NULL,
+  dep_name CITEXT NOT NULL,
+  dep_package_tenant TEXT NULL,
+  dep_package_name CITEXT NULL,
+  dep_package_version_epoch INTEGER NULL,
+  dep_package_version_canonical_upstream TEXT NULL,
+  dep_package_version_canonical_release TEXT NULL COLLATE "C",
+  dep_package_version_revision INTEGER NULL)
+SERVER package_server OPTIONS (table_name 'package_tests');
+
+-- The foreign table for the build_package object examples member (that is of a
+-- container type).
+--
+CREATE FOREIGN TABLE build_package_examples (
+  tenant TEXT NOT NULL,
+  name CITEXT NOT NULL,
+  version_epoch INTEGER NOT NULL,
+  version_canonical_upstream TEXT NOT NULL,
+  version_canonical_release TEXT NOT NULL COLLATE "C",
+  version_revision INTEGER NOT NULL,
+  index BIGINT NOT NULL,
+  dep_name CITEXT NOT NULL,
+  dep_package_tenant TEXT NULL,
+  dep_package_name CITEXT NULL,
+  dep_package_version_epoch INTEGER NULL,
+  dep_package_version_canonical_upstream TEXT NULL,
+  dep_package_version_canonical_release TEXT NULL COLLATE "C",
+  dep_package_version_revision INTEGER NULL)
+SERVER package_server OPTIONS (table_name 'package_examples');
+
+-- The foreign table for the build_package object benchmarks member (that is
+-- of a container type).
+--
+CREATE FOREIGN TABLE build_package_benchmarks (
+  tenant TEXT NOT NULL,
+  name CITEXT NOT NULL,
+  version_epoch INTEGER NOT NULL,
+  version_canonical_upstream TEXT NOT NULL,
+  version_canonical_release TEXT NOT NULL COLLATE "C",
+  version_revision INTEGER NOT NULL,
+  index BIGINT NOT NULL,
+  dep_name CITEXT NOT NULL,
+  dep_package_tenant TEXT NULL,
+  dep_package_name CITEXT NULL,
+  dep_package_version_epoch INTEGER NULL,
+  dep_package_version_canonical_upstream TEXT NULL,
+  dep_package_version_canonical_release TEXT NULL COLLATE "C",
+  dep_package_version_revision INTEGER NULL)
+SERVER package_server OPTIONS (table_name 'package_benchmarks');
+
+-- The foreign table for the build_package object builds member (that is of a
+-- container type).
 --
 CREATE FOREIGN TABLE build_package_builds (
   tenant TEXT NOT NULL,
@@ -71,7 +133,6 @@ SERVER package_server OPTIONS (table_name 'package_builds');
 -- The foreign table for the build_package object constraints member (that is
 -- of a container type).
 --
---
 CREATE FOREIGN TABLE build_package_constraints (
   tenant TEXT NOT NULL,
   name CITEXT NOT NULL,
-- 
cgit v1.1

