From 93da310af8a40778a12f2decba503a5497285a61 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Tue, 5 Mar 2019 20:01:31 +0100 Subject: schema.sql: improve unique index Most of the time, we'll query depstate by source. Thus it should come first in the uniqueness constraint. --- schema.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, -- cgit v1.2.3