/[drupal]/contributions/modules/phpbb2drupal/phpbb2drupal.install
ViewVC logotype

Contents of /contributions/modules/phpbb2drupal/phpbb2drupal.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.9 - (show annotations) (download) (as text)
Sun Feb 10 01:36:37 2008 UTC (21 months, 2 weeks ago) by nbz
Branch: MAIN
CVS Tags: DRUPAL-6--2-0-BETA1, DRUPAL-6--2-0-BETA2, DRUPAL-6--2-0-BETA3, DRUPAL-6--2-1, DRUPAL-6--2-0, DRUPAL-6--1-4, DRUPAL-6--1-5, DRUPAL-6--1-0, DRUPAL-6--1-1, DRUPAL-6--1-2, DRUPAL-6--1-3, HEAD
Branch point for: DRUPAL-6--1
Changes since 1.8: +11 -2 lines
File MIME type: text/x-php
Add table deletion in/and uninstall hook. Warn about this in documentation.
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 }

  ViewVC Help
Powered by ViewVC 1.1.2