]> git.sesse.net Git - pr0n/commitdiff
Make the foreign key from image to exif_info cascade on delete.
authorSteinar H. Gunderson <sesse@debian.org>
Sun, 22 Jul 2007 19:29:11 +0000 (21:29 +0200)
committerSteinar H. Gunderson <sesse@debian.org>
Sun, 22 Jul 2007 19:29:11 +0000 (21:29 +0200)
sql/pr0n.sql

index c3b668985eaa2b9e2b32b3e4b7109599bde61c1f..cd528e6600858217e0286d92ef51ccfbdd17f9b8 100644 (file)
@@ -72,7 +72,7 @@ CREATE TABLE users (
 );
 
 CREATE TABLE exif_info (
 );
 
 CREATE TABLE exif_info (
-    image integer NOT NULL REFERENCES images (id),
+    image integer NOT NULL REFERENCES images (id) ON DELETE CASCADE,
     tag varchar NOT NULL,
     value varchar NOT NULL,
 
     tag varchar NOT NULL,
     value varchar NOT NULL,