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