| 1 |
<?php
|
| 2 |
// $Id: preferred_format.install,v 1.1 2008/02/19 01:51:31 gdevlugt Exp $
|
| 3 |
/**
|
| 4 |
* @file
|
| 5 |
* The install file for the Preferred Format module.
|
| 6 |
*/
|
| 7 |
|
| 8 |
/**
|
| 9 |
* Implementation of hook_install().
|
| 10 |
*/
|
| 11 |
function preferred_format_install() {
|
| 12 |
drupal_install_schema('preferred_format');
|
| 13 |
}
|
| 14 |
|
| 15 |
|
| 16 |
/**
|
| 17 |
* Implementation of hook_uninstall().
|
| 18 |
*/
|
| 19 |
function preferred_format_uninstall() {
|
| 20 |
drupal_uninstall_schema('preferred_format');
|
| 21 |
}
|
| 22 |
|
| 23 |
/**
|
| 24 |
* Implementation of hook_schema().
|
| 25 |
*/
|
| 26 |
function preferred_format_schema() {
|
| 27 |
$schema['preferred_format'] = array(
|
| 28 |
'fields' => array(
|
| 29 |
'uid' => array(
|
| 30 |
'type' => 'int',
|
| 31 |
'unsigned' => TRUE,
|
| 32 |
'not null' => TRUE,
|
| 33 |
),
|
| 34 |
'node_type' => array(
|
| 35 |
'type' => 'varchar',
|
| 36 |
'length' => 32,
|
| 37 |
'not null' => TRUE,
|
| 38 |
),
|
| 39 |
'format_id' => array(
|
| 40 |
'type' => 'int',
|
| 41 |
'unsigned' => TRUE,
|
| 42 |
'not null' => TRUE,
|
| 43 |
),
|
| 44 |
),
|
| 45 |
'primary key' => array('uid', 'node_type', 'format_id'),
|
| 46 |
);
|
| 47 |
|
| 48 |
return $schema;
|
| 49 |
}
|