Restore failing with missing chat_mention function

Ok another update. This sandbox instance was just fine when I added the missing function last night.

When running a restore with the SAME restore file, the error returned. I suspect something is dropping the function somewhere? Attached in a full log.

restore.txt (5.6 KB)

I see the problem. Commit 82e75c8 created functions in the discourse_functions schema and commit 8016fca dropped the functions. When you try to restore a backup that was created between those two commits on a version after 8016fca, then the restore fails.

The restore functionality contains a workaround for such issues, but it didn’t work for discourse_functions created from within plugins. Here’s a PR that will fix this:

1 Like

Thank you so much I will try that as well

:loudspeaker: This is solved. Restoring the backup will work after you update Discourse to the latest commit.

There’s no need to create a new backup, manually create the missing function, or any of the other workarounds mentioned in this topic.

5 Likes