You are here

import.install in Import 6

Same filename and directory in other branches
  1. 8 import.install

File

import.install
View source
<?php

function import_schema() {
  $schema['import'] = array(
    'description' => t('The base table for imports.'),
    'fields' => array(
      'impid' => array(
        'description' => t('The unique identifier.'),
        'type' => 'varchar',
        'length' => 256,
        'not null' => TRUE,
      ),
      'type' => array(
        'description' => t('The type of import.'),
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'impid',
      'type',
    ),
  );
  $schema['import_fail'] = array(
    'description' => t('The base fails for imports.'),
    'fields' => array(
      'impid' => array(
        'description' => t('The unique identifier.'),
        'type' => 'varchar',
        'length' => 256,
        'not null' => TRUE,
      ),
      'type' => array(
        'description' => t('The type of import.'),
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
      ),
      'message' => array(
        'type' => 'text',
        'not null' => TRUE,
        'size' => 'big',
        'description' => t('Message'),
      ),
    ),
    'primary key' => array(
      'impid',
      'type',
    ),
  );
  $schema['import_pass'] = array(
    'description' => t('The completed imports.'),
    'fields' => array(
      'impid' => array(
        'description' => t('The unique identifier.'),
        'type' => 'varchar',
        'length' => 256,
        'not null' => TRUE,
      ),
      'type' => array(
        'description' => t('The type of import.'),
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'impid',
      'type',
    ),
  );
  return $schema;
}

/**
 * Implementation of hook_install().
 *
 * Inserts the module's schema in the database.
 */
function import_install() {
  drupal_install_schema('import');
}

/**
 * Implementation of hook_uninstall().
 *
 * Remove the variables, nodes and schema corresponding to the module.
 */
function import_uninstall() {
  variable_del('import_per_cron');
  drupal_uninstall_schema('import');
}

Functions

Namesort descending Description
import_install Implementation of hook_install().
import_schema
import_uninstall Implementation of hook_uninstall().