You are here

ad_external.install in Advertisement 5.2

File

external/ad_external.install
View source
<?php

/**
 * Ad_external module database schema.
 * Copyright (c) 2007 Jeremy Andrews <jeremy@kerneltrap.org>.  
 * All rights reserved.
 */
function ad_external_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
    default:
      db_query("CREATE TABLE {ad_external} (\n        aid INT(10) UNSIGNED NOT NULL DEFAULT '0',\n\n        url VARCHAR(255) NOT NULL DEFAULT '',\n\n        PRIMARY KEY (aid)\n      ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
  }
  drupal_set_message(t('The necessary ad_external module tables have been created.'));
}

/**
 * Allow complete uninstallation of the ad_external module.
 */
function ad_external() {
  db_query('DROP TABLE {ad_external}');
}

Functions

Namesort descending Description
ad_external Allow complete uninstallation of the ad_external module.
ad_external_install Ad_external module database schema. Copyright (c) 2007 Jeremy Andrews <jeremy@kerneltrap.org>. All rights reserved.