You are here

function video_update_6407 in Video 6.4

Same name and namespace in other branches
  1. 6.5 video.install \video_update_6407()

Update 6407

File

./video.install, line 239
Provides installation functions for video.module.

Code

function video_update_6407() {
  $ret = array();

  // drop un wanted fields in video files
  db_drop_field($ret, 'video_files', 'filesize');
  db_drop_field($ret, 'video_files', 'filename');
  db_drop_field($ret, 'video_files', 'filepath');
  db_drop_field($ret, 'video_files', 'filemime');
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_add_column($ret, 'video_files', 'data', 'longtext', array(
        'null' => TRUE,
      ));
      break;
    case 'pgsql':
      db_add_column($ret, 'video_files', 'data', 'text', array(
        'null' => TRUE,
      ));
      break;
  }
  return $ret;
}