I ran into a couple of problems trying to install the cmis_sync module.
1. First there was a syntax error when it tried to create the table -- I think that it had to do with spaces in the index name "cmis to drupal", so I changed it to cmis2drupal
2. Next I got an error about the key being longer than 1000 bytes. I think that this has to do with the fact the cmis2drupal index uses the repoID and NodeID which are both varchar(255) and perhaps with UTF8 there is some sort of calculation that makes it think the key will be more than 1000 bytes. -- When I deleted the key the table was created (of course w/o the index, there will be some table scans on some of the searches-- but maybe indexing the two columns separately would be a quick fix). If the concatination of the two long IDs is a problem, perhaps creating an repositories table with a shorter repo ID and concatinating that shortened id with the object ID may work).

Comments

richmck’s picture

I have this working with the following code:
/**
* 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_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(
'cmis2drupal_repo' => array('cmis_repositoryId'),
'cmis2drupal_obj' => array('cmis_objectId'),
),
'primary key' => array('id'),
);
return $schema;
}

cbalan’s picture

Status: Active » Closed (fixed)

Fixed in cmis-6.x-3.x-dev.
Closing this ticket.

Thank you,
Catalin Balan