| 1 |
<?php
|
| 2 |
// $Id: phpbb2drupal.install,v 1.8 2007/12/25 01:00:07 nbz Exp $
|
| 3 |
function phpbb2drupal_schema() {
|
| 4 |
$schema['phpbb2drupal_temp_forum'] = array(
|
| 5 |
'description' => t('Maps phpBB forum forum_id to Drupal taxonomy tid.'),
|
| 6 |
'fields' => array(
|
| 7 |
'forum_id' => array('type' => 'int', 'unsigned' => TRUE, 'size' => 'small', 'not null' => TRUE, 'default' => 0, 'disp-width' => '5'),
|
| 8 |
'tid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'disp-width' => '10')),
|
| 9 |
'primary key' => array('forum_id'),
|
| 10 |
);
|
| 11 |
|
| 12 |
$schema['phpbb2drupal_temp_post'] = array(
|
| 13 |
'description' => t('Maps phpBB posts to Drupal comments.'),
|
| 14 |
'fields' => array(
|
| 15 |
'post_id' => array('type' => 'int', 'unsigned' => TRUE, 'size' => 'medium', 'not null' => TRUE, 'default' => 0, 'disp-width' => '8'),
|
| 16 |
'cid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'disp-width' => '10')),
|
| 17 |
'primary key' => array('post_id'),
|
| 18 |
);
|
| 19 |
|
| 20 |
$schema['phpbb2drupal_temp_topic'] = array(
|
| 21 |
'description' => t('Maps phpBB topics and polls to Drupal Nodes.'),
|
| 22 |
'fields' => array(
|
| 23 |
'topic_id' => array('type' => 'int', 'unsigned' => TRUE, 'size' => 'medium', 'not null' => TRUE, 'default' => 0, 'disp-width' => '8'),
|
| 24 |
'post_id' => array('type' => 'int', 'unsigned' => TRUE, 'size' => 'medium', 'not null' => TRUE, 'default' => 0, 'disp-width' => '8'),
|
| 25 |
'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'disp-width' => '10')),
|
| 26 |
'primary key' => array('topic_id'),
|
| 27 |
);
|
| 28 |
|
| 29 |
$schema['phpbb2drupal_temp_user'] = array(
|
| 30 |
'description' => t('Maps phpBB User (User_id) to Drupal User (uid).'),
|
| 31 |
'fields' => array(
|
| 32 |
'user_id' => array('type' => 'int', 'size' => 'medium', 'not null' => TRUE, 'default' => 0, 'disp-width' => '8'),
|
| 33 |
'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'disp-width' => '10')),
|
| 34 |
'primary key' => array('user_id'),
|
| 35 |
);
|
| 36 |
return $schema;
|
| 37 |
}
|
| 38 |
|
| 39 |
function phpbb2drupal_install() {
|
| 40 |
// Create tables.
|
| 41 |
drupal_install_schema('phpbb2drupal');
|
| 42 |
}
|
| 43 |
|
| 44 |
function phpbb2drupal_uninstall() {
|
| 45 |
// Drop tables.
|
| 46 |
drupal_uninstall_schema('phpbb2drupal');
|
| 47 |
}
|