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

Contents of /contributions/modules/artman2/artman2.install

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


Revision 1.1 - (show annotations) (download) (as text)
Fri Sep 5 19:50:47 2008 UTC (14 months, 3 weeks ago) by bangpound
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-6--1
File MIME type: text/x-php
initial commit of the Article Manager 2 migration tool
1 <?php
2 // $Id$
3
4 /**
5 * @file
6 * Article Manager 2 migration module install
7 *
8 * @description Article Manager 2 data migration to nodes
9 */
10
11 /**
12 * Implementation of hook_install().
13 */
14 function artman2_install() {
15 // Create tables.
16 drupal_install_schema('artman2');
17 }
18
19 /**
20 * Implementation of hook_uninstall().
21 */
22 function artman2_uninstall() {
23 // Remove tables.
24 drupal_uninstall_schema('artman2');
25
26 variable_del('artman2_cron_limit');
27 variable_del('artman2_db_prefix');
28 variable_del('artman2_db_url');
29 variable_del('artman2_default_format');
30 variable_del('artman2_default_node_type');
31 variable_del('artman2_migrate');
32 variable_del('artman2_upload_path');
33 }
34
35 /**
36 * Implementation of hook_schema().
37 */
38 function artman2_schema() {
39 $schema['artman2'] = array(
40 'description' => t('Relational table between Drupal nodes and ArtMan 2 articles'),
41 'fields' => array(
42 'nid' => array(
43 'type' => 'int',
44 'unsigned' => TRUE,
45 'not null' => TRUE,
46 'default' => 0,
47 'description' => t('Node ID'),
48 ),
49 'num' => array(
50 'type' => 'int',
51 'unsigned' => TRUE,
52 'not null' => TRUE,
53 'description' => t('Article Manager 2 article number'),
54 ),
55 'last_updated_time' => array(
56 'type' => 'int',
57 'unsigned' => TRUE,
58 'description' => t('Article Manager 2 last updated time'),
59 ),
60 ),
61 'indexes' => array('nid' => array('nid')),
62 'primary key' => array('num'),
63 );
64
65 return $schema;
66 }

  ViewVC Help
Powered by ViewVC 1.1.2