You are here

function cmis_sync_schema in CMIS API 7

Same name and namespace in other branches
  1. 6.4 cmis_sync/cmis_sync.install \cmis_sync_schema()
  2. 6 cmis_sync/cmis_sync.install \cmis_sync_schema()
  3. 6.2 cmis_sync/cmis_sync.install \cmis_sync_schema()
  4. 6.3 cmis_sync/cmis_sync.install \cmis_sync_schema()
  5. 7.2 cmis_sync/cmis_sync.install \cmis_sync_schema()

Implementation of hook_schema()

File

cmis_sync/cmis_sync.install, line 10
install file for CMIS Sync module

Code

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_repositoryId' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => t('repositoryId from the CMIS repository'),
      ),
      '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',
      ),
    ),
    'indexes' => array(
      'cmis_sync_repo_idx' => array(
        'cmis_repositoryId',
      ),
      'cmis_sync_obj_idx' => array(
        'cmis_objectId',
      ),
    ),
    'primary key' => array(
      'id',
    ),
  );
  return $schema;
}