You are here

function dynamic_banner_update_6400 in Dynamic Banner 6

Add a new field to store a mode and time for the current banner on a page.

File

./dynamic_banner.install, line 110
The install file of dynamic_banner

Code

function dynamic_banner_update_6400() {
  $ret = array();
  db_add_field($ret, 'dynamic_banner', 'mode', array(
    'description' => 'The Mode for this page',
    'type' => 'varchar',
    'length' => '30',
    'not null' => FALSE,
  ));
  db_add_field($ret, 'dynamic_banner', 'start_time', array(
    'description' => 'The Start time for this banner',
    'type' => 'varchar',
    'length' => '50',
    'not null' => FALSE,
  ));
  db_add_field($ret, 'dynamic_banner', 'end_time', array(
    'description' => 'The End time for this banner',
    'type' => 'varchar',
    'length' => '50',
    'not null' => FALSE,
  ));
  $sql = "UPDATE {dynamic_banner} SET mode = 'normal'";
  db_query($sql);
  return $ret;
}