You are here

function simplenews_scheduler_update_6001 in Simplenews Scheduler 6.2

Same name and namespace in other branches
  1. 6 simplenews_scheduler.install \simplenews_scheduler_update_6001()

Implementation of hook_update_N().

File

./simplenews_scheduler.install, line 141
Install and uninstall functions for the Simplenews Scheduler module.

Code

function simplenews_scheduler_update_6001() {
  $ret = array();
  db_drop_field($ret, 'simplenews_scheduler', 'sid');
  db_add_field($ret, 'simplenews_scheduler', 'activated', array(
    'type' => 'int',
    'size' => 'tiny',
    'not null' => TRUE,
    'default' => 0,
  ));
  $ret[] = update_sql("ALTER IGNORE TABLE {simplenews_scheduler} CHANGE snid nid INT(11) NOT NULL DEFAULT '0', ADD PRIMARY KEY (nid)");
  $ret[] = update_sql("ALTER TABLE {simplenews_scheduler_editions} CHANGE edition_snid eid INT(11) NOT NULL DEFAULT '0'");
  $ret[] = update_sql("ALTER TABLE {simplenews_scheduler_editions} CHANGE snid pid INT(11) NOT NULL DEFAULT '0'");
  return $ret;
}