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

Contents of /contributions/modules/webform_paths/webform_paths.install

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


Revision 1.1 - (show annotations) (download) (as text)
Tue Jan 13 23:41:13 2009 UTC (10 months, 2 weeks ago) by owahab
Branch: MAIN
CVS Tags: DRUPAL-6--1-0, HEAD
Branch point for: DRUPAL-6--1
File MIME type: text/x-php
Initial commit
1 <?php
2
3 /**
4 * Implementation of hook_schema()
5 */
6 function webform_paths_schema() {
7 $schema['webform_paths'] = array(
8 'description' => t('The base table for re-usable webforms.'),
9 'fields' => array(
10 'pathid' => array(
11 'description' => t('The primary identifier for a re-usable webform.'),
12 'type' => 'serial',
13 'unsigned' => TRUE,
14 'not null' => TRUE),
15 'nid' => array(
16 'description' => t('The identifier for a node.'),
17 'type' => 'int',
18 'unsigned' => TRUE,
19 'not null' => TRUE),
20 'title' => array(
21 'description' => t('The title of this webform path.'),
22 'type' => 'varchar',
23 'length' => 255,
24 'not null' => TRUE,
25 'default' => ''),
26 'path' => array(
27 'description' => t('The path of this webform path.'),
28 'type' => 'varchar',
29 'length' => 255,
30 'not null' => TRUE,
31 'default' => ''),
32 'message' => array(
33 'description' => t('A message to be displayed to the user.'),
34 'type' => 'text',
35 'not null' => TRUE,
36 'size' => 'medium'),
37 ),
38 'indexes' => array(
39 'nid' => array('nid'),
40 ),
41 'unique keys' => array(
42 'path' => array('path')
43 ),
44 'primary key' => array('pathid'),
45 );
46
47 return $schema;
48 }
49
50 function webform_paths_install() {
51 drupal_install_schema('webform_paths');
52 drupal_set_message('Webform paths module has been successfully installed.');
53 }
54
55 function webform_paths_uninstall() {
56 drupal_uninstall_schema('webform_paths');
57 drupal_set_message('Webform paths module has been successfully uninstalled.');
58 }

  ViewVC Help
Powered by ViewVC 1.1.2