From 3c6aedd9800e02f0cceb0cf4fff6a0b782b2416e Mon Sep 17 00:00:00 2001 Message-Id: <3c6aedd9800e02f0cceb0cf4fff6a0b782b2416e.1718804191.git.mdw@distorted.org.uk> From: Mark Wooding Date: Mon, 28 Jan 2013 10:44:29 +0000 Subject: [PATCH] update-bkp-index.in: The tuple (host, fs, date) is not unique. Organization: Straylight/Edgeware From: Mark Wooding So we must fix the schema, and include the volume name in the primary key. This is still early days, so I'm just going to break it. --- update-bkp-index.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/update-bkp-index.in b/update-bkp-index.in index 23b64bd..4aa799b 100644 --- a/update-bkp-index.in +++ b/update-bkp-index.in @@ -52,7 +52,8 @@ CREATE TABLE idx ( fs TEXT NOT NULL, date TEXT NOT NULL, vol TEXT NOT NULL, - PRIMARY KEY (host, fs, date)); + PRIMARY KEY (host, fs, vol, date)); +CREATE INDEX idx_byhostfsdate ON idx (host, fs, date); CREATE INDEX idx_byvol ON idx (vol); EOF -- [mdw]