function crm_core_contact_update_7001 in CRM Core 7
Add database table fields 'module' and 'status' for exportability.
File
- modules/
crm_core_contact/ crm_core_contact.install, line 266 - Install, update and uninstall functions for the CRM Core Contact module.
Code
function crm_core_contact_update_7001() {
$table = 'crm_core_contact_type';
// Remove old primary key.
db_drop_primary_key($table);
db_add_field($table, 'id', array(
'type' => 'serial',
'not null' => TRUE,
'description' => 'Primary Key: Unique contact type ID.',
), array(
'primary key' => array(
'id',
),
));
foreach (entity_exportable_schema_fields() as $field => $spec) {
db_add_field($table, $field, $spec);
}
// Set unique key.
db_add_unique_key($table, 'type', array(
'type',
));
}