summaryrefslogtreecommitdiff
path: root/modules/exif/helpers/exif_installer.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-02-15 08:08:22 +0000
committerBharat Mediratta <bharat@menalto.com>2009-02-15 08:08:22 +0000
commit590a4677f34f866911fa6c0902130f8dbea7421a (patch)
treee099100f14d048d6f8725f65af4c4a8f4009c130 /modules/exif/helpers/exif_installer.php
parenteb3e2359a7301588b16e0f29e96242fa48a39e6f (diff)
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
Diffstat (limited to 'modules/exif/helpers/exif_installer.php')
-rw-r--r--modules/exif/helpers/exif_installer.php6
1 files changed, 6 insertions, 0 deletions
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);
}
}