function opigno_learning_path_update_8028 in Opigno Learning path 8
Add user "notified" field to the learning path status expired table.
File
- ./
opigno_learning_path.install, line 809 - Install, update and uninstall functions for the module.
Code
function opigno_learning_path_update_8028() {
$table = 'user_lp_status_expire';
$field = 'notified';
$connection = Database::getConnection();
$schema = $connection
->schema();
if ($schema
->tableExists($table) && !$schema
->fieldExists($table, $field)) {
$spec = [
'description' => 'If user was notified',
'type' => 'int',
'size' => 'tiny',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
];
$schema
->addField($table, $field, $spec);
}
}