You are here

function video_update_4 in Video 5

Start of Drupal 4.7 support in video.module issue #40005, version 1.25 updated revisions, db schema, forms api, form validation, permissions, added .swf and image support

Return value

array

File

./video.install, line 152

Code

function video_update_4() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {video} ADD vid int(10) unsigned NOT NULL default '0' FIRST");
      $ret[] = update_sql('UPDATE {video} SET vid = nid');
      $ret[] = update_sql('ALTER TABLE {video} CHANGE video_bitrate video_bitrate int(10) unsigned default NULL');
      $ret[] = update_sql('ALTER TABLE {video} CHANGE audio_bitrate audio_bitrate int(10) unsigned default NULL');
      $ret[] = update_sql('ALTER TABLE {video} CHANGE audio_sampling_rate audio_sampling_rate int(10) unsigned default NULL');
      $ret[] = update_sql('ALTER TABLE {video} CHANGE playtime_seconds playtime_seconds int(10) unsigned default NULL');
      $ret[] = update_sql('ALTER TABLE {video} ADD serialized_data text NULL default NULL');
      $ret[] = update_sql('ALTER TABLE {video} DROP PRIMARY KEY, ADD PRIMARY KEY ( `vid` )');
  }
  return $ret;
}