blogapi_update_5000
- Versions
- 5
blogapi_update_5000()
Add blogapi_files table to enable size restriction for BlogAPI file uploads.
Added in Drupal 5.10 (and 6.4).
Related topics
Code
modules/blogapi/blogapi.install, line 54
<?php
function blogapi_update_5000() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
$ret[] = update_sql("CREATE TABLE {blogapi_files} (
fid int NOT NULL auto_increment,
uid int unsigned NOT NULL default 0,
filepath varchar(255) NOT NULL default '',
filesize int unsigned NOT NULL default 0,
PRIMARY KEY (fid),
KEY uid (uid)
) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
break;
case 'pgsql':
$ret[] = update_sql("CREATE TABLE {blogapi_files} (
fid serial,
uid int_unsigned NOT NULL default 0,
filepath varchar(255) NOT NULL default '',
filesize int_unsigned NOT NULL default 0,
PRIMARY KEY (fid)
)");
$ret[] = update_sql("CREATE INDEX {blogapi_files}_uid_idx ON {blogapi_files} (uid)");
break;
}
return $ret;
}
?>Login or register to post comments 