From a3cc49725febb2cca1c915ef768604831563954f Mon Sep 17 00:00:00 2001
From: Helmut Grohne <helmut@subdivi.de>
Date: Sun, 3 Feb 2019 12:42:23 +0100
Subject: initial checkin

---
 schema.sql | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 schema.sql

(limited to 'schema.sql')

diff --git a/schema.sql b/schema.sql
new file mode 100644
index 0000000..9a19739
--- /dev/null
+++ b/schema.sql
@@ -0,0 +1,30 @@
+CREATE TABLE depstate (
+	source TEXT NOT NULL,
+	version TEXT NOT NULL,
+	architecture TEXT NOT NULL,
+	satisfiable BOOLEAN NOT NULL CHECK (satisfiable in (0, 1)),
+	reason TEXT,
+	UNIQUE (architecture, source, version));
+
+CREATE TABLE depcheck (
+	architecture TEXT NOT NULL UNIQUE,
+	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),
+	("mips", "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);
+
+CREATE TABLE builds (
+	source TEXT NOT NULL,
+	version TEXT NOT NULL,
+	architecture TEXT NOT NULL,
+	success BOOLEAN NOT NULL CHECK (success in (0, 1)),
+	starttime TIMESTAMP NOT NULL,
+	filename TEXT NOT NULL);
-- 
cgit v1.2.3

