summaryrefslogtreecommitdiff
path: root/modules/exif
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-04-25 22:02:50 +0000
committerBharat Mediratta <bharat@menalto.com>2009-04-25 22:02:50 +0000
commitbab514a48df6b7c4f1044580ff8eb1dc4b0e8100 (patch)
tree4971a93cd6ebf3348ec6095635c5ee6182b4ab8e /modules/exif
parent3950e7582b8d725140003103f35dd285d59dc65f (diff)
Change the value column to varbinary so that we can handle the occasional binary data embedded in places like the EXIF caption field
Diffstat (limited to 'modules/exif')
-rw-r--r--modules/exif/helpers/exif_installer.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/exif/helpers/exif_installer.php b/modules/exif/helpers/exif_installer.php
index 7bc02a98..595433e5 100644
--- a/modules/exif/helpers/exif_installer.php
+++ b/modules/exif/helpers/exif_installer.php
@@ -23,11 +23,14 @@ class exif_installer {
if ($version == 0) {
$db = Database::instance();
+ // we use blob as the data type for the value column because occasionally there's binary
+ // data embedded in the caption field for photos. This preserves the binary data at the
+ // expense of natural language collation (which we don't use anyway).
$db->query("CREATE TABLE IF NOT EXISTS {exif_keys} (
`id` int(9) NOT NULL auto_increment,
`item_id` int(9) NOT NULL,
`name` varchar(64) NOT NULL,
- `value` varchar(1024) NOT NULL,
+ `value` varbinary(1024) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY(`item_id`, `name`))
ENGINE=InnoDB DEFAULT CHARSET=utf8;");