You are here

spaces_announce.install in Spaces 5.2

Same filename and directory in other branches
  1. 5 spaces_announce/spaces_announce.install

File

spaces_announce/spaces_announce.install
View source
<?php

/**
 * Implementaton of hook_install().
 */
function spaces_announce_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysqli':
    case 'mysql':
      db_query("UPDATE {system} SET weight = 25 WHERE name = 'spaces_announce'");
      db_query("CREATE TABLE {spaces_announce} (\n                nid int(10) NOT NULL default '0',\n                gid int(10) NOT NULL default '0',\n                KEY (nid),\n                KEY (gid)\n                ) /*!40100 DEFAULT CHARACTER SET UTF8 */");
      db_query("CREATE TABLE {spaces_announce_log} (\n                nid int(10) NOT NULL default '0',\n                count int NOT NULL default '0',\n                viewed int unsigned NOT NULL default '0',\n                KEY (nid)\n                ) /*!40100 DEFAULT CHARACTER SET UTF8 */");
  }
}

/**
 * Implmentation of hook_uninstall().
 */
function spaces_announce_uninstall() {
  db_query('DROP TABLE {spaces_announce}');
  db_query('DROP TABLE {spaces_announce_log}');
}

Functions

Namesort descending Description
spaces_announce_install Implementaton of hook_install().
spaces_announce_uninstall Implmentation of hook_uninstall().