From: Steinar H. Gunderson Date: Fri, 20 Jul 2007 23:53:01 +0000 (+0200) Subject: Oops, the unique_filenames index should really be unique. X-Git-Url: https://git.sesse.net/?p=pr0n;a=commitdiff_plain;h=f3022db88d32e70320b58ad8cf99898c46b41103;hp=c8fb633d012a9078990d0abc28cdd527d1362e4a Oops, the unique_filenames index should really be unique. --- diff --git a/sql/upgrade-v2.40.sql b/sql/upgrade-v2.40.sql index 9c4fd27..0c5614e 100644 --- a/sql/upgrade-v2.40.sql +++ b/sql/upgrade-v2.40.sql @@ -44,7 +44,7 @@ ALTER TABLE events DROP CONSTRAINT events_pkey CASCADE; -- Finally, fix up some unique constraints DROP INDEX unique_filenames; -CREATE INDEX unique_filenames ON images (vhost,event,filename); +CREATE UNIQUE INDEX unique_filenames ON images (vhost,event,filename); ALTER TABLE fake_files DROP CONSTRAINT fake_files_pkey; ALTER TABLE fake_files ADD PRIMARY KEY (vhost,event,filename);