function deploy_update_7003 in Deploy - Content Staging 7.3
Add serial primary key to deploy_manager_entities.
File
- ./
deploy.install, line 380 - Deploy module installation functions.
Code
function deploy_update_7003(&$sandbox) {
$table = 'deploy_manager_entities';
$spec = array(
'description' => 'The unique identifier for this record.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
);
$new_keys = array(
'primary key' => array(
'dme_id',
),
'unique keys' => array(
'record' => array(
'plan_name',
'entity_type',
'entity_id',
'revision_id',
),
),
'indexes' => array(
'entity_record' => array(
'entity_type',
'entity_id',
),
'entity_revision' => array(
'entity_type',
'revision_id',
),
),
);
db_drop_primary_key('deploy_manager_entities');
db_add_field($table, 'dme_id', $spec, $new_keys);
}