function video_update_7204 in Video 7.2
Alter video_queue table to rename nid to entity_id and add entity_type.
File
- ./
video.install, line 541 - Provides installation schema for video.module @author Heshan Wanigasooriya <heshan@heidisoft.com>
Code
function video_update_7204(&$sandbox) {
$ret = array();
// Check because D6 installs may already have added this.
if (db_field_exists('video_queue', 'nid')) {
db_change_field('video_queue', 'nid', 'entity_id', array(
'description' => 'The entity_id being referenced in this field.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
));
}
if (!db_field_exists('video_queue', 'entity_type')) {
$new_field = array(
'description' => 'The entity_type of the video.',
'type' => 'varchar',
'length' => 128,
'default' => 'node',
);
db_add_field('video_queue', 'entity_type', $new_field);
}
return $ret;
}