You are here

function webprofiler_update_8001 in Devel 8.3

Same name and namespace in other branches
  1. 8 webprofiler/webprofiler.install \webprofiler_update_8001()
  2. 8.2 webprofiler/webprofiler.install \webprofiler_update_8001()
  3. 4.x webprofiler/webprofiler.install \webprofiler_update_8001()

Add a status_code column to the webprofiler table.

File

webprofiler/webprofiler.install, line 174
Install, update and uninstall functions for the webprofiler module.

Code

function webprofiler_update_8001() {
  $database = \Drupal::database();
  $schema = $database
    ->schema();
  $spec = [
    'description' => 'Profile status code.',
    'type' => 'int',
    'size' => 'small',
    'unsigned' => TRUE,
    'not null' => TRUE,
  ];
  $schema
    ->addField('webprofiler', 'status_code', $spec);
}