You are here

function development_environment_update_8001 in Development Environment 8

Creates the {development_environment_log} table in the database.

File

./development_environment.install, line 56
Installation, and update hooks for the Development Environment module.

Code

function development_environment_update_8001() {
  Database::getConnection()
    ->schema()
    ->createTable('development_environment_log', [
    'description' => 'Email logs stored by the development environment module',
    'fields' => [
      'lid' => [
        'description' => 'The unique Log ID of the log item',
        'type' => 'serial',
        'not null' => TRUE,
      ],
      'email_data' => [
        'description' => 'The Drupal email data',
        'type' => 'text',
        'not null' => TRUE,
      ],
      'timestamp' => [
        'description' => 'The UNIX timestamp at which the email was logged',
        'type' => 'int',
        'length' => 10,
        'not null' => TRUE,
        'unsigned' => TRUE,
      ],
      'recipient_email' => [
        'description' => 'The recipient of the email',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ],
      'subject' => [
        'description' => 'The subject of the email',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ],
    ],
    'primary key' => [
      'lid',
    ],
  ]);
}