function exif_update_1 in Exif 5
File
- ./
exif.install, line 48
Code
function exif_update_1() {
// Works for postgres??
$ret[] = update_sql('ALTER TABLE {exif} RENAME TO {exif_tags}');
// make new table for caching and tracking exif data.
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
$ret[] = update_sql("CREATE TABLE {exif} (\n fid int(10) unsigned NOT NULL default '0',\n ifd int(10) unsigned NOT NULL default '0',\n tag int(10) unsigned NOT NULL default '0',\n value varchar(255) NOT NULL default '',\n PRIMARY KEY (fid, ifd, tag)\n ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
break;
case 'pgsql':
$ret[] = update_sql("CREATE TABLE {exif} (\n fid int(10) unsigned NOT NULL default '0',\n ifd int(10) unsigned NOT NULL default '0',\n tag int(10) unsigned NOT NULL default '0',\n value varchar(255) NOT NULL default '',\n PRIMARY KEY (fid, ifd, tag)\n );");
break;
}
return $ret;
}