| 1 |
<?php
|
| 2 |
// $Id$
|
| 3 |
|
| 4 |
/**
|
| 5 |
* Implementation of hook_schema().
|
| 6 |
*/
|
| 7 |
function imagemenu_schema() {
|
| 8 |
$schema['imagemenu'] = array(
|
| 9 |
'fields' => array(
|
| 10 |
'mid' => array('type' => 'serial', 'not null' => TRUE, 'unsigned' => TRUE),
|
| 11 |
'pid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'unsigned' => TRUE),
|
| 12 |
'path' => array('type' => 'varchar', 'not null' => TRUE, 'default' => '', 'length' => 255),
|
| 13 |
'imagepath' => array('type' => 'varchar', 'not null' => TRUE, 'default' => '', 'length' => 255),
|
| 14 |
'mouseover' => array('type' => 'varchar', 'not null' => TRUE, 'default' => '', 'length' => 255),
|
| 15 |
'title' => array('type' => 'varchar', 'not null' => TRUE, 'default' => '', 'length' => 255),
|
| 16 |
'alt' => array('type' => 'varchar', 'not null' => TRUE, 'default' => '', 'length' => 255),
|
| 17 |
'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
|
| 18 |
'enabled' => array('type' => 'int', 'not null' => TRUE, 'default' => 1, 'size' => 'tiny'),
|
| 19 |
'type' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
|
| 20 |
'description' => array('type' => 'text', 'not null' => FALSE)
|
| 21 |
),
|
| 22 |
'primary key' => array('mid'),
|
| 23 |
);
|
| 24 |
|
| 25 |
return $schema;
|
| 26 |
}
|
| 27 |
|
| 28 |
/**
|
| 29 |
* Implementation of hook_install
|
| 30 |
*/
|
| 31 |
function imagemenu_install() {
|
| 32 |
// Create imagemenu tables.
|
| 33 |
drupal_install_schema('imagemenu');
|
| 34 |
}
|
| 35 |
|
| 36 |
/**
|
| 37 |
* Implementation of hook_uninstall
|
| 38 |
*/
|
| 39 |
function imagemenu_uninstall() {
|
| 40 |
// Delete imagemenu tables.
|
| 41 |
drupal_uninstall_schema('imagemenu');
|
| 42 |
}
|
| 43 |
|