From c5e225ea7ef8d9e9d8eec1ae7b90cf7eab24f983 Mon Sep 17 00:00:00 2001 From: Mohammad Zubair Ali Date: Mon, 25 Nov 2024 10:35:33 +0530 Subject: [PATCH] fixed ALter Table query issue --- php/admin/functions.php | 3 --- php/classes/class-qsm-install.php | 8 +------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/php/admin/functions.php b/php/admin/functions.php index 8eb6e113..10a32485 100644 --- a/php/admin/functions.php +++ b/php/admin/functions.php @@ -251,9 +251,6 @@ function qsm_add_author_column_in_db() { $success = false; $mlwQuizMasterNext->log_manager->add( 'Error updating column charset utf8mb4_unicode_ci', "Tried $query but got {$wpdb->last_error}.", 0, 'error' ); } - } - - if ( $success ) { update_option( 'qsm_update_db_column_charset_utf8mb4_unicode_ci', 1 ); } } diff --git a/php/classes/class-qsm-install.php b/php/classes/class-qsm-install.php index eb02b062..6c1fa9d4 100644 --- a/php/classes/class-qsm-install.php +++ b/php/classes/class-qsm-install.php @@ -1966,12 +1966,6 @@ public function update() { $results = $mlwQuizMasterNext->wpdb_alter_table_query( $sql ); } - // Update 2.6.1 - $results = $mlwQuizMasterNext->wpdb_alter_table_query( 'ALTER TABLE ' . $wpdb->prefix . 'mlw_qm_audit_trail CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;' ); - $results = $mlwQuizMasterNext->wpdb_alter_table_query( 'ALTER TABLE ' . $wpdb->prefix . 'mlw_questions CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci' ); - $results = $mlwQuizMasterNext->wpdb_alter_table_query( 'ALTER TABLE ' . $wpdb->prefix . 'mlw_quizzes CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci' ); - $results = $mlwQuizMasterNext->wpdb_alter_table_query( 'ALTER TABLE ' . $wpdb->prefix . 'mlw_results CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci' ); - global $wpdb; $table_name = $wpdb->prefix . 'mlw_results'; $audit_table = $wpdb->prefix . 'mlw_qm_audit_trail'; @@ -2038,7 +2032,7 @@ public function update() { } update_option( 'mlw_quiz_master_version', $data ); - + // Update 9.1.3 $mlw_questions_table = $wpdb->prefix . 'mlw_questions'; if ( 'linked_question' != $wpdb->get_var( "SHOW COLUMNS FROM $mlw_questions_table LIKE 'linked_question'" ) ) {