### Before you file a bug report
- [x] I have checked the [issue tracker](https…://github.com/mattermost/mattermost/issues) and have not found an issue that matches the one I'm filing.
- [x] This issue is not a troubleshooting question. Troubleshooting questions go here: https://forum.mattermost.com/c/trouble-shoot/16.
- [x] This issue is not a feature request. You can request features and make product suggestions here: https://mattermost.uservoice.com/forums/306457-general/.
- [x] This issue reproduces on one of the [currently supported server versions](https://docs.mattermost.com/about/mattermost-server-releases.html#latest-releases).
- [x] I have read the [contribution guidelines](https://github.com/mattermost/mattermost/blob/master/CONTRIBUTING.md) and the [Mattermost Handbook Contribution Guidelines](https://handbook.mattermost.com/contributors/contributors/guidelines/contribution-guidelines).
### Mattermost Server Version
10.7.0
### Operating System
Debian 10
### Steps to reproduce
1. On the Mattermost server, create an export:
```
cd /opt/mattermost/
bin/mmctl --local export create
2. Check the logs:
```
tail -f /opt/mattermost/logs/mattermost.log
```
### Expected behavior
Create a full export of server, including messages.
### Observed behavior
No messages are in the resulting export. The file itself is only 8 kb:
```
du -sh /var/mattermost/export/16444px4epretb4b37yeowqsga_export.zip
8.0K /var/mattermost/export/16444px4epretb4b37yeowqsga_export.zip
```
### Log Output
```shell
{"timestamp":"2025-06-25 14:02:26.667 +01:00","level":"info","msg":"Bulk export: exporting version","caller":"app/export.go:138","worker_name":"ExportProcess","job_id":"16444px4epretb4b37yeowqsga","job_type":"export_process","job_create_at":"Jun 25 13:02:19.193"}
{"timestamp":"2025-06-25 14:02:26.667 +01:00","level":"info","msg":"Bulk export: exporting team schemes","caller":"app/export.go:312","worker_name":"ExportProcess","job_id":"16444px4epretb4b37yeowqsga","job_type":"export_process","job_create_at":"Jun 25 13:02:19.193"}
{"timestamp":"2025-06-25 14:02:26.668 +01:00","level":"info","msg":"Bulk export: exporting channel schemes","caller":"app/export.go:317","worker_name":"ExportProcess","job_id":"16444px4epretb4b37yeowqsga","job_type":"export_process","job_create_at":"Jun 25 13:02:19.193"}
{"timestamp":"2025-06-25 14:02:26.669 +01:00","level":"info","msg":"Bulk export: exporting roles","caller":"app/export.go:322","worker_name":"ExportProcess","job_id":"16444px4epretb4b37yeowqsga","job_type":"export_process","job_create_at":"Jun 25 13:02:19.193"}
{"timestamp":"2025-06-25 14:02:26.670 +01:00","level":"info","msg":"Bulk export: exporting teams","caller":"app/export.go:149","worker_name":"ExportProcess","job_id":"16444px4epretb4b37yeowqsga","job_type":"export_process","job_create_at":"Jun 25 13:02:19.193"}
{"timestamp":"2025-06-25 14:02:26.671 +01:00","level":"info","msg":"Bulk export: exporting channels","caller":"app/export.go:155","worker_name":"ExportProcess","job_id":"16444px4epretb4b37yeowqsga","job_type":"export_process","job_create_at":"Jun 25 13:02:19.193"}
{"timestamp":"2025-06-25 14:02:26.673 +01:00","level":"info","msg":"Bulk export: exporting users","caller":"app/export.go:160","worker_name":"ExportProcess","job_id":"16444px4epretb4b37yeowqsga","job_type":"export_process","job_create_at":"Jun 25 13:02:19.193"}
{"timestamp":"2025-06-25 14:02:26.686 +01:00","level":"info","msg":"Bulk export: exporting bots","caller":"app/export.go:166","worker_name":"ExportProcess","job_id":"16444px4epretb4b37yeowqsga","job_type":"export_process","job_create_at":"Jun 25 13:02:19.193"}
{"timestamp":"2025-06-25 14:02:26.689 +01:00","level":"info","msg":"Bulk export: exporting posts","caller":"app/export.go:173","worker_name":"ExportProcess","job_id":"16444px4epretb4b37yeowqsga","job_type":"export_process","job_create_at":"Jun 25 13:02:19.193"}
{"timestamp":"2025-06-25 14:02:26.690 +01:00","level":"error","msg":"SimpleWorker: job execution error","caller":"jobs/base_workers.go:86","worker_name":"ExportProcess","job_id":"16444px4epretb4b37yeowqsga","job_type":"export_process","job_create_at":"Jun 25 13:02:19.193","error":"exportAllPosts: Limit exceeded for paging., failed to find Posts: Error 1305 (42000): FUNCTION mattermost.JSON_ARRAYAGG does not exist"}
```
### Additional Information
_No response_