add fulcrm_webhook_entity_mapping table

master
Marek Isalski 9 years ago
parent 29d6810bb3
commit a2ed839c01

@ -2,5 +2,41 @@
function fulcrm_webhook_install() { function fulcrm_webhook_install() {
$url = fulcrm_uuid_uuid4(); $url = fulcrm_uuid_uuid4();
variable_set( 'fulcrm_webhook_url', $url ); 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;
} }

Loading…
Cancel
Save