function feedapi_node_update_2 in FeedAPI 5
Accept URLs > 255 char.
File
- feedapi_node/
feedapi_node.install, line 85
Code
function feedapi_node_update_2() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysqli':
case 'mysql':
$ret[] = update_sql("ALTER TABLE {feedapi_node_item} DROP INDEX url");
$ret[] = update_sql("ALTER TABLE {feedapi_node_item} DROP INDEX guid");
$ret[] = update_sql("ALTER TABLE {feedapi_node_item} CHANGE url url TEXT CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL");
$ret[] = update_sql("ALTER TABLE {feedapi_node_item} CHANGE guid guid TEXT CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL");
$ret[] = update_sql("ALTER TABLE {feedapi_node_item} ADD INDEX ( url ( 255 ) )");
$ret[] = update_sql("ALTER TABLE {feedapi_node_item} ADD INDEX ( guid ( 255 ) )");
break;
case 'pgsql':
$ret[] = update_sql("ALTER TABLE {feedapi_node_item} ALTER COLUMN url TYPE TEXT");
$ret[] = update_sql("ALTER TABLE {feedapi_node_item} ALTER COLUMN guid TYPE TEXT");
break;
}
return $ret;
}