You are here

function video_update_2 in Video 5

Rename counter, add custom fields, for video.module version 1.9

Return value

array

File

./video.install, line 102

Code

function video_update_2() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {video} CHANGE clicks download_counter int(10) unsigned NOT NULL default '0'");
      $ret[] = update_sql("ALTER TABLE {video} ADD play_counter int(10) unsigned NOT NULL default '0' AFTER download_counter");
      $ret[] = update_sql("ALTER TABLE {video} CHANGE audio_channels audio_channels enum('','5.1','stereo','mono') default NULL");
      $ret[] = update_sql('ALTER TABLE {video} ADD download_folder varchar(255) NULL default NULL');
      $ret[] = update_sql("ALTER TABLE {video} ADD disable_multidownload tinyint(1) NOT NULL default '0'");
      $ret[] = update_sql("ALTER TABLE {video} ADD use_play_folder tinyint(1) NOT NULL default '0'");
      $ret[] = update_sql('ALTER TABLE {video} ADD custom_field_1 varchar(255) NULL default NULL');
      $ret[] = update_sql('ALTER TABLE {video} ADD custom_field_2 varchar(255) NULL default NULL');
      $ret[] = update_sql('ALTER TABLE {video} ADD custom_field_3 varchar(255) NULL default NULL');
      $ret[] = update_sql('ALTER TABLE {video} ADD custom_field_4 varchar(255) NULL default NULL');
      $ret[] = update_sql('ALTER TABLE {video} ADD custom_field_5 text NULL default NULL');
      $ret[] = update_sql('ALTER TABLE {video} ADD custom_field_6 text NULL default NULL');
  }
  return $ret;
}