You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
3.7 KiB
PHP

<?php /* -*- php -*- */
function fulcrm_webhook_install() {
$url = fulcrm_uuid_uuid4();
variable_set( 'fulcrm_webhook_url', variable_get( 'fulcrm_webhook_url', $url ) );
}
function fulcrm_webhook_schema() {
$schema[ 'fulcrm_webhook_entity_mapping' ] = array( 'description' => '',
'fields' => array( 'entity_type' => array( 'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
),
'bundle' => array( 'description' => 'The {node_type}.type of this node.',
'type' => 'varchar',
'length' => 128,
'default' => NULL,
),
'entity_id' => array( 'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => 'The entity id this data is attached to',
),
'fulcrm_type' => array( 'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
'description' => 'The fulcrm model/type',
),
'fulcrm_pk' => array( 'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => 'The fulcrm model primary key',
),
),
'primary key' => array( 'entity_type', 'bundle', 'entity_id' ),
'unique keys' => array( 'fulcrm_key' => array( 'fulcrm_type', 'fulcrm_pk' ),
),
'indexes' => array( 'fulcrm_index' => array( 'fulcrm_type', 'fulcrm_pk' ),
),
);
return $schema;
}