Upgrading moodle - dmlwriteexception error

Re: Upgrading moodle - dmlwriteexception error

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

This is a permissions error being returned by PostgreSQL. You could try running the following statement in psql with when connected to the Moodle database (\c <moodle_dbname>):

GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA public TO <moodle_dbuser>;

where <moodle_dbuser> is the $CFG->dbname from config.php, i.e. the PostgreSQL user account Moodle is accessing the database as.

If this doesn't work you'll need to tell us more details about how you set up the database for the Moodle 2.7 site: is this on the same PostgreSQL instance as the 2.4 site or is it on a different server? If it's on a different server, what steps did you follow to copy the database? How exactly did you set up the PostgreSQL user for the Moodle 2.7 database?