HEX
Server: Apache/2.4.59 (Debian)
System: Linux keymana 4.19.0-21-cloud-amd64 #1 SMP Debian 4.19.249-2 (2022-06-30) x86_64
User: lijunjie (1003)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wp-content/plugins/erp/includes/updates/update-1.8.3.php
<?php

/*
 * Add result and result_type column in `erp_hr_education` table
 */
function erp_acct_alter_table_erp_hr_education_1_8_3() {
    global $wpdb;

    $cols = $wpdb->get_col( "DESC {$wpdb->prefix}erp_hr_education" );

    if ( ! in_array( 'result', $cols ) ) {
        $wpdb->query(
            $wpdb->prepare(
                "ALTER TABLE `{$wpdb->prefix}erp_hr_education` ADD `result` VARCHAR(50) NULL DEFAULT NULL AFTER `field`;"
            )
        );
    }

    if ( ! in_array( 'result_type', $cols ) ) {
        $wpdb->query(
            $wpdb->prepare(
                "ALTER TABLE `{$wpdb->prefix}erp_hr_education` ADD `result_type` ENUM('grade','percentage') NULL DEFAULT NULL AFTER `result`;"
            )
        );
    }
}

erp_acct_alter_table_erp_hr_education_1_8_3();