function system_update_11202

Add an [exit_code] column to the {simpletest} table, if existing.

File

core/modules/system/system.install, line 174

Code

function system_update_11202() : void {
  $schema = \Drupal::database()->schema();
  if ($schema->tableExists('simpletest') && !$schema->fieldExists('simpletest', 'exit_code')) {
    $schema->addField('simpletest', 'exit_code', [
      'type' => 'int',
      'not null' => TRUE,
      'default' => 0,
      'description' => 'The exit code of the test executed.',
    ]);
  }
}

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