You are here

cmis_sync.install in CMIS API 6.2

File

cmis_sync/cmis_sync.install
View source
<?php

/**
 * Implementation of hook_install()
 */
function cmis_sync_install() {
  drupal_install_schema('cmis_sync');
}

/**
 * Implementation of hook_uninstall()
 */
function cmis_sync_uninstall() {
  drupal_uninstall_schema('cmis_sync');
  variable_del('cmis_sync_map');
}

/**
 * Implementation of hook_schema()
 */
function cmis_sync_schema() {
  $schema['cmis_sync_node'] = array(
    'fields' => array(
      'id' => array(
        'type' => 'serial',
        'not null' => TRUE,
        'description' => t('Primary Key: Unique ID.'),
      ),
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'cmis_objectId' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => t('ObjectId from the CMIS repository'),
      ),
      'changed_timestamp' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => t('The most recent time the drupal node has been saved/synchronized'),
      ),
    ),
    'unique keys' => array(
      'nid' => array(
        'nid',
      ),
    ),
    'primary key' => array(
      'id',
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
cmis_sync_install Implementation of hook_install()
cmis_sync_schema Implementation of hook_schema()
cmis_sync_uninstall Implementation of hook_uninstall()