You are here

simplenews_scheduler.install in Simplenews Scheduler 5

File

simplenews_scheduler.install
View source
<?php

function simplenews_scheduler_install() {
  $result[] = db_query("CREATE TABLE {simplenews_scheduler} (\n    sid int(10) NOT NULL auto_increment,\n    snid int(10) NOT NULL default '0',\n    run_count int NOT NULL default 0,\n    run_limit int NOT NULL,\n    last_run int(11) NOT NULL default 0,\n    sched_interval varchar(10),\n    sched_start int(11) NOT NULL,\n    PRIMARY KEY  (sid)\n    ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
  $result[] = db_query("CREATE TABLE {simplenews_scheduler_editions} (\n    `snid` int(10) NOT NULL default '0',\n    `edition_snid` int(10) NOT NULL default '0',\n    `date_issued` int(11) NOT NULL default '0'\n    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
  return $result;
}

/**
 * Implementation of hook_uninstall().
 */
function simplenews_scheduler_uninstall() {
  db_query('DROP TABLE {simplenews_scheduler}');
  db_query('DROP TABLE {simplenews_scheduler_editions}');
}