Flip the order of the fields in the exif_info primary key again; we need to delete...
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 5 Feb 2016 11:00:34 +0000 (12:00 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 5 Feb 2016 11:00:34 +0000 (12:00 +0100)
sql/pr0n.sql
sql/upgrade-v3.11.sql

index 4729a37cdd9e9b71dbf2b922bd19fee46e66469e..371e05cf4fdfef765c35318276fef867dad6ac57 100644 (file)
@@ -77,7 +77,7 @@ CREATE TABLE exif_info (
     key varchar NOT NULL,
     value varchar NOT NULL,
 
     key varchar NOT NULL,
     value varchar NOT NULL,
 
-    PRIMARY KEY ( key, image )
+    PRIMARY KEY ( image, key )
 );
 
 CLUSTER exif_info_pkey ON exif_info;
 );
 
 CLUSTER exif_info_pkey ON exif_info;
index 8f066aa1752b0ff98945d61212846d9e0c8414e1..94884d8dcc64eef373b78101f5e7076f1f97f0ea 100644 (file)
@@ -11,5 +11,4 @@ alter table deleted_images add column render_id integer;
 
 drop index exif_info_key;
 alter table exif_info drop constraint exif_info_pkey;
 
 drop index exif_info_key;
 alter table exif_info drop constraint exif_info_pkey;
-alter table exif_info create primary key ( key, image );
-cluster exif_info_pkey on exif_info;
+alter table exif_info add primary key ( image, key );