annotate external/ad_external.install @ 0:d8a3998dac8e ad

ajout module ad
author pierre
date Fri, 20 Feb 2009 14:04:09 +0000
parents
children
rev   line source
pierre@0 1 <?php
pierre@0 2 // $Id: ad_external.install,v 1.1.2.1.2.2 2009/02/16 17:06:48 jeremy Exp $
pierre@0 3
pierre@0 4 /**
pierre@0 5 * @file
pierre@0 6 * Ad_external module database schema.
pierre@0 7 *
pierre@0 8 * Copyright (c) 2005-2009.
pierre@0 9 * Jeremy Andrews <jeremy@tag1consulting.com>.
pierre@0 10 */
pierre@0 11
pierre@0 12 /**
pierre@0 13 * Implementation of hook_schema().
pierre@0 14 */
pierre@0 15 function ad_external_schema() {
pierre@0 16 $schema['ad_external'] = array(
pierre@0 17 'description' => 'The ad_external table stores source URLs for external ads.',
pierre@0 18 'fields' => array(
pierre@0 19 'aid' => array(
pierre@0 20 'type' => 'int',
pierre@0 21 'unsigned' => TRUE,
pierre@0 22 'not null' => TRUE,
pierre@0 23 'default' => 0,
pierre@0 24 ),
pierre@0 25 'url' => array(
pierre@0 26 'type' => 'varchar',
pierre@0 27 'length' => '255',
pierre@0 28 'not null' => TRUE,
pierre@0 29 'default' => '',
pierre@0 30 )
pierre@0 31 ),
pierre@0 32 'primary key' => array('aid'),
pierre@0 33 );
pierre@0 34
pierre@0 35 return $schema;
pierre@0 36 }
pierre@0 37
pierre@0 38 /**
pierre@0 39 * ad_external module installation.
pierre@0 40 */
pierre@0 41 function ad_external_install() {
pierre@0 42 drupal_install_schema('ad_external');
pierre@0 43 }
pierre@0 44
pierre@0 45 /**
pierre@0 46 * Allow complete uninstallation of the ad_external module.
pierre@0 47 */
pierre@0 48 function ad_external() {
pierre@0 49 drupal_uninstall_schema('ad_external');
pierre@0 50 }