From: Mark Wooding Date: Mon, 28 Jan 2013 10:44:29 +0000 (+0000) Subject: update-bkp-index.in: The tuple (host, fs, date) is not unique. X-Git-Tag: 1.0.0~10 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/rsync-backup/commitdiff_plain/3c6aedd9800e02f0cceb0cf4fff6a0b782b2416e?ds=sidebyside update-bkp-index.in: The tuple (host, fs, date) is not unique. 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. --- 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