From 28de3ed8416c20ab54527e5cc8a48c46de3bb9b5 Mon Sep 17 00:00:00 2001
From: Karen Arutyunov <karen@codesynthesis.com>
Date: Mon, 6 Sep 2021 19:22:56 +0300
Subject: Add support for requires, tests, examples, benchmarks, and host task
 manifest values

---
 libbrep/build-extra.sql | 50 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 49 insertions(+), 1 deletion(-)

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

diff --git a/libbrep/build-extra.sql b/libbrep/build-extra.sql
index a0cea97..bd3df2b 100644
--- a/libbrep/build-extra.sql
+++ b/libbrep/build-extra.sql
@@ -12,6 +12,10 @@ DROP FOREIGN TABLE IF EXISTS build_package_builds;
 
 DROP FOREIGN TABLE IF EXISTS build_package_tests;
 
+DROP FOREIGN TABLE IF EXISTS build_package_requirement_alternatives;
+
+DROP FOREIGN TABLE IF EXISTS build_package_requirements;
+
 DROP FOREIGN TABLE IF EXISTS build_package;
 
 DROP FOREIGN TABLE IF EXISTS build_repository;
@@ -53,6 +57,34 @@ CREATE FOREIGN TABLE build_package (
   buildable BOOLEAN NOT NULL)
 SERVER package_server OPTIONS (table_name 'package');
 
+-- The foreign tables for the build_package object requirements member (that
+-- is of a 2-dimensional container type).
+--
+CREATE FOREIGN TABLE build_package_requirements (
+  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,
+  conditional BOOLEAN NOT NULL,
+  buildtime BOOLEAN NOT NULL,
+  comment TEXT NOT NULL)
+SERVER package_server OPTIONS (table_name 'package_requirements');
+
+CREATE FOREIGN TABLE build_package_requirement_alternatives (
+  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,
+  requirement_index BIGINT NOT NULL,
+  index BIGINT NOT NULL,
+  id TEXT NOT NULL)
+SERVER package_server OPTIONS (table_name 'package_requirement_alternatives');
+
 -- The foreign table for the build_package object tests member (that is of a
 -- container type).
 --
@@ -65,12 +97,28 @@ CREATE FOREIGN TABLE build_package_tests (
   version_revision INTEGER NOT NULL,
   index BIGINT NOT NULL,
   test_name CITEXT NOT NULL,
+  test_min_version_epoch INTEGER NULL,
+  test_min_version_canonical_upstream TEXT NULL,
+  test_min_version_canonical_release TEXT NULL,
+  test_min_version_revision INTEGER NULL,
+  test_min_version_upstream TEXT NULL,
+  test_min_version_release TEXT NULL,
+  test_max_version_epoch INTEGER NULL,
+  test_max_version_canonical_upstream TEXT NULL,
+  test_max_version_canonical_release TEXT NULL,
+  test_max_version_revision INTEGER NULL,
+  test_max_version_upstream TEXT NULL,
+  test_max_version_release TEXT NULL,
+  test_min_open BOOLEAN NULL,
+  test_max_open BOOLEAN NULL,
   test_package_tenant TEXT NULL,
   test_package_name CITEXT NULL,
   test_package_version_epoch INTEGER NULL,
   test_package_version_canonical_upstream TEXT NULL,
   test_package_version_canonical_release TEXT NULL COLLATE "C",
-  test_package_version_revision INTEGER NULL)
+  test_package_version_revision INTEGER NULL,
+  test_type TEXT NOT NULL,
+  test_buildtime BOOLEAN NOT NULL)
 SERVER package_server OPTIONS (table_name 'package_tests');
 
 -- The foreign table for the build_package object builds member (that is of a
-- 
cgit v1.1

