From 22059500a799d788c09171e31b668ab8259ec057 Mon Sep 17 00:00:00 2001
From: Karen Arutyunov <karen@codesynthesis.com>
Date: Sat, 17 Nov 2018 23:41:25 +0300
Subject: Add support for builds manifest value

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

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

diff --git a/libbrep/build-extra.sql b/libbrep/build-extra.sql
index 6c0d6ef..1ada713 100644
--- a/libbrep/build-extra.sql
+++ b/libbrep/build-extra.sql
@@ -8,6 +8,8 @@
 
 DROP FOREIGN TABLE IF EXISTS build_package_constraints;
 
+DROP FOREIGN TABLE IF EXISTS build_package_builds;
+
 DROP FOREIGN TABLE IF EXISTS build_package;
 
 DROP FOREIGN TABLE IF EXISTS build_repository;
@@ -49,6 +51,22 @@ CREATE FOREIGN TABLE build_package (
   internal_repository_canonical_name TEXT NULL)
 SERVER package_server OPTIONS (table_name 'package');
 
+-- 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,
+  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,
+  expression TEXT NOT NULL,
+  comment TEXT NOT NULL)
+SERVER package_server OPTIONS (table_name 'package_builds');
+
 -- The foreign table for the build_package object constraints member (that is
 -- of a container type).
 --
@@ -63,5 +81,6 @@ CREATE FOREIGN TABLE build_package_constraints (
   index BIGINT NOT NULL,
   exclusion BOOLEAN NOT NULL,
   config TEXT NOT NULL,
-  target TEXT NULL)
+  target TEXT NULL,
+  comment TEXT NOT NULL)
 SERVER package_server OPTIONS (table_name 'package_build_constraints');
-- 
cgit v1.1

