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

Contents of /contributions/modules/import/import.install

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


Revision 1.1 - (show annotations) (download) (as text)
Fri Oct 31 17:51:22 2008 UTC (12 months, 3 weeks ago) by cyberswat
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-6--1
File MIME type: text/x-php
Adding files
1 <?php
2 // $Id$
3
4 function import_schema() {
5 $schema['import'] = array(
6 'description' => t('The base table for imports.'),
7 'fields' => array(
8 'impid' => array(
9 'description' => t('The unique identifier.'),
10 'type' => 'varchar',
11 'length' => 256,
12 'not null' => TRUE),
13 'type' => array(
14 'description' => t('The type of import.'),
15 'type' => 'varchar',
16 'length' => 32,
17 'not null' => TRUE),
18 ),
19 'primary key' => array('impid','type'),
20 );
21 $schema['import_fail'] = array(
22 'description' => t('The base fails for imports.'),
23 'fields' => array(
24 'impid' => array(
25 'description' => t('The unique identifier.'),
26 'type' => 'varchar',
27 'length' => 256,
28 'not null' => TRUE),
29 'type' => array(
30 'description' => t('The type of import.'),
31 'type' => 'varchar',
32 'length' => 32,
33 'not null' => TRUE),
34 'message' => array(
35 'type' => 'text',
36 'not null' => TRUE,
37 'size' => 'big',
38 'description' => t('Message'),
39 ),
40 ),
41 'primary key' => array('impid','type'),
42 );
43 $schema['import_pass'] = array(
44 'description' => t('The completed imports.'),
45 'fields' => array(
46 'impid' => array(
47 'description' => t('The unique identifier.'),
48 'type' => 'varchar',
49 'length' => 256,
50 'not null' => TRUE),
51 'type' => array(
52 'description' => t('The type of import.'),
53 'type' => 'varchar',
54 'length' => 32,
55 'not null' => TRUE),
56 ),
57 'primary key' => array('impid','type'),
58 );
59 return $schema;
60 }
61
62 /**
63 * Implementation of hook_install().
64 *
65 * Inserts the module's schema in the database.
66 */
67 function import_install() {
68 drupal_install_schema('import');
69 }
70
71 /**
72 * Implementation of hook_uninstall().
73 *
74 * Remove the variables, nodes and schema corresponding to the module.
75 */
76 function import_uninstall() {
77 variable_del('import_per_cron');
78 drupal_uninstall_schema('import');
79 }

  ViewVC Help
Powered by ViewVC 1.1.2