Table "search_index_requests" doest not exist

Table "search_index_requests" doest not exist

by Daniel Almeida -
Number of replies: 27

Well, this table REALLY does not exist.

Not in the old server nor in the new one.


Command: sudo -u apache /usr/bin/php admin/cli/upgrade.php


Default exception handler: Table "search_index_requests" does not exist Debug:

Error code: ddltablenotexist

* line 146 of /lib/ddl/database_manager.php: ddl_table_missing_exception thrown

* line 1913 of /lib/db/upgrade.php: call to database_manager->field_exists()

* line 1797 of /lib/upgradelib.php: call to xmldb_main_upgrade()

* line 176 of /admin/cli/upgrade.php: call to upgrade_core()


!!! Table "search_index_requests" does not exist!!!

!!

Error code: ddltablenotexist !!

!! Stack trace: * line 146 of /lib/ddl/database_manager.php: ddl_table_missing_exception thrown

* line 1913 of /lib/db/upgrade.php: call to database_manager->field_exists()

* line 1797 of /lib/upgradelib.php: call to xmldb_main_upgrade()

* line 176 of /admin/cli/upgrade.php: call to upgrade_core()

Average of ratings: -
In reply to Daniel Almeida

Re: Table "search_index_requests" doest not exist

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
What versions of Moodle are we dealing with (old and new)?
In reply to Howard Miller

Re: Table "search_index_requests" doest not exist

by Daniel Almeida -
3.4
trying to move to 3.5
In reply to Daniel Almeida

Re: Table "search_index_requests" doest not exist

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
This table got added in MDL-55356

...which was part of 3.4. So it *should* have been there in your 3.4
Average of ratings: Useful (1)
In reply to Howard Miller

Re: Table "search_index_requests" doest not exist

by Daniel Almeida -
how do i add manually?
In reply to Daniel Almeida

Re: Table "search_index_requests" doest not exist

by Ken Task -
Picture of Particularly helpful Moodlers

Before doing this suggestion, let's get confirmation from Howard, it will work ... here goes:

This from a version 3.5.highest moodle ...

From mysql client or maybe phpmyadmin using the database for your moodle, could run this query to create the missing table but make note of the notes:

notes: table prefix below mdl_ needs to match the table prefix of your DB.  Should be able to see that in your config.php file of moodle code.

The query below also uses InnoDB as Engine and character set utf8mb4 which your Moodle DB may/may not be using considering the age of the version of Moodle.

** before attempting below, make a backup of your database.


