function system_update_11200

Add a [time] column to the {simpletest} table, if existing.

File

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

Code

function system_update_11200() : void {
    $schema = \Drupal::database()->schema();
    if ($schema->tableExists('simpletest') && !$schema->fieldExists('simpletest', 'time')) {
        $schema->addField('simpletest', 'time', [
            'type' => 'float',
            'not null' => TRUE,
            'default' => 0,
            'description' => 'Time elapsed for the execution of the test.',
        ]);
    }
}

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