function video_zencoder_update_6402 in Video 6.5
Same name and namespace in other branches
- 6.4 plugins/video_zencoder/video_zencoder.install \video_zencoder_update_6402()
Implementation of hook_update_N().
Adding data field and remove unwanted fields from the table
File
- plugins/
video_zencoder/ video_zencoder.install, line 183 - Provides installation functions for video_s3.module.
Code
function video_zencoder_update_6402() {
$ret = array();
// drop un wanted fields in video zencoder
db_drop_field($ret, 'video_zencoder', 'filesize');
db_drop_field($ret, 'video_zencoder', 'outputid');
db_drop_field($ret, 'video_zencoder', 'bucket');
db_drop_field($ret, 'video_zencoder', 'filename');
db_drop_field($ret, 'video_zencoder', 'filepath');
db_drop_field($ret, 'video_zencoder', 'filemime');
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_add_column($ret, 'video_zencoder', 'data', 'longtext', array(
'null' => TRUE,
));
break;
case 'pgsql':
db_add_column($ret, 'video_zencoder', 'data', 'text', array(
'null' => TRUE,
));
break;
}
return $ret;
}