summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2019-03-05 20:01:31 +0100
committerHelmut Grohne <helmut@subdivi.de>2019-03-05 20:01:31 +0100
commit93da310af8a40778a12f2decba503a5497285a61 (patch)
tree4b3c398dcaf4d2ef6d2e6aa1951e28f162585e09
parentb15898cf32679ebc8d9a63e8d631847bcc5bf5e0 (diff)
downloadcrossqa-93da310af8a40778a12f2decba503a5497285a61.tar.gz
schema.sql: improve unique index
Most of the time, we'll query depstate by source. Thus it should come first in the uniqueness constraint.
-rw-r--r--schema.sql2
1 files changed, 1 insertions, 1 deletions
diff --git a/schema.sql b/schema.sql
index 9a19739..a17d1f7 100644
--- a/schema.sql
+++ b/schema.sql
@@ -4,7 +4,7 @@ CREATE TABLE depstate (
architecture TEXT NOT NULL,
satisfiable BOOLEAN NOT NULL CHECK (satisfiable in (0, 1)),
reason TEXT,
- UNIQUE (architecture, source, version));
+ UNIQUE (source, architecture, version));
CREATE TABLE depcheck (
architecture TEXT NOT NULL UNIQUE,