CREATE TABLE `mdl_search_index_requests` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `contextid` bigint(10) NOT NULL,
  `searcharea` varchar(255) NOT NULL DEFAULT '',
  `timerequested` bigint(10) NOT NULL,
  `partialarea` varchar(255) NOT NULL DEFAULT '',
  `partialtime` bigint(10) NOT NULL,
  `indexpriority` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `mdl_searinderequ_indtim_ix` (`indexpriority`,`timerequested`),
  KEY `mdl_searinderequ_con_ix` (`contextid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPRESSED COMMENT='Records requests for (re)indexing of specific contexts. Entr';

'SoS', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: Table "search_index_requests" doest not exist

by Daniel Almeida -
IT WORKED! YAY!
The Moodle is not mine nor i work at the company.
Im just a jr. level support sad

NOW:

.

Also:

Table "analytics_models" does not exist

I'm almost crying now.
In reply to Daniel Almeida

Re: Table "search_index_requests" doest not exist

by Ken Task -
Picture of Particularly helpful Moodlers

Glad that worked ... in creating a new table ... but ... here we go ...

If this is a customer's system, wonder if they have been totally honest about issues they had/experienced before contacting you.   Ran into one of those ... customer had allowed the space where the DB files lived to run out of space.  It was that way for a week or more before they finally sought assistance.   By that time ... more tables began to have issues - some even disappeared! :|

The ones you now have issues with probably have data in them .. events for sure.

Analytics models at one time, if I re-call correctly, was an addon in earlier versions ... prior to 3.5.   So there may not be any data in that one.

Ask if they have a backup of the DB ... an sql dump.

Ask vendor which host the site if they have a site backup ... some do for accounts on their systems ... maybe once a month.

We could go on and on with creating new tables ... till it gets to the point like a new install of whatever version and a crap shot as to the functioning of the updated 3.5.x.

The original code folder for the moodle ... which you archived I hope ... had a version.php file in it ... would tell us what the old site was.

'SoS', Ken


Average of ratings: Useful (1)
In reply to Ken Task

Re: Table "search_index_requests" doest not exist

by Daniel Almeida -
I rsync'd moodle, moodledata, moodledata2 and all databases i could find (moodle, moode2, integration)
Their config.php pointed to moodledata2, which is the one i'm using.

As for the version.php:

<?php


// This file is part of Moodle - http://moodle.org/

//

// Moodle is free software: you can redistribute it and/or modify

// it under the terms of the GNU General Public License as published by

// the Free Software Foundation, either version 3 of the License, or

// (at your option) any later version.

//

// Moodle is distributed in the hope that it will be useful,

// but WITHOUT ANY WARRANTY; without even the implied warranty of

// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

// GNU General Public License for more details.

//

// You should have received a copy of the GNU General Public License

// along with Moodle.  If not, see <http://www.gnu.org/licenses/>;.


/**

 * MOODLE VERSION INFORMATION

 *

 * This file defines the current version of the core Moodle code being used.

 * This is compared against the values stored in the database to determine

 * whether upgrades should be performed (see lib/db/*.php)

 *

 * @package    core

 * @copyright  1999 onwards Martin Dougiamas (http://dougiamas.com)

 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

 */


defined('MOODLE_INTERNAL') || die();


$version  = 2017111307.00;              // 20171113      = branching date YYYYMMDD - do not modify!

                                        //         RR    = release increments - 00 in DEV branches.

                                        //           .XX = incremental changes.


$release  = '3.4.7 (Build: 20190114)'; // Human-friendly version name


$branch   = '34';                       // This version's branch.

In reply to Daniel Almeida

Re: Table "search_index_requests" doest not exist

by Ken Task -
Picture of Particularly helpful Moodlers

So there were 2 moodledata directories?

You might ask customer about that.

Yes, config.php file points to the active moodledata directory ... but one should not switch on a whim ...

You might, from command line, compare listing of folders/files.  When in the site as a user/teacher or admin, clicking on links to files might produce not found ...

cd /path/to/moodledata/

ls -1 > /root/moodledatafiles.txt

cd /path/to/moodledata2/

ls -1 > /root/moodledata2files.txt

Then from /root:

diff moodledatafiles.txt moodledata2files.txt

That will give only top level ... more important is contents of moodledata/filedir/ ...

'SoS', Ken

In reply to Ken Task

Re: Table "search_index_requests" doest not exist

by Daniel Almeida -
That's why i copied both
I kept the config.php pointing.
And put moodledata2 in the same directory.

Changed the password for the moodle user in mysql in config.php
Thats it.

4d3 < localcache
8,9d6 < temp < trashdir

It seems they're the same thing?

https://docs.moodle.org/39/en/Moodle_migration says i shouldnt care for those:

/moodledata/cache
/moodledata/localcache
/moodledata/sessions
/moodledata/temp
/moodledata/trashdir
In reply to Daniel Almeida

Re: Table "search_index_requests" doest not exist

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Yeh - a table just doesn't get created. Something went badly wrong in a previous upgrade.

Two things... I would (as Ken has said) make very, very sure that the version is the one you think it is. Then... I would do a full database schema check to see what else is wrong. These could easily be a terminal situation.
In reply to Howard Miller

Re: Table "search_index_requests" doest not exist

by Daniel Almeida -
How do i do a full database schema check?
In reply to Daniel Almeida

Re: Table "search_index_requests" doest not exist

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
There's a command line tool in admin/cli/check_database_schema.php
Average of ratings: Useful (1)
In reply to Howard Miller

Re: Table "search_index_requests" doest not exist

by Daniel Almeida -

Attached. its... huge.


i dumped moodle sql from the old server;

created the database moodle in the new one and put everything inside.

In reply to Daniel Almeida

Re: Table "search_index_requests" doest not exist

by Ken Task -
Picture of Particularly helpful Moodlers

Yes, in migration of moodledata filedir is most important ... others are cached and ok not to transfer.  lang folder, however, if present needs also to be transferred - language packs installed for the moodle were in there.   Language packs can be re-installed.

Mind sharing the mysqldump command used?

"created the database moodle in the new one and put everything inside."

What command did you use to create the database?  Exact command ... you can leave out passwords if passing passwords.

How did you 'put everything inside'?

Schema check ... doesn't look good at all ...

table missing, table not expected, missing index, columns missing,   many are core tables.

Using mysql client and using the DB for the moodle, what do you get for the following:

show tables;

This isn't looking good at all.

'SoS', Ken

In reply to Ken Task

Re: Table "search_index_requests" doest not exist

by Daniel Almeida -
mysqldump -uroot -p moodle > /backup/mysqldumpmoodle.sql

mysqldump -uroot -p moodle2 > /backup/mysqldumpmoodle2.sql

mysqldump -uroot -p integracao > /backup/mysqldumpintegracao.sql

mysqldump -uroot -p mysql > /backup/mysqldumpmysql.sql

rsync -Cravzp /backup/* root@:/migracaomoodle/

In the new server, i entered mysql, CREATE DATABASE for each of those dumps

then was just using "<" instead of ">"

---------------------------------------------------------------------------------------------------------------------------------------

mysql> use moodle;
Database changed
mysql> show tables;
+----------------------------------+
| Tables_in_moodle                 |
+----------------------------------+
| mdl_analytics_models             |
| mdl_assign                       |
| mdl_assign_grades                |
| mdl_assign_plugin_config         |
| mdl_assign_submission            |
| mdl_assign_user_flags            |
| mdl_assign_user_mapping          |
| mdl_assignfeedback_comments      |
| mdl_assignfeedback_editpdf_annot |
| mdl_assignfeedback_editpdf_cmnt  |
| mdl_assignfeedback_editpdf_queue |
| mdl_assignfeedback_editpdf_quick |
| mdl_assignfeedback_file          |
| mdl_assignfeedback_pdf_annot     |
| mdl_assignfeedback_pdf_cmnt      |
| mdl_assignfeedback_pdf_qcklst    |
| mdl_assignment                   |
| mdl_assignment_submissions       |
| mdl_assignment_upgrade           |
| mdl_assignsubmission_file        |
| mdl_assignsubmission_onlinetext  |
| mdl_assignsubmission_pdf         |
| mdl_assignsubmission_pdf_tmpl    |
| mdl_assignsubmission_pdf_tmplit  |
| mdl_backup_controllers           |
| mdl_backup_courses               |
| mdl_backup_logs                  |
| mdl_badge                        |
| mdl_badge_backpack               |
| mdl_badge_competencies           |
| mdl_badge_criteria               |
| mdl_badge_criteria_met           |
| mdl_badge_criteria_param         |
| mdl_badge_endorsement            |
| mdl_badge_external               |
| mdl_badge_issued                 |
| mdl_badge_manual_award           |
| mdl_badge_related                |
| mdl_bigbluebuttonbn              |
| mdl_bigbluebuttonbn_logs         |
| mdl_block                        |
| mdl_block_accessibility          |
| mdl_block_community              |
| mdl_block_configurable_reports   |
| mdl_block_instances              |
| mdl_block_positions              |
| mdl_block_recent_activity        |
| mdl_block_rss_client             |
| mdl_blog_association             |
| mdl_blog_external                |
| mdl_book                         |
| mdl_book_chapters                |
| mdl_cache_filters                |
| mdl_cache_flags                  |
| mdl_capabilities                 |
| mdl_chat                         |
| mdl_chat_messages                |
| mdl_chat_messages_current        |
| mdl_chat_users                   |
| mdl_choice                       |
| mdl_choice_answers               |
| mdl_choice_options               |
| mdl_cohort                       |
| mdl_cohort_members               |
| mdl_comments                     |
| mdl_competency                   |
| mdl_competency_coursecomp        |
| mdl_competency_coursecompsetting |
| mdl_competency_evidence          |
| mdl_competency_framework         |
| mdl_competency_modulecomp        |
| mdl_competency_plan              |
| mdl_competency_plancomp          |
| mdl_competency_relatedcomp       |
| mdl_competency_template          |
| mdl_competency_templatecohort    |
| mdl_competency_templatecomp      |
| mdl_competency_usercomp          |
| mdl_competency_usercompcourse    |
| mdl_competency_usercompplan      |
| mdl_competency_userevidence      |
| mdl_competency_userevidencecomp  |
| mdl_config                       |
| mdl_config_log                   |
| mdl_config_plugins               |
| mdl_context                      |
| mdl_context_temp                 |
| mdl_course                       |
| mdl_course_categories            |
| mdl_course_completion_aggr_methd |
| mdl_course_completion_crit_compl |
| mdl_course_completion_criteria   |
| mdl_course_completions           |
| mdl_course_format_options        |
| mdl_course_modules               |
| mdl_course_modules_completion    |
| mdl_course_published             |
| mdl_course_request               |
| mdl_course_sections              |
| mdl_data                         |
| mdl_data_content                 |
| mdl_data_fields                  |
| mdl_data_records                 |
| mdl_editor_atto_autosave         |
| mdl_enrol                        |
| mdl_enrol_flatfile               |
| mdl_enrol_lti_tools              |
| mdl_enrol_lti_users              |
| mdl_enrol_paypal                 |
| mdl_event                        |
| mdl_event_subscriptions          |
| mdl_events_handlers              |
| mdl_events_queue                 |
| mdl_events_queue_handlers        |
| mdl_external_functions           |
| mdl_external_services            |
| mdl_external_services_functions  |
| mdl_external_services_users      |
| mdl_external_tokens              |
| mdl_favourite                    |
| mdl_feedback                     |
| mdl_feedback_completed           |
| mdl_feedback_completedtmp        |
| mdl_feedback_item                |
| mdl_feedback_sitecourse_map      |
| mdl_feedback_template            |
| mdl_feedback_value               |
| mdl_feedback_valuetmp            |
| mdl_files                        |
| mdl_files_reference              |
| mdl_filter_active                |
| mdl_filter_config                |
| mdl_folder                       |
| mdl_forum                        |
| mdl_forum_digests                |
| mdl_forum_discussion_subs        |
| mdl_forum_discussions            |
| mdl_forum_posts                  |
| mdl_forum_queue                  |
| mdl_forum_read                   |
| mdl_forum_subscriptions          |
| mdl_forum_track_prefs            |
| mdl_glossary                     |
| mdl_glossary_alias               |
| mdl_glossary_categories          |
| mdl_glossary_entries             |
| mdl_glossary_entries_categories  |
| mdl_glossary_formats             |
| mdl_grade_categories             |
| mdl_grade_categories_history     |
| mdl_grade_grades                 |
| mdl_grade_grades_history         |
| mdl_grade_import_newitem         |
| mdl_grade_import_values          |
| mdl_grade_items                  |
| mdl_grade_items_history          |
| mdl_grade_letters                |
| mdl_grade_outcomes               |
| mdl_grade_outcomes_courses       |
| mdl_grade_outcomes_history       |
| mdl_grade_settings               |
| mdl_grading_areas                |
| mdl_grading_definitions          |
| mdl_grading_instances            |
| mdl_gradingform_guide_comments   |
| mdl_gradingform_guide_criteria   |
| mdl_gradingform_guide_fillings   |
| mdl_gradingform_rubric_criteria  |
| mdl_gradingform_rubric_fillings  |
| mdl_gradingform_rubric_levels    |
| mdl_groupings                    |
| mdl_groupings_groups             |
| mdl_groups                       |
| mdl_groups_members               |
| mdl_imscp                        |
| mdl_label                        |
| mdl_lesson                       |
| mdl_lesson_answers               |
| mdl_lesson_attempts              |
| mdl_lesson_branch                |
| mdl_lesson_grades                |
| mdl_lesson_overrides             |
| mdl_lesson_pages                 |
| mdl_lesson_timer                 |
| mdl_license                      |
| mdl_lock_db                      |
| mdl_log                          |
| mdl_log_display                  |
| mdl_log_queries                  |
| mdl_logstore_standard_log        |
| mdl_lti                          |
| mdl_lti_submission               |
| mdl_lti_tool_proxies             |
| mdl_lti_tool_settings            |
| mdl_lti_types                    |
| mdl_lti_types_config             |
| mdl_message                      |
| mdl_message_airnotifier_devices  |
| mdl_message_contact_requests     |
| mdl_message_contacts             |
| mdl_message_conversation_members |
| mdl_message_conversations        |
| mdl_message_processors           |
| mdl_message_providers            |
| mdl_message_read                 |
| mdl_message_user_actions         |
| mdl_message_users_blocked        |
| mdl_messageinbound_datakeys      |
| mdl_messageinbound_handlers      |
| mdl_messageinbound_messagelist   |
| mdl_messages                     |
| mdl_mnet_application             |
| mdl_mnet_host                    |
| mdl_mnet_host2service            |
| mdl_mnet_log                     |
| mdl_mnet_remote_rpc              |
| mdl_mnet_remote_service2rpc      |
| mdl_mnet_rpc                     |
| mdl_mnet_service                 |
| mdl_mnet_service2rpc             |
| mdl_mnet_session                 |
| mdl_mnet_sso_access_control      |
| mdl_mnetservice_enrol_courses    |
| mdl_mnetservice_enrol_enrolments |
| mdl_modules                      |
| mdl_my_pages                     |
| mdl_notifications                |
| mdl_oauth2_access_token          |
| mdl_page                         |
| mdl_portfolio_instance           |
| mdl_portfolio_instance_config    |
| mdl_portfolio_instance_user      |
| mdl_portfolio_log                |
| mdl_portfolio_mahara_queue       |
| mdl_portfolio_tempdata           |
| mdl_post                         |
| mdl_profiling                    |
| mdl_qtype_ddimageortext          |
| mdl_qtype_ddimageortext_drags    |
| mdl_qtype_ddimageortext_drops    |
| mdl_qtype_ddmarker               |
| mdl_qtype_ddmarker_drags         |
| mdl_qtype_ddmarker_drops         |
| mdl_qtype_essay_options          |
| mdl_qtype_match_options          |
| mdl_qtype_match_subquestions     |
| mdl_qtype_multichoice_options    |
| mdl_qtype_randomsamatch_options  |
| mdl_qtype_shortanswer_options    |
| mdl_question                     |
| mdl_question_answers             |
| mdl_question_attempt_step_data   |
| mdl_question_attempt_steps       |
| mdl_question_attempts            |
| mdl_question_calculated          |
| mdl_question_calculated_options  |
| mdl_question_categories          |
| mdl_question_dataset_definitions |
| mdl_question_dataset_items       |
| mdl_question_datasets            |
| mdl_question_ddwtos              |
| mdl_question_gapselect           |
| mdl_question_hints               |
| mdl_question_multianswer         |
| mdl_question_numerical           |
| mdl_question_numerical_options   |
| mdl_question_numerical_units     |
| mdl_question_response_analysis   |
| mdl_question_response_count      |
| mdl_question_statistics          |
| mdl_question_truefalse           |
| mdl_question_usages              |
| mdl_quiz                         |
| mdl_quiz_attempts                |
| mdl_quiz_feedback                |
| mdl_quiz_grades                  |
| mdl_quiz_overrides               |
| mdl_quiz_overview_regrades       |
| mdl_quiz_reports                 |
| mdl_quiz_sections                |
| mdl_quiz_slots                   |
| mdl_quiz_statistics              |
| mdl_rating                       |
| mdl_registration_hubs            |
| mdl_repository                   |
| mdl_repository_instance_config   |
| mdl_repository_instances         |
| mdl_resource                     |
| mdl_resource_old                 |
| mdl_role                         |
| mdl_role_allow_assign            |
| mdl_role_allow_override          |
| mdl_role_allow_switch            |
| mdl_role_allow_view              |
| mdl_role_assignments             |
| mdl_role_capabilities            |
| mdl_role_context_levels          |
| mdl_role_names                   |
| mdl_role_sortorder               |
| mdl_scale                        |
| mdl_scale_history                |
| mdl_scorm                        |
| mdl_scorm_aicc_session           |
| mdl_scorm_scoes                  |
| mdl_scorm_scoes_data             |
| mdl_scorm_scoes_track            |
| mdl_scorm_seq_mapinfo            |
| mdl_scorm_seq_objective          |
| mdl_scorm_seq_rolluprule         |
| mdl_scorm_seq_rolluprulecond     |
| mdl_scorm_seq_rulecond           |
| mdl_scorm_seq_ruleconds          |
| mdl_search_index_requests        |
| mdl_sessions                     |
| mdl_stats_daily                  |
| mdl_stats_monthly                |
| mdl_stats_user_daily             |
| mdl_stats_user_monthly           |
| mdl_stats_user_weekly            |
| mdl_stats_weekly                 |
| mdl_survey                       |
| mdl_survey_analysis              |
| mdl_survey_answers               |
| mdl_survey_questions             |
| mdl_tag                          |
| mdl_tag_area                     |
| mdl_tag_coll                     |
| mdl_tag_correlation              |
| mdl_tag_instance                 |
| mdl_task_adhoc                   |
| mdl_task_scheduled               |
| mdl_tool_cohortroles             |
| mdl_tool_customlang              |
| mdl_tool_customlang_components   |
| mdl_tool_monitor_events          |
| mdl_tool_monitor_history         |
| mdl_tool_monitor_rules           |
| mdl_tool_monitor_subscriptions   |
| mdl_tool_recyclebin_category     |
| mdl_tool_recyclebin_course       |
| mdl_upgrade_log                  |
| mdl_url                          |
| mdl_user                         |
| mdl_user_devices                 |
| mdl_user_enrolments              |
| mdl_user_info_category           |
| mdl_user_info_data               |
| mdl_user_info_field              |
| mdl_user_lastaccess              |
| mdl_user_password_history        |
| mdl_user_password_resets         |
| mdl_user_preferences             |
| mdl_user_private_key             |
| mdl_wiki                         |
| mdl_wiki_links                   |
| mdl_wiki_locks                   |
| mdl_wiki_pages                   |
| mdl_wiki_subwikis                |
| mdl_wiki_synonyms                |
| mdl_wiki_versions                |
| mdl_workshop                     |
| mdl_workshop_aggregations        |
| mdl_workshop_assessments         |
| mdl_workshop_assessments_old     |
| mdl_workshop_comments_old        |
| mdl_workshop_elements_old        |
| mdl_workshop_grades              |
| mdl_workshop_grades_old          |
| mdl_workshop_old                 |
| mdl_workshop_rubrics_old         |
| mdl_workshop_stockcomments_old   |
| mdl_workshop_submissions         |
| mdl_workshop_submissions_old     |
| mdl_workshopallocation_scheduled |
| mdl_workshopeval_best_settings   |
| mdl_workshopform_accumulative    |
| mdl_workshopform_comments        |
| mdl_workshopform_numerrors       |
| mdl_workshopform_numerrors_map   |
| mdl_workshopform_rubric          |
| mdl_workshopform_rubric_config   |
| mdl_workshopform_rubric_levels   |
+----------------------------------+
382 rows in set (0.01 sec)


In reply to Daniel Almeida

Re: Table "search_index_requests" doest not exist

by Ken Task -
Picture of Particularly helpful Moodlers

The database for mysql is for the mysql server ... and is probably/should be unique to each mysql server.  Was created by installation of mysql.

That one should have not replaced the DB that was there.

The creation of DB's for Moodle probably should be character set utf8mb4 with collate of utf8mb4_general_ci

Check config.php file in DB array for a line for collate.

Please see:

version 3.4

https://docs.moodle.org/34/en/MySQL

version 3.9

https://docs.moodle.org/39/en/MySQL

You could open a .sql file in a text editor and search for things like 'engine' ... or 'collate' of 'utf8' to see what's in the dumps.

The old way of migrating server to new home which had higher version of MySQL that could support + knowing version of Moodle, one could edit raw .sql file and change things, then import into new DB.

'SoS', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: Table "search_index_requests" doest not exist

by Daniel Almeida -
Hi! Sorry for the delay
The database is in utf8mb4_general_ci

How should i proceed from here?
In reply to Daniel Almeida

Re: Table "search_index_requests" doest not exist

by Daniel Almeida -
i purged mysql and reinstalled
this time i only touched moodle, moodle2 and integracao tables with my dump

added table mdl_search_index_requests to table moodle, which you gave me the code.


now:

Sistem
Creating top-level question categories - 3952/3952.
100%

Debug info: Unknown column 'priority' in 'mdl_event'
ALTER TABLE mdl_event ADD location LONGTEXT COLLATE utf8mb4_unicode_ci AFTER priority
Error code: ddlexecuteerror

mysql> use moodle;
mysql> show columns from mdl_event;
+----------------+--------------+------+-----+---------+----------------+
| Field          | Type         | Null | Key | Default | Extra          |
+----------------+--------------+------+-----+---------+----------------+
| id             | bigint       | NO   | PRI | NULL    | auto_increment |
| name           | longtext     | NO   |     | NULL    |                |
| description    | longtext     | NO   |     | NULL    |                |
| format         | smallint     | NO   |     | 0       |                |
| courseid       | bigint       | NO   | MUL | 0       |                |
| groupid        | bigint       | NO   | MUL | 0       |                |
| userid         | bigint       | NO   | MUL | 0       |                |
| repeatid       | bigint       | NO   |     | 0       |                |
| modulename     | varchar(20)  | NO   |     |         |                |
| instance       | bigint       | NO   |     | 0       |                |
| eventtype      | varchar(20)  | NO   |     |         |                |
| timestart      | bigint       | NO   | MUL | 0       |                |
| timeduration   | bigint       | NO   | MUL | 0       |                |
| visible        | smallint     | NO   |     | 1       |                |
| uuid           | varchar(255) | NO   | MUL |         |                |
| sequence       | bigint       | NO   |     | 1       |                |
| timemodified   | bigint       | NO   |     | 0       |                |
| subscriptionid | bigint       | YES  | MUL | NULL    |                |
+----------------+--------------+------+-----+---------+----------------+
18 rows in set (0.00 sec)
In reply to Daniel Almeida

Re: Table "search_index_requests" doest not exist

by Ken Task -
Picture of Particularly helpful Moodlers

Have to confess ... 4 days between postings one has to go back and refresh what this is all about and where one is in sleuthing.  Life must have gotten in the way. smile

So we are still trying to upgrade a 3.4 site to a 3.5 right?  Are we migrating ... moving to a new server ... as well?


"i purged mysql and reinstalled"

One doesn't 'purge' a database.  Did you reinstalled mysql server and client?

Then created blank databases with proper character set collations for moodle,moodle2, and integracao *databases* (not tables) with imports of the SQL dumps.

"added table mdl_search_index_requests to table moodle"
So the table was missing in database dump of moodle - as it was before?

And now we have another table mdl_event that is missing a column?

with this error:

"ALTER TABLE mdl_event ADD location LONGTEXT COLLATE utf8mb4_unicode_ci AFTER priority"

I happen to have a 3.5.highest

mysql> use moodle35ssl;
mysql> show columns from mdl_event;
mdl_event has 22 rows in mine ... ends with:

| priority       | bigint(10)   | YES  |     | NULL    |                |
+----------------+--------------+------+-----+---------+----------------+
22 rows in set (0.00 sec)

So your DB is missing the priority column in mdl_event?!!!???

Did your 3.4 site ever work?

'SoS', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: Table "search_index_requests" doest not exist

by Daniel Almeida -
1) "Are we migrating ... moving to a new server ... as well?" Only moving to a new server. The original site is untouched, working fine.

2) "So we are still trying to upgrade a 3.4 site to a 3.5 right?" Well, i'm using 3.7 instead of 3.5 now, but its the same destination: move to 3.9 as soon as i upgrade from 3.4

3) "One doesn't 'purge' a database. Did you reinstalled mysql server and client?" well, i did this:

yum remove mysql mysql-server
mv /var/lib/mysql /var/lib/mysql_bkup
The mysql was clean after reinstall, i had to create everything again. Even the user moodle.

4) "So the table was missing in database dump of moodle - as it was before?" Yes.

5) "And now we have another table mdl_event that is missing a column?" Its 2, i dont have location nor priority. Since yours have 22, it's probably 4.

6) "Did your 3.4 site ever work?" Perfectly. http://ead.fazu.br/moodle/login/index.php

7)  mysql> ALTER TABLE mdl_event ADD priority BIGINT(10) COLLATE utf8mb4_unicode_ci AFTER subscriptionid;

Now: "analytics_models" does not exist

8)  CREATE TABLE `mdl_analytics_models` (
  `id` bigint(10) NOT NULL,
  `enabled` tinyint(1) NOT NULL DEFAULT 0,
  `trained` tinyint(1) NOT NULL DEFAULT 0,
  `name` varchar(1333) DEFAULT NULL,
  `target` varchar(255) NOT NULL DEFAULT '',
  `indicators` longtext NOT NULL,
  `timesplitting` varchar(255) DEFAULT NULL,
  `predictionsprocessor` varchar(255) DEFAULT NULL,
  `version` bigint(10) NOT NULL,
  `timecreated` bigint(10) DEFAULT NULL,
  `timemodified` bigint(10) NOT NULL,
  `usermodified` bigint(10) NOT NULL
)

9) Debug info: Table 'moodle.mdl_oauth2_issuer' doesn't exist
UPDATE mdl_oauth2_issuer
SET image = ?
WHERE image = ?
[array (
0 => 'https://facebookbrand.com/wp-content/uploads/2016/05/flogo_rgb_hex-brc-site-250.png',
1 => 'https://facebookbrand.com/wp-content/themes/fb-branding/prj-fb-branding/assets/images/fb-art.png',
)]
Error code: dmlwriteexception

In reply to Daniel Almeida

Re: Table "search_index_requests" doest not exist

by Ken Task -
Picture of Particularly helpful Moodlers

Strongly suggest just cloning what you have at current site to new environment ... first ... the 'move' is called a migration. What you are attempting now is a migration and and upgrade ... at the same time ... and to 3.7.highest now ... not the original 3.5.x as stated earlier in this thread.

Now before you do the migration, take the time to plan AND see what might be in store for you ....

In current working server, go to Site Admin Menu, Server, Environment.   Update the component.

After it updates, use the moodle drop down version pick list to choose each version higher than the 3.4 which should be the first version shown (current version of the moodle).  If it says a lower version than 3.4, please inform.

Now at each version upwards chosen the environment check page will refresh and tell you what's green - ok - no change ... what's yellow - probably should be changed soon ... or biggy 'RED' ... must resolve *before* atempting to upgrade.

Migration first ... then after site is migrated successfully and is fully functional now plan and do the upgrades.

I know techies like to get the job done as soon as possible, but, depending upon factors/info not shared yet, trying to hyperjump from 3.4 to 3.7 may not be the best decision ... refer to the information you gathered / planed /made notes upon when you were checking the environment.

'factors/info not yet shared' .... while I can discover some remotely without login, not all .. so lets start with same basics ... server OS - Ubuntu/CentOS/other ... version, version of PHP, MySQL ... how many third party plugins installed in current moodle (I know of one already .. /local/mobile/) and not only their current versions, but some research on your part too see if those plugins have compatible versions for your destination version.

That /local/mobile/ addon ... if it's this one:

https://moodle.org/plugins/local_mobile

Read what it says ... about it and look at versions available (remember to keey your desination version in mind):

https://moodle.org/plugins/pluginversions.php?plugin=local_mobile

Might be a good idea to compare official docs:

https://docs.moodle.org/39/en/Moodle_migration

with your method also.

'SoS', Ken



Average of ratings: Useful (1)
In reply to Ken Task

Re: Table "search_index_requests" doest not exist

by Daniel Almeida -

1) "What you are attempting now is a migration and and upgrade ... at the same time ... and to 3.7.highest now ... not the original 3.5.x as stated earlier in this thread."

Yes, my goal is to move to 3.9 BUT 3.4 cant go straight to 3.9. Must go to 3.5+ THEN go to 3.9. I'm trying 3.7 because 3.5 wasnt working and i was trying different stuff to see if it solved (I tried 3.6 etc).

2) "Strongly suggest just cloning what you have at current site to new environment"

I'll see if i can do that, i only have ssh access, i don't even know if it's physical servers, proxmoxes or what not

3) "After it updates, use the moodle drop down version pick list to choose each version higher than the 3.4 which should be the first version shown (current version of the moodle).  If it says a lower version than 3.4, please inform."

I can't touch the old server. It's operational. But i can tell you that only shows versions below 3.4: "3.4.7" and "3.2 an up". php 5.6.40 and mysql (5.5.65-MariaDB)

4) In the new one there are 5 red plugins: they have "update" buttons, but they fail when i do.

Mobile 2017111302

moove 2017082400

adaptable 2016052900

styles 2018051700

messageteacher 2014082000

fontfamily 2015051500 (it makes 6, but no update button on this one)

Everything else is either: blue (to be updated) red (to be deleted) green (to be installed)


5) almost forgot: i'm using mysql 8.0.21 and php 7.2.32 in the new server

In reply to Daniel Almeida

Re: Table "search_index_requests" doest not exist

by Ken Task -
Picture of Particularly helpful Moodlers
If you transfer an already messed up 3.4 site, what should one expect?
Is that what 'in the new one' means?  XFer'd to new environment?

"In the new one there are 5 red plugins: they have "update" buttons, but they fail when i do"

And how do they fail?

"I can't touch the old server. It's operational."  How can you tell me what it shows?  Did you update the component - link on environment check screen ... upper right hand corner of that screen.

Why can't you touch the old server?

What's the operating system on old server?

All I tell ya is what I might do if in your shoes ...

Knowing OS of server, think I'd install a VB on laptop/workstation ... get same versions of PHP MariaDB installed and running on it first, then backup the 3.4 site ... all of it .. xfer to VB and go from there.

First order of business on the VB would be to get whatever plugins needs updating updated.  And check environment.

Then march the VB Moodle to next version upwards ... 3.5.highest.
and upgrades to PHP and MariaDB might be needed on the VB before the next hop.

Continue updating/upgrading what ever until reaching the destination version desired.

Then backing up that working version to the future production with CentOS 8 whatever.

Best of luck to ya!
'SoS', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: Table "search_index_requests" doest not exist

by Daniel Almeida -
I can click around, look into stuff. I just cant change anything.

I used this: https://moodleschema.zoola.io

Created a few tables (less than 10) and a few columns

It's up to 3.9 now.

I'll make some copies of my own and see if i can make this work locally without all this hassle.
In reply to Ken Task

Re: Table "search_index_requests" doest not exist

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Ken

You wrote:
> in migration of moodledata filedir is most important ... others are cached and ok not to transfer. lang folder, however, if present needs also to be transferred - language packs installed for the moodle were in there.

Possibly the mod/ directory is also a must. See [mod_certificate] Does it leave assets in moodledata/mod/certificate/ ?
In reply to Visvanath Ratnaweera

Re: Table "search_index_requests" doest not exist

by Ken Task -
Picture of Particularly helpful Moodlers

Good point! smile

Yes ... if running old certificate mod still (I think).  Don't think simplecert does.   Check the directories and pdf certs themselves.  Ya might find them quite old and for persons no longer on the system ... which could indicate those need to be archived depending up records retention requirements.

To be safe, if there are directories other than the caching and temps, include those as well.   Another comes to mind ... geoip but that could easily be re-installed.  Another, if using filesystem repos, would be the 'repository' directory - those too could be rebuilt if users of site still have local files to re-populate.

All that, however, might kinda take back seat to the DB issues.

Op should probably install moosh as it has some commands to compare mdl_files table to what is actually in moodledata/filedir/

'SoS', Ken