From f6d219e1a4fddc0abb11b2235866d072789d1a13 Mon Sep 17 00:00:00 2001
From: Helmut Grohne <helmut@subdivi.de>
Date: Thu, 8 Oct 2020 22:13:57 +0200
Subject: add build architecture to schema of depcheck table

---
 schema.sql | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

(limited to 'schema.sql')

diff --git a/schema.sql b/schema.sql
index 7c591c9..5bae74c 100644
--- a/schema.sql
+++ b/schema.sql
@@ -10,18 +10,21 @@ CREATE TABLE depstate (
 	UNIQUE (source, buildarch, hostarch, version));
 
 CREATE TABLE depcheck (
-	architecture TEXT NOT NULL UNIQUE,
+	buildarch TEXT NOT NULL,
+	hostarch TEXT NOT NULL,
 	releasetime TIMESTAMP NOT NULL,
 	updatetime TIMESTAMP NOT NULL,
-	giveback BOOLEAN NOT NULL CHECK (giveback in (0, 1)));
-INSERT INTO depcheck (architecture, releasetime, updatetime, giveback) VALUES
-	("arm64", "2000-01-01 00:00:00", "2000-01-01 00:00:00", 1),
-	("armel", "2000-01-01 00:00:00", "2000-01-01 00:00:00", 1),
-	("armhf", "2000-01-01 00:00:00", "2000-01-01 00:00:00", 1),
-	("mips64el", "2000-01-01 00:00:00", "2000-01-01 00:00:00", 1),
-	("mipsel", "2000-01-01 00:00:00", "2000-01-01 00:00:00", 1),
-	("ppc64el", "2000-01-01 00:00:00", "2000-01-01 00:00:00", 1),
-	("s390x", "2000-01-01 00:00:00", "2000-01-01 00:00:00", 1);
+	giveback BOOLEAN NOT NULL CHECK (giveback in (0, 1)),
+	UNIQUE (buildarch, hostarch));
+INSERT INTO depcheck (buildarch, hostarch, releasetime, updatetime,
+		      giveback) VALUES
+	('amd64', 'arm64', '2000-01-01 00:00:00', '2000-01-01 00:00:00', 1),
+	('amd64', 'armel', '2000-01-01 00:00:00', '2000-01-01 00:00:00', 1),
+	('amd64', 'armhf', '2000-01-01 00:00:00', '2000-01-01 00:00:00', 1),
+	('amd64', 'mips64el', '2000-01-01 00:00:00', '2000-01-01 00:00:00', 1),
+	('amd64', 'mipsel', '2000-01-01 00:00:00', '2000-01-01 00:00:00', 1),
+	('amd64', 'ppc64el', '2000-01-01 00:00:00', '2000-01-01 00:00:00', 1),
+	('amd64', 's390x', '2000-01-01 00:00:00', '2000-01-01 00:00:00', 1);
 
 CREATE TABLE builds (
 	source TEXT NOT NULL,
-- 
cgit v1.2.3

