You are here

function opigno_scorm_update_8004 in Opigno SCORM 8

Update 'interaction_id' field in the table 'opigno_scorm_user_answer_results'

File

./opigno_scorm.install, line 404
Module install/update functionality.

Code

function opigno_scorm_update_8004() {
  $table_name = 'opigno_scorm_user_answer_results';
  $schema = \Drupal::database()
    ->schema();
  if ($schema
    ->fieldExists($table_name, 'interaction_id')) {
    $schema
      ->changeField($table_name, 'interaction_id', 'interaction_id', [
      'type' => 'varchar',
      'length' => 191,
    ]);
  }
}