So I ran that script and go the following.. what does this even mean? How come I am getting these inconsistencies?
Running redhat 7.1, moodle 3.4.4+, php 7.1.8 & mysql 5.7.21-community
$> php check_database_schema.php
-------------------------------------------------------------------------------
scale_history
* column 'oldid' has default '0', expected 'NULL' (I)
-------------------------------------------------------------------------------
context_temp
* column 'depth' has default '0', expected 'NULL' (I)
-------------------------------------------------------------------------------
role_sortorder
* column 'userid' has default '0', expected 'NULL' (I)
* column 'roleid' has default '0', expected 'NULL' (I)
* column 'contextid' has default '0', expected 'NULL' (I)
* column 'sortoder' has default '0', expected 'NULL' (I)
-------------------------------------------------------------------------------
events_queue
* column 'timecreated' has default '0', expected 'NULL' (I)
-------------------------------------------------------------------------------
events_queue_handlers
* column 'queuedeventid' has default '0', expected 'NULL' (I)
* column 'handlerid' has default '0', expected 'NULL' (I)
* column 'timemodified' has default '0', expected 'NULL' (I)
-------------------------------------------------------------------------------
grade_outcomes_courses
* column 'courseid' has default '0', expected 'NULL' (I)
* column 'outcomeid' has default '0', expected 'NULL' (I)
-------------------------------------------------------------------------------
grade_categories
* column 'courseid' has default '0', expected 'NULL' (I)
* column 'timecreated' has default '0', expected 'NULL' (I)
* column 'timemodified' has default '0', expected 'NULL' (I)
-------------------------------------------------------------------------------
grade_grades
* column 'itemid' has default '0', expected 'NULL' (I)
* column 'userid' has default '0', expected 'NULL' (I)
-------------------------------------------------------------------------------
grade_outcomes_history
* column 'oldid' has default '0', expected 'NULL' (I)
-------------------------------------------------------------------------------
grade_categories_history
* column 'oldid' has default '0', expected 'NULL' (I)
* column 'courseid' has default '0', expected 'NULL' (I)
-------------------------------------------------------------------------------
grade_items_history
* column 'oldid' has default '0', expected 'NULL' (I)
-------------------------------------------------------------------------------
grade_grades_history
* column 'oldid' has default '0', expected 'NULL' (I)
* column 'itemid' has default '0', expected 'NULL' (I)
* column 'userid' has default '0', expected 'NULL' (I)
-------------------------------------------------------------------------------
grade_import_newitem
* column 'importcode' has default '0', expected 'NULL' (I)
* column 'importer' has default '0', expected 'NULL' (I)
-------------------------------------------------------------------------------
grade_import_values
* column 'userid' has default '0', expected 'NULL' (I)
* column 'importcode' has default '0', expected 'NULL' (I)
-------------------------------------------------------------------------------
tag
* column 'userid' has default '0', expected 'NULL' (I)
-------------------------------------------------------------------------------
tag_correlation
* column 'tagid' has default '0', expected 'NULL' (I)
-------------------------------------------------------------------------------
tag_instance
* column 'tagid' has default '0', expected 'NULL' (I)
* column 'itemid' has default '0', expected 'NULL' (I)
-------------------------------------------------------------------------------
groups
* column 'courseid' has default '0', expected 'NULL' (I)
-------------------------------------------------------------------------------
user_private_key
* column 'userid' has default '0', expected 'NULL' (I)
-------------------------------------------------------------------------------
grade_letters
* column 'contextid' has default '0', expected 'NULL' (I)
* column 'lowerboundary' has default '0.00000', expected 'NULL' (N)
-------------------------------------------------------------------------------
cache_flags
* column 'expiry' has default '0', expected 'NULL' (I)
-------------------------------------------------------------------------------
grade_settings
* column 'courseid' has default '0', expected 'NULL' (I)
-------------------------------------------------------------------------------
certificate
* column 'orientation' has default ' ', expected 'NULL' (C)
-------------------------------------------------------------------------------
forum_posts
* column 'message' should be NOT NULL (X)
-------------------------------------------------------------------------------
game
* column 'timeclose' should be NOT NULL (I)
* column 'maxattempts' has default '0', expected 'NULL' (I)
* column 'disablesummarize' should be NOT NULL (I)
-------------------------------------------------------------------------------
game_queries
* column 'tries' length is 2, expected at least 10 (I)
-------------------------------------------------------------------------------
game_cross
* column 'usedcols' has default '0', expected 'NULL' (I)
* column 'usedrows' has default '0', expected 'NULL' (I)
* column 'createscore' has default '0', expected 'NULL' (N)
* column 'cols' is not expected (C)
* column 'rows' is not expected (I)
-------------------------------------------------------------------------------
game_export_javame
* column 'id' should be NOT NULL (I)
-------------------------------------------------------------------------------
game_export_html
* column 'id' should be NOT NULL (I)
-------------------------------------------------------------------------------
game_snakes_database
* column 'usedcols' has default '0', expected 'NULL' (I)
* column 'usedrows' has default '0', expected 'NULL' (I)
* column 'cols' is not expected (I)
* column 'rows' is not expected (I)
-------------------------------------------------------------------------------
hotpot
* column 'delay3' has default '2', expected '0' (I)
* column 'grademethod' has default '0', expected '1' (I)
-------------------------------------------------------------------------------
hotpot_cache
* column 'usefilters' length is 2, expected at least 4 (I)
* column 'useglossary' length is 2, expected at least 4 (I)
-------------------------------------------------------------------------------
quiz
* column 'intro' should be NOT NULL (X)
-------------------------------------------------------------------------------
assignsubmission_onlineaudio
* table is not expected
-------------------------------------------------------------------------------
cuserwhiteboard
* table is not expected
-------------------------------------------------------------------------------
groups_groupings
* table is not expected
-------------------------------------------------------------------------------
groups_groupings_groups
* table is not expected
-------------------------------------------------------------------------------
search_documents
* table is not expected
-------------------------------------------------------------------------------
unittest_course_modules
* table is not expected
-------------------------------------------------------------------------------
unittest_grade_categories
* table is not expected
-------------------------------------------------------------------------------
unittest_grade_categories_history
* table is not expected
-------------------------------------------------------------------------------
unittest_grade_grades
* table is not expected
-------------------------------------------------------------------------------
unittest_grade_grades_history
* table is not expected
-------------------------------------------------------------------------------
unittest_grade_items
* table is not expected
-------------------------------------------------------------------------------
unittest_grade_items_history
* table is not expected
-------------------------------------------------------------------------------
unittest_grade_outcomes
* table is not expected
-------------------------------------------------------------------------------
unittest_grade_outcomes_history
* table is not expected
-------------------------------------------------------------------------------
unittest_modules
* table is not expected
-------------------------------------------------------------------------------
unittest_quiz
* table is not expected
-------------------------------------------------------------------------------
unittest_scale
* table is not expected
-------------------------------------------------------------------------------
unittest_scale_history
* table is not expected
-------------------------------------------------------------------------------