You are here

function message_digest_update_8102 in Message Digest 8

Add unique index to mid field.

File

./message_digest.install, line 225
Install and update hooks for the Message Digest module.

Code

function message_digest_update_8102() {
  $schema = \Drupal::database()
    ->schema();
  if (!$schema
    ->indexExists('message_digest', 'mid')) {
    $schema
      ->addUniqueKey('message_digest', 'mid', [
      'mid',
    ]);
  }
}