| 1 |
<?php
|
| 2 |
/**
|
| 3 |
* $Id: moderation_log.install,v 1.1.4.3.2.1 2009/03/08 11:41:55 mikhailian Exp $
|
| 4 |
*/
|
| 5 |
/**
|
| 6 |
* Implementation of hook_schema().
|
| 7 |
*/
|
| 8 |
function moderation_log_schema() {
|
| 9 |
$schema['moderation_log_comment'] = array(
|
| 10 |
'fields' => array(
|
| 11 |
'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'disp-width' => '10'),
|
| 12 |
'cid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'disp-width' => '10'),
|
| 13 |
'date' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'disp-width' => '11'),
|
| 14 |
'action' => array('type' => 'varchar', 'length' => '6', 'not null' => TRUE, 'default' => ''),
|
| 15 |
'subject' => array('type' => 'varchar', 'length' => '255', 'not null' => TRUE, 'default' => '')),
|
| 16 |
'indexes' => array(
|
| 17 |
'uid' => array('uid'),
|
| 18 |
'cid' => array('cid')),
|
| 19 |
);
|
| 20 |
$schema['moderation_log_node'] = array(
|
| 21 |
'fields' => array(
|
| 22 |
'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'disp-width' => '10'),
|
| 23 |
'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'disp-width' => '10'),
|
| 24 |
'date' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'disp-width' => '11'),
|
| 25 |
'action' => array('type' => 'varchar', 'length' => '6', 'not null' => TRUE, 'default' => ''),
|
| 26 |
'type' => array('type' => 'varchar', 'length' => '32', 'not null' => TRUE, 'default' => ''),
|
| 27 |
'title' => array('type' => 'varchar', 'length' => '255', 'not null' => TRUE, 'default' => '')),
|
| 28 |
'indexes' => array(
|
| 29 |
'uid' => array('uid')),
|
| 30 |
);
|
| 31 |
$schema['moderation_reason_node'] = array(
|
| 32 |
'fields' => array(
|
| 33 |
'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
| 34 |
'tid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
| 35 |
'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10')),
|
| 36 |
);
|
| 37 |
$schema['moderation_reason_comment'] = array(
|
| 38 |
'fields' => array(
|
| 39 |
'cid' => array('type' => 'int', 'not null' => TRUE, 'disp-width' => '10'),
|
| 40 |
'tid' => array('type' => 'int', 'not null' => TRUE, 'disp-width' => '10'),
|
| 41 |
'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10')),
|
| 42 |
'indexes' => array(
|
| 43 |
'cid' => array('cid'),
|
| 44 |
'tid' => array('tid')),
|
| 45 |
);
|
| 46 |
return $schema;
|
| 47 |
}
|
| 48 |
|
| 49 |
/**
|
| 50 |
* Implementation of hook_install()
|
| 51 |
*/
|
| 52 |
function moderation_log_install() {
|
| 53 |
drupal_install_schema('moderation_log');
|
| 54 |
}
|
| 55 |
|
| 56 |
/**
|
| 57 |
* Implementation of hook_uninstall().
|
| 58 |
*/
|
| 59 |
function moderation_log_uninstall() {
|
| 60 |
drupal_uninstall_schema('moderation_log');
|
| 61 |
}
|