Error reading from database

Re: Error reading from database

by Leon Stringer -
Number of replies: 0
Picture of Core developers Picture of Particularly helpful Moodlers

3.9dev was a development version and should not be used for a production site. You should plan to update the site to the latest release, 3.9.4. Updating from an unsupported development version may have unexpected problems so I'd recommend doing a test update first.

But mdl_competency_usercomp was added in Moodle 3.1 so it should definitely be present. You could create the table using the definition below but that doesn't explain how you've ended up with non-production code with a missing table.

CREATE TABLE `mdl_competency_usercomp` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL,
  `competencyid` bigint(10) NOT NULL,
  `status` tinyint(2) NOT NULL DEFAULT 0,
  `reviewerid` bigint(10) DEFAULT NULL,
  `proficiency` tinyint(2) DEFAULT NULL,
  `grade` bigint(10) DEFAULT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) DEFAULT NULL,
  `usermodified` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `mdl_compuser_usecom_uix` (`userid`,`competencyid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
  ROW_FORMAT=COMPRESSED COMMENT='User competencies';