function locale_update_11401

Add a hash column to the {locale_file} table.

File

core/modules/locale/locale.install, line 325

Code

function locale_update_11401() : void {
  $spec = [
    'type' => 'varchar_ascii',
    'length' => 32,
    'not null' => TRUE,
    'default' => '',
    'description' => 'The hash of the imported file.',
  ];
  $schema = \Drupal::database()->schema();
  if (!$schema->fieldExists('locale_file', 'hash')) {
    $schema->addField('locale_file', 'hash', $spec);
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.