From 590a4677f34f866911fa6c0902130f8dbea7421a Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 15 Feb 2009 08:08:22 +0000 Subject: Tweak EXIF extraction code to be more robust. * Create Exif_Record_Model to track whether we've scanned the EXIF data for this photo or not. This allows us to track photos that don't have EXIF data (and won't have any Exif_Keys) * Blow away old Exif_Keys when extracting, else we hit unique index constraints. * exif::_get_stats() -- before it was running the task forever --- modules/exif/helpers/exif_installer.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules/exif/helpers/exif_installer.php') diff --git a/modules/exif/helpers/exif_installer.php b/modules/exif/helpers/exif_installer.php index a008581d..791cd4a6 100644 --- a/modules/exif/helpers/exif_installer.php +++ b/modules/exif/helpers/exif_installer.php @@ -32,6 +32,12 @@ class exif_installer { PRIMARY KEY (`id`), UNIQUE KEY(`item_id`, `summary`, `name`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); + $db->query("CREATE TABLE IF NOT EXISTS `exif_records` ( + `id` int(9) NOT NULL auto_increment, + `item_id` int(9) NOT NULL, + `dirty` BOOLEAN default 1, + PRIMARY KEY (`id`)) + ENGINE=InnoDB DEFAULT CHARSET=utf8;"); module::set_version("exif", 1); } } -- cgit v1.2.3