You are here

function media_acquiadam_install in Media: Acquia DAM 7

Implements hook_install().

File

./media_acquiadam.install, line 11
Drupal install related hooks.

Code

function media_acquiadam_install() {
  if (!db_field_exists('file_managed', 'acquiadam_id')) {
    $schema = drupal_get_schema('file_managed');
    $indexes = [
      'acquiadam_id' => $schema['indexes']['acquiadam_id'],
      'fid_acquiadam_id' => $schema['indexes']['fid_acquiadam_id'],
    ];
    db_add_field('file_managed', 'acquiadam_id', $schema['fields']['acquiadam_id'], [
      'indexes' => $indexes,
    ]);
  }
}