| 1 |
<?php
|
| 2 |
|
| 3 |
/**
|
| 4 |
* Implementation of hook_install()
|
| 5 |
*/
|
| 6 |
|
| 7 |
function flag_content_install() {
|
| 8 |
drupal_install_schema('flag_content');
|
| 9 |
}
|
| 10 |
|
| 11 |
/**
|
| 12 |
* Implementation of hook_schema()
|
| 13 |
*/
|
| 14 |
|
| 15 |
function flag_content_schema() {
|
| 16 |
$schema['flag_content'] = array(
|
| 17 |
'fields' => array(
|
| 18 |
'fid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'defualt' => 0),
|
| 19 |
'eid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'defualt' => 0),
|
| 20 |
'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'defualt' => 0),
|
| 21 |
'type' => array('type' => 'varchar', 'not null' => TRUE, 'length' => 10, 'default' => ''),
|
| 22 |
'timestamp' => array('type' => 'int', 'unsigned' => TRUE),
|
| 23 |
),
|
| 24 |
'indexes' => array('eid' => array('eid'), 'type' => array('type')),
|
| 25 |
'primary key' => array('fid'),
|
| 26 |
);
|
| 27 |
return $schema;
|
| 28 |
}
|
| 29 |
|
| 30 |
/**
|
| 31 |
* Implementation of hook_uninstall()
|
| 32 |
*/
|
| 33 |
function flag_content_uninstall() {
|
| 34 |
drupal_unintstall_schema('flag_content');
|
| 35 |
}
|