Wunderbyte-GmbH / moodle-mod_newsletter

Native Moodle newsletter module
6 stars 6 forks source link

Error when upgrading #40

Open jeferod83 opened 5 years ago

jeferod83 commented 5 years ago

When upgrading this plugin, an error occurs as follows on the image:

2019-03-27_18-27

The error occurs on file "mod/newsletter/db/upgrade.php" on this commit https://github.com/dasistwas/moodle-mod_newsletter/commit/c4e2309afd285c300b2666e6a1bb69f30aaa0985 at line 297:

$sql = "UPDATE {newsletter_deliveries} nd
                SET nd.delivered = (SELECT ni.publishon FROM {newsletter_issues} ni WHERE ni.id = nd.issueid)";

because the "SET" clause on PostgreSQL doesn't accept "shortcuts". Removing the first "nd" solves this problem.