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

Contents of /contributions/modules/tablemanager/tablemanager.install

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


Revision 1.25 - (show annotations) (download) (as text)
Tue Apr 15 21:01:43 2008 UTC (19 months, 1 week ago) by pobster
Branch: MAIN
CVS Tags: HEAD
Changes since 1.24: +0 -0 lines
File MIME type: text/x-php
No real changes, just a bit of reorganising...
1 <?php
2 // $Id$
3
4 /**
5 * Implementation of hook_install().
6 */
7 function tablemanager_install() {
8 drupal_install_schema('tablemanager');
9 } // tablemanager_install
10
11 /**
12 * Implementation of hook_uninstall().
13 */
14 function tablemanager_uninstall() {
15 drupal_uninstall_schema('tablemanager');
16 db_query("DELETE FROM {variable} WHERE name LIKE 'tablemanager_%'");
17 cache_clear_all('variables', 'cache');
18 } // tablemanager_uninstall
19
20 /**
21 * Implementation of hook_schema().
22 */
23 function tablemanager_schema() {
24 $schema['tablemanager'] = array(
25 'fields' => array(
26 'tid' => array('type' => 'serial', 'not null' => TRUE),
27 'uid' => array('type' => 'int', 'not null' => TRUE, 'default' => 1),
28 'name' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
29 'description' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
30 'header' => array('type' => 'text', 'not null' => TRUE),
31 ),
32 'primary key' => array('tid'),
33 );
34 $schema['tablemanager_data'] = array(
35 'fields' => array(
36 'id' => array('type' => 'serial', 'not null' => TRUE),
37 'tid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
38 'uid' => array('type' => 'int', 'not null' => TRUE, 'default' => 1),
39 'data' => array('type' => 'text', 'not null' => TRUE),
40 'format' => array('type' => 'int', 'disp-width' => '3', 'not null' => TRUE, 'default' => 1),
41 ),
42 'primary key' => array('id'),
43 );
44 return $schema;
45 } // tablemanager_install

  ViewVC Help
Powered by ViewVC 1.1.